Master Thesis Code
by Simon Moser
Loading...
Searching...
No Matches
MyVqf Class Reference

MyVqf is an interface to the VQF python package. More...

Public Member Functions

function MyVqf ()
 Constructor of the MyVqf class.
 
function delete (in obj)
 Destructor of the MyVqf class.
 
function filter (in obj, in acc, in gyr, in mag)
 Filter the data using the VQF algorithm (only forward).
 
function filterOffline (in obj, in acc, in gyr, in mag)
 Filter the data using the VQF algorithm (offline, forward and backward).
 
function setProperties (in obj, in params)
 method to set properties of the VQF filter
 
function getProperties (in obj)
 

Public Attributes

Property pe
 python environment
 
Property vqf
 VQF python package.
 
Property vqfForward
 VQF object with forward filter configuration.
 
Property np
 numpy package
 
Sampling times

sampling times for the sensors in [s]

Property gyrTs
 
Property accTs
 
Property magTs
 
VQF parameters

default values according to the VQF documentation

Property tauAcc
 
Property tauMag
 
Property motionBiasEstEnabled
 
Property restBiasEstEnabled
 
Property magDistRejectionEnabled
 
Property biasSigmaInit
 
Property biasForgettingTime
 
Property biasClip
 
Property biasSigmaMotion
 
Property biasVerticalForgettingFactor
 
Property biasSigmaRest
 
Property restMinT
 
Property restFilterTau
 
Property restThGyr
 
Property restThAcc
 
Property magCurrentTau
 
Property magRefTau
 
Property magNormTh
 
Property magDipTh
 
Property magNewTime
 
Property magNewFirstTime
 
Property magNewMinGyr
 
Property magMinUndisturbedTime
 
Property magMaxRejectionTime
 
Property magRejectionFactor
 

Protected Member Functions

function createVQF (in obj)
 Create and configure VQF forward filter.
 
function offlineVQF (in obj, in acc, in gyr, in mag)
 Call the offline VQF algorithm.
 

Detailed Description

MyVqf is an interface to the VQF python package.

This class is an interface to the VQF python package. It is used to create a VQF object that can be used to perform VQF operations. The VQF package is a python package that provides a VQF algorithm implementation. This algorithm is used to estimate the orientation of a sensor in 3D space. The VQF algorithm is based on the work of the following paper: https://doi.org/10.1016/j.inffus.2022.10.014

% Example usage:
% create example data with the JumpSensor class
js = JumpSensor();
data = js.generate(zeros(1000,3), zeros(1000,3), quaternion.ones(1000,1));
% create VQF object
vqf = MyVqf();
% filter the data
result = vqf.filter(data.tt.acc, data.tt.gyr, data.tt.mag);
JumpSensor is a simulation of the JUMP sensor of the ZurichMove Project.
Definition JumpSensor.m:41
function MyVqf()
Constructor of the MyVqf class.
function filter(in obj, in acc, in gyr, in mag)
Filter the data using the VQF algorithm (only forward).
Property vqf
VQF python package.
Definition MyVqf.m:39
Note
The implementation currently always uses the root python environment.
Examples
derivation5Ekf6D.m, and derivation6Ekf6D.m.

Definition at line 29 of file MyVqf.m.

Constructor & Destructor Documentation

◆ MyVqf()

function MyVqf ( )

Constructor of the MyVqf class.

Parameters
None
Return values
obj-Instance of the MyVqf class.
Note
The root python environment is used and the packages 'vqf' and 'numpy' must be installed in the python environment.

Member Function Documentation

◆ createVQF()

function createVQF ( in obj)
protected

Create and configure VQF forward filter.

Parameters
obj- Instance of the MyVqf class.
Return values
obj- Instance of the MyVqf class.

◆ delete()

function delete ( in obj)

Destructor of the MyVqf class.

Parameters
obj-Instance of the MyVqf class.
Return values
None

◆ filter()

function filter ( in obj,
in acc,
in gyr,
in mag )

Filter the data using the VQF algorithm (only forward).

Parameters
obj- Instance of the MyVqf class.
acc- Accelerometer data [Nx3] (m/s^2).
gyr- Gyroscope data [Nx3] (rad/s).
mag- Magnetometer data [Nx3] (uT).
Return values
data- Struct with the filtered data.

◆ filterOffline()

function filterOffline ( in obj,
in acc,
in gyr,
in mag )

Filter the data using the VQF algorithm (offline, forward and backward).

Parameters
obj- Instance of the MyVqf class.
acc- Accelerometer data [Nx3] (m/s^2).
gyr- Gyroscope data [Nx3] (rad/s).
mag- Magnetometer data [Nx3] (uT).
Return values
data- Struct with the filtered data.

◆ getProperties()

function getProperties ( in obj)

◆ offlineVQF()

function offlineVQF ( in obj,
in acc,
in gyr,
in mag )
protected

Call the offline VQF algorithm.

