Skip to content

Commit

Permalink
Renamed 'unitless' into 'in digits'
Browse files Browse the repository at this point in the history
  • Loading branch information
jkerpe committed Nov 13, 2023
1 parent 92dd216 commit 04e35fe
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
26 changes: 13 additions & 13 deletions lib/HALInterfaces/IIMU.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
* Types and Classes
*****************************************************************************/

/** Struct of the raw, unitless and not yet converted IMU (=accelerometer, gyro or magnetometer) data in x, y and z
/** Struct of the raw and not yet converted IMU (=accelerometer, gyro or magnetometer) values in digits in x, y and z
* direction. */
typedef struct _IMUData
{
int16_t valueX; /* Raw sensor value in x direction (unitless) */
int16_t valueY; /* Raw sensor value in y direction (unitless) */
int16_t valueZ; /* Raw sensor value in z direction (unitless) */
int16_t valueX; /* Raw sensor value in x direction in digits */
int16_t valueY; /* Raw sensor value in y direction in digits */
int16_t valueZ; /* Raw sensor value in z direction in digits */
} __attribute__((packed)) IMUData;

/** The abstract IMU interface.
Expand Down Expand Up @@ -128,29 +128,29 @@ class IIMU
virtual bool magnetometerDataReady() = 0;

/**
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z.
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] accelerationValues Pointer to IMUData struct where the raw, unitless acceleration values in
* @param[in] accelerationValues Pointer to IMUData struct where the raw acceleration values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
virtual const void getAccelerationValues(IMUData* accelerationValues) = 0;

/**
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z.
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] turnRates Pointer to IMUData struct where the raw, unitless turn Rates in x, y and z
* @param[in] turnRates Pointer to IMUData struct where the raw turn Rates in digits in x, y and z
* direction will be written into. The values can be converted into physical values in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/bit.
* with a sensitivity factor in mrad/s/digit.
*/
virtual const void getTurnRates(IMUData* turnRates) = 0;

/**
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z.
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] magnetometerValues Pointer to IMUData struct where the raw, unitless magnetometer values in
* @param[in] magnetometerValues Pointer to IMUData struct where the raw magnetometer values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mgauss via the
* multiplication with a sensitivity factor in mgauss/bit.
* multiplication with a sensitivity factor in mgauss/digit.
*/
virtual const void getMagnetometerValues(IMUData* magnetometerValues) = 0;

Expand Down
18 changes: 9 additions & 9 deletions lib/HALSim/IMU.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,29 +158,29 @@ class IMU : public IIMU
}

/**
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z.
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] accelerationValues Pointer to IMUData struct where the raw, unitless acceleration values in
* @param[in] accelerationValues Pointer to IMUData struct where the raw acceleration values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
void const getAccelerationValues(IMUData* accelerationValues);

/**
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z.
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] turnRates Pointer to IMUData struct where the raw, unitless turn Rates in x, y and z
* @param[in] turnRates Pointer to IMUData struct where the raw turn Rates in digits in x, y and z
* direction will be written into. The values can be converted into physical values in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/bit.
* with a sensitivity factor in mrad/s/digit.
*/
void const getTurnRates(IMUData* turnRates);

/**
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z.
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] magnetometerValues Pointer to IMUData struct where the raw, unitless magnetometer values in
* @param[in] magnetometerValues Pointer to IMUData struct where the raw magnetometer values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mgauss via the
* multiplication with a sensitivity factor in mgauss/bit.
* multiplication with a sensitivity factor in mgauss/digit.
*/
void const getMagnetometerValues(IMUData* magnetometerValues);

Expand Down
18 changes: 9 additions & 9 deletions lib/HALTarget/IMU.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,29 @@ class IMU : public IIMU
bool magnetometerDataReady();

/**
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z.
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] accelerationValues Pointer to IMUData struct where the raw, unitless acceleration values in
* @param[in] accelerationValues Pointer to IMUData struct where the raw acceleration values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
const void getAccelerationValues(IMUData* accelerationValues);

/**
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z.
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] turnRates Pointer to IMUData struct where the raw, unitless turn Rates in x, y and z
* @param[in] turnRates Pointer to IMUData struct where the raw turn Rates in digits in x, y and z
* direction will be written into. The values can be converted into physical values in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/bit.
* with a sensitivity factor in mrad/s/digit.
*/
const void getTurnRates(IMUData* turnRates);

/**
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z.
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] magnetometerValues Pointer to IMUData struct where the raw, unitless magnetometer values in
* @param[in] magnetometerValues Pointer to IMUData struct where the raw magnetometer values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mgauss via the
* multiplication with a sensitivity factor in mgauss/bit.
* multiplication with a sensitivity factor in mgauss/digit.
*/
const void getMagnetometerValues(IMUData* magnetometerValues);

Expand Down
18 changes: 9 additions & 9 deletions lib/HALTest/IMU.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,33 +131,33 @@ class IMU : public IIMU
}

/**
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z.
* Get last raw Accelerometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] accelerationValues Pointer to IMUData struct where the raw, unitless acceleration values in
* @param[in] accelerationValues Pointer to IMUData struct where the raw acceleration values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
const void getAccelerationValues(IMUData* accelerationValues)
{
}

/**
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z.
* Get last raw Gyroscope values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] turnRates Pointer to IMUData struct where the raw, unitless turn Rates in x, y and z
* @param[in] turnRates Pointer to IMUData struct where the raw turn Rates in digits in x, y and z
* direction will be written into. The values can be converted into physical values in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/bit.
* with a sensitivity factor in mrad/s/digit.
*/
const void getTurnRates(IMUData* turnRates)
{
}

/**
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z.
* Get last raw Magnetometer values as an IMUData struct containing values in x, y and z in digits.
*
* @param[in] magnetometerValues Pointer to IMUData struct where the raw, unitless magnetometer values in
* @param[in] magnetometerValues Pointer to IMUData struct where the raw magnetometer values in digits in
* x, y and z direction will be written into. The values can be converted into physical values in mgauss via the
* multiplication with a sensitivity factor in mgauss/bit.
* multiplication with a sensitivity factor in mgauss/digit.
*/
const void getMagnetometerValues(IMUData* magnetometerValues)
{
Expand Down
26 changes: 13 additions & 13 deletions lib/SensorFusion/SerialMuxChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,33 @@ typedef struct _SensorData
/** Orientation in mrad calculated by odometry. */
int32_t orientationOdometry;

/** Acceleration in x direction as a raw sensor value in bit.
* This is a unitless bit value. It can be converted into a physical acceleration value in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
/** Acceleration in x direction as a raw sensor value in digits.
* It can be converted into a physical acceleration value in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
int16_t accelerationX;

/** Acceleration in y direction as a raw sensor value in bit.
* This is a unitless bit value. It can be converted into a physical acceleration value in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/bit.
/** Acceleration in y direction as a raw sensor value in digits.
* It can be converted into a physical acceleration value in mm/s^2 via the
* multiplication with a sensitivity factor in mm/s^2/digit.
*/
int16_t accelerationY;

/** Magnetometer value in x direction as a raw sensor value in bit.
* This is a unitless bit value. It does not require conversion into a physical magnetometer value since only the
/** Magnetometer value in x direction as a raw sensor value in digits.
* It does not require conversion into a physical magnetometer value since only the
* ratio with the value in y direction is important.
*/
int16_t magnetometerValueX;

/** Magnetometer value in y direction as a raw sensor value in bit.
* This is a unitless bit value. It does not require conversion into a physical magnetometer value since only the
/** Magnetometer value in y direction as a raw sensor value in digits.
* It does not require conversion into a physical magnetometer value since only the
* ratio with the value in x direction is important.
*/
int16_t magnetometerValueY;

/** Gyroscope value around z axis as a raw sensor value in bit.
* This is a unitless bit value. It can be converted into a physical turn rate in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/bit.
/** Gyroscope value around z axis as a raw sensor value in digits.
* It can be converted into a physical turn rate in mrad/s via the multiplication
* with a sensitivity factor in mrad/s/digit.
*/
int16_t turnRate;
} __attribute__((packed)) SensorData;
Expand Down

0 comments on commit 04e35fe

Please sign in to comment.