JumpSensor is a simulation of the JUMP sensor of the ZurichMove Project. More...
Inheritance diagram for JumpSensor:Public Member Functions | |
| function | JumpSensor (in args) |
| JumpSensor is the constructor of the JUMP sensor. | |
| function | generate (in obj, in acc_true, in gyr_true, in ori_true, in options) |
| generate generates sensor data from true data. | |
| function | generateFromTrajectory (in obj, in traj) |
| generates data from a Trajectory object. | |
| function | getParams (in obj) |
| returns the parameters of the JUMP sensor. | |
Private Member Functions | |
| function | createMpu (in obj) |
| createMpu creates the MPU9250 sensor. | |
| function | createHig (in obj) |
| createHig creates the ADXL375 sensor. | |
| function | getPressureFromAltitude (in obj, in alt, in tmp, in prs_sealvl) |
| getPressureFromAltitude returns the pressure from the altitude. | |
| function | getSensorTemperature (in obj, in tmp_true) |
| getSensorTemperature returns the sensor temperature. | |
Static Private Member Functions | |
| static function | getMisalignmentMatrix (in x, in y, in z, in sensitivity) |
| getMisalignmentMatrix returns a misalignment matrix for the accelerometer or gyroscope. | |
| static function | rant (in lower, in upper, in nstd) |
| rant returns a typical value in the sense of datasheet typical values. | |
| static function | generateNoise (in n, in N, in K, in B, in fs) |
| generateNoise generates noise with the given parameters. | |
Private Attributes | |
| Property | accRange |
| Property | gyroRange |
| Property | sampleRate |
| Property | sampleRatePressure |
| Property | sampleRateMagnetometer |
| Property | mpu |
| Property | hig |
JumpSensor is a simulation of the JUMP sensor of the ZurichMove Project.
JumpSensor simulates one JUMP sensor of the ZurichMove Project. The JUMP sensor is a wearable sensor which can be used time synchronized with other JUMP sensors to track the movement of a person.
This class is a simulation of the JUMP sensor. It can be configured equally to the real JUMP sensor. It contains the models of the actual sensors of the JUMP sensor according to the datasheets of the sensors. The JUMP sensor simulation can be used to test the algorithms of the ZurichMove Project.
The JUMP sensor is equipped with the following sensors:
ADXL375 3-axis accelerometer (high-g)
see also the more detailed example in jumpSensorExample.m
Definition at line 40 of file JumpSensor.m.
| function JumpSensor | ( | in | args | ) |
JumpSensor is the constructor of the JUMP sensor.
JumpSensor creates a JUMP sensor with the given settings. The settings are the same as in the JUMPconnect software. The JUMP sensor can be used to generate sensor data from true data.
| accRange | (optional) - the acceleration range of the MPU9250 in g |
| gyroRange | (optional) - the gyroscope range of the MPU9250 in °/s |
| sampleRate | (optional) - the sample rate of the MPU9250 in Hz |
| sampleRatePressure | (optional) - the sample rate of the pressure and temperature sensor in Hz |
| obj | - the created JUMP sensor |
|
private |
createHig creates the ADXL375 sensor.
createHig creates the ADXL375 sensor with the settings specified in the properties of the JUMP sensor model.
| obj | (JumpSensor) - the JUMP sensor |
| none |
|
private |
createMpu creates the MPU9250 sensor.
createMpu creates the MPU9250 sensor with the settings specified in the properties of the JUMP sensor model.
| obj | (JumpSensor) - the JUMP sensor |
| none |
| function generate | ( | in | obj, |
| in | acc_true, | ||
| in | gyr_true, | ||
| in | ori_true, | ||
| in | options ) |
generate generates sensor data from true data.
generate generates sensor data from true data with the defined sensor models. The data format is identical to the data format of the parsing function of the function JUMPREADDATA.
| acc_true | (nx3 double) - the true accelerometer data in m/s^2 |
| gyr_true | (nx3 double) - the true gyroscope data in deg/s |
| ori_true | (nx1 quaternion) - the true orientation data in quaternions |
| options.alt_true | (nx1 double, optional) - the true altitude in m (default: 500 m) |
| options.tmp_true | (nx1 double, optional) - the true temperature in °C (default: 25°C) |
| options.t_start | (datetime, optional) - the start time of the sensor data (default: now) |
| options.simulate_mpu | (logical, optional) - simulate the MPU9250 sensor (default: true) |
| options.simulate_hig | (logical, optional) - simulate the ADXL375 sensor (default: true) |
| options.simulate_prs | (logical, optional) - simulate the MS5611 sensor (default: true) |
| options.simulate_tmp | (logical, optional) - simulate the temperature sensor (default: true) |
| data | (struct) - the sensor data in the format of the parsing function of the function JUMPREADDATA
|
\[ a_{patched} = -a + 2 \cdot [0,0,g], \]
before we call the imuSensor class.then the imuSensor class does\[ totalAcc = -a_{input} + [0,0, g] = -(-a + 2 \cdot [0,0,g]) + [0,0, +g] = a - [0,0,g], \]
which brings the correct result.| function generateFromTrajectory | ( | in | obj, |
| in | traj ) |
generates data from a Trajectory object.
generateFromTrajectory generates sensor data from a Trajectory object. The sensor data is generated with the defined sensor models.
| obj | (JumpSensor) - the JUMP sensor |
| traj | (Trajectory) - the trajectory object |
| data | (struct) - the sensor data in the format defined in generate |
|
staticprivate |
generateNoise generates noise with the given parameters.
generateNoise generates noise with the given parameters. The noise is generated with the following model:
| n | (1x1 double) - the number of samples |
| N | (1x1 double) - the noise density |
| K | (1x1 double) - the random walk coefficient |
| B | (1x1 double) - the bias instability coefficient |
| fs | (1x1 double) - the sample rate |
| noise | (nx1 double) - the generated noise |
|
staticprivate |
getMisalignmentMatrix returns a misalignment matrix for the accelerometer or gyroscope.
getMisalignmentMatrix returns a misalignment matrix for the accelerometer or gyroscope. The misalignment matrix is a 3x3 matrix which is used to rotate the sensor axes to the reference frame. The misalignment matrix is generated randomly.
| x | (1x1 double) - the typical misalignment of the x-axis in percent |
| y | (1x1 double) - the typical misalignment of the y-axis in percent |
| z | (1x1 double) - the typical misalignment of the z-axis in percent |
| sensitivity | (1x1 double) - the overall sensitivity error in percent |
| M | (3x3 double) - the misalignment matrix in percent |
| function getParams | ( | in | obj | ) |
returns the parameters of the JUMP sensor.
getParams returns the parameters of the JUMP sensor. The parameters are used to generate the erroneous sensor data.
| obj | (JumpSensor) - the JUMP sensor |
| params | (struct) - the parameters of the JUMP sensor
|
|
private |
getPressureFromAltitude returns the pressure from the altitude.
getPressureFromAltitude returns the pressure from the altitude. The pressure is modeled with the barometric formula and the actual sensor is modeled with noise and bias.
| obj | (JumpSensor) - the JUMP sensor |
| alt | (nx1 double) - the altitude in m |
| tmp | (nx1 double, optional) - the temperature in °C (default: 25°C) |
| prs_sealvl | (1x1 double, optional) - the pressure at sea level in mbar (default: 1013.25 mbar) |
| mbar | (nx1 double) - the pressure in mbar |
|
private |
getSensorTemperature returns the sensor temperature.
getSensorTemperature returns the sensor temperature with the actual sensor noise and bias.
| obj | (JumpSensor) - the JUMP sensor |
| tmp_true | (nx1 double) - the true temperature in °C |
| degC | (nx1 double) - the sensor temperature in °C |
|
staticprivate |
rant returns a typical value in the sense of datasheet typical values.
rant(lower) returns a typical random number with a symmetric distribution around zero, where the range is defined by the lower bound. The random number is gaussian distributed with lower been the two standard deviation range.
rant(lower, upper) returns a typical random number with a gaussian distribution with the given range.
rant(lower, upper, nstd) returns a typical random number with a gaussian distribution with nstd standard deviations.
| lower | (1x1 double) - the lower bound of the distribution |
| upper | (1x1 double) - the upper bound of the distribution |
| nstd | (1x1 double) - the number of standard deviations |
| number | (1x1 double) - the random number |
|
private |
Definition at line 47 of file JumpSensor.m.
|
private |
Definition at line 49 of file JumpSensor.m.
|
private |
Definition at line 61 of file JumpSensor.m.
|
private |
Definition at line 59 of file JumpSensor.m.
|
private |
Definition at line 51 of file JumpSensor.m.
|
private |
Definition at line 55 of file JumpSensor.m.
|
private |
Definition at line 53 of file JumpSensor.m.