Parameters
obj- Instance of the MyVqf class.
acc- Accelerometer data [Nx3] (m/s^2).
gyr- Gyroscope data [Nx3] (rad/s).
mag- Magnetometer data [Nx3] (uT).
Return values
data- Struct with the filtered data.
Note
See the VQF documentation for the structure of the data.

◆ setProperties()

function setProperties ( in obj,
in params )

method to set properties of the VQF filter

Parameters
obj- Instance of the MyVqf class.
params- Struct with the properties to set.
  • params.tauAcc (optional)
  • params.tauMag (optional)
  • params.motionBiasEstEnabled (optional)
  • params.restBiasEstEnabled (optional)
  • params.magDistRejectionEnabled (optional)
  • params.biasSigmaInit (optional)
  • params.biasForgettingTime (optional)
  • params.biasClip (optional)
  • params.biasSigmaMotion (optional)
  • params.biasVerticalForgettingFactor (optional)
  • params.biasSigmaRest (optional)
  • params.restMinT (optional)
  • params.restFilterTau (optional)
  • params.restThGyr (optional)
  • params.restThAcc (optional)
  • params.magCurrentTau (optional)
  • params.magRefTau (optional)
  • params.magNormTh (optional)
  • params.magDipTh (optional)
  • params.magNewTime (optional)
  • params.magNewFirstTime (optional)
  • params.magNewMinGyr (optional)
  • params.magMinUndisturbedTime (optional)
  • params.magMaxRejectionTime (optional)
  • params.magRejectionFactor (optional)
Return values
obj- Instance of the MyVqf class.
Note
The properties are set to the default values if not provided.
see the VQF documentation for the meaning of the properties.

Member Data Documentation

◆ accTs

Property accTs

Definition at line 55 of file MyVqf.m.

◆ biasClip

Property biasClip

Definition at line 78 of file MyVqf.m.

◆ biasForgettingTime

Property biasForgettingTime

Definition at line 76 of file MyVqf.m.

◆ biasSigmaInit

Property biasSigmaInit

Definition at line 74 of file MyVqf.m.

◆ biasSigmaMotion

Property biasSigmaMotion

Definition at line 80 of file MyVqf.m.

◆ biasSigmaRest

Property biasSigmaRest

Definition at line 84 of file MyVqf.m.

◆ biasVerticalForgettingFactor

Property biasVerticalForgettingFactor

Definition at line 82 of file MyVqf.m.

◆ gyrTs

Property gyrTs

Definition at line 53 of file MyVqf.m.

◆ magCurrentTau

Property magCurrentTau

Definition at line 94 of file MyVqf.m.

◆ magDipTh

Property magDipTh

Definition at line 100 of file MyVqf.m.

◆ magDistRejectionEnabled

Property magDistRejectionEnabled

Definition at line 72 of file MyVqf.m.

◆ magMaxRejectionTime

Property magMaxRejectionTime

Definition at line 110 of file MyVqf.m.

◆ magMinUndisturbedTime

Property magMinUndisturbedTime

Definition at line 108 of file MyVqf.m.

◆ magNewFirstTime

Property magNewFirstTime

Definition at line 104 of file MyVqf.m.

◆ magNewMinGyr

Property magNewMinGyr

Definition at line 106 of file MyVqf.m.

◆ magNewTime

Property magNewTime

Definition at line 102 of file MyVqf.m.

◆ magNormTh

Property magNormTh

Definition at line 98 of file MyVqf.m.

◆ magRefTau

Property magRefTau

Definition at line 96 of file MyVqf.m.

◆ magRejectionFactor

Property magRejectionFactor

Definition at line 112 of file MyVqf.m.

◆ magTs

Property magTs

Definition at line 57 of file MyVqf.m.

◆ motionBiasEstEnabled

Property motionBiasEstEnabled

Definition at line 68 of file MyVqf.m.

◆ np

Property np

numpy package

Definition at line 47 of file MyVqf.m.

◆ pe

Property pe

python environment

Definition at line 35 of file MyVqf.m.

◆ restBiasEstEnabled

Property restBiasEstEnabled

Definition at line 70 of file MyVqf.m.

◆ restFilterTau

Property restFilterTau

Definition at line 88 of file MyVqf.m.

◆ restMinT

Property restMinT

Definition at line 86 of file MyVqf.m.

◆ restThAcc

Property restThAcc

Definition at line 92 of file MyVqf.m.

◆ restThGyr

Property restThGyr

Definition at line 90 of file MyVqf.m.

◆ tauAcc

Property tauAcc

Definition at line 64 of file MyVqf.m.

◆ tauMag

Property tauMag

Definition at line 66 of file MyVqf.m.

◆ vqf

Property vqf

VQF python package.

Definition at line 39 of file MyVqf.m.

◆ vqfForward

Property vqfForward

VQF object with forward filter configuration.

Definition at line 43 of file MyVqf.m.


The documentation for this class was generated from the following file: