XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions
LinearAcceleration

Virtual LinearAcceleration Sensor based on BMI160. More...

+ Collaboration diagram for LinearAcceleration:

Files

file  BCDS_LinearAcceleration.h
 

Data Structures

struct  LinearAcceleration_XyzGData_S
 
struct  LinearAcceleration_XyzLsbData_S
 
struct  LinearAcceleration_XyzMps2Data_S
 

Typedefs

typedef float LinearAcceleration_GData_T
 
typedef void * LinearAcceleration_HandlePtr_T
 
typedef int32_t LinearAcceleration_LsbData_T
 
typedef float LinearAcceleration_Mps2Data_T
 
typedef enum
LinearAcceleration_Status_E 
LinearAcceleration_Status_T
 
typedef enum
LinearAcceleration_Status_E
LinearAcceleration_StatusPtr_T
 
typedef struct
LinearAcceleration_XyzGData_S 
LinearAcceleration_XyzGData_T
 
typedef struct
LinearAcceleration_XyzGData_S
LinearAcceleration_XyzGDataPtr_T
 
typedef struct
LinearAcceleration_XyzLsbData_S 
LinearAcceleration_XyzLsbData_T
 
typedef struct
LinearAcceleration_XyzLsbData_S
LinearAcceleration_XyzLsbDataPtr_T
 
typedef struct
LinearAcceleration_XyzMps2Data_S 
LinearAcceleration_XyzMps2Data_T
 
typedef struct
LinearAcceleration_XyzMps2Data_S
LinearAcceleration_XyzMps2DataPtr_T
 

Enumerations

enum  LinearAcceleration_Status_E
 

Functions

Retcode_T LinearAcceleration_deInit (void)
 Deinitializes the linear acceleration sensor. More...
 
Retcode_T LinearAcceleration_init (LinearAcceleration_HandlePtr_T handle)
 Initializes the linear acceleration sensor sensor. More...
 
Retcode_T LinearAcceleration_readXyzGValue (LinearAcceleration_XyzGDataPtr_T linearAccelerationData)
 Reads 'g' xyz values from linear acceleration. More...
 
Retcode_T LinearAcceleration_readXyzLsbValue (LinearAcceleration_XyzLsbDataPtr_T linearAccelerationData)
 Reads 'LSB' xyz values from linear acceleration. More...
 
Retcode_T LinearAcceleration_readXyzMps2Value (LinearAcceleration_XyzMps2DataPtr_T linearAccelerationData)
 Reads 'm/(s^2)' xyz values from linear acceleration. More...
 

Detailed Description

LinearAcceleration is a virtual sensor that provides linear acceleration data.
i.e., Zero-g offsets are removed from the acceleration data.

Accelerometer Calibration method :
Accelerometer calibration is done by rotating the device to +/-90 degrees in all axis.
It takes some time for the accelerometer to calibrate.

LinearAcceleration data is read in three different units.

Note
- To know the accuracy of calibration done, use LinearAcceleration_getStatus() API
- To get proper linear acceleration data, make sure that the calibration accuracy is LINEARACCELERATION_HIGH before reading the data.

Limitations of linear acceleration:
This sensor cannot be used while using virtual sensor fingerPrint.


Data Structure Documentation

struct LinearAcceleration_XyzGData_S

Struct that holds linear acceleration data in g units

Data Fields

CalibratedAccel_GData_T xAxisData
 
CalibratedAccel_GData_T yAxisData
 
CalibratedAccel_GData_T zAxisData
 

Field Documentation

linear acceleration x-axis g data

linear acceleration y-axis g data

linear acceleration z-axis g data

struct LinearAcceleration_XyzLsbData_S

Struct that holds linear acceleration data in lsb units

Data Fields

CalibratedAccel_LsbData_T xAxisData
 
CalibratedAccel_LsbData_T yAxisData
 
CalibratedAccel_LsbData_T zAxisData
 

Field Documentation

linear acceleration x-axis lsb data

linear acceleration y-axis lsb data

linear acceleration z-axis lsb data

struct LinearAcceleration_XyzMps2Data_S

Struct that holds linear acceleration data in m/s2 units

Data Fields

CalibratedAccel_Mps2Data_T xAxisData
 
CalibratedAccel_Mps2Data_T yAxisData
 
CalibratedAccel_Mps2Data_T zAxisData
 

Field Documentation

linear acceleration x-axis m/s2 data

linear acceleration y-axis m/s2 data

linear acceleration z-axis m/s2 data

Typedef Documentation

data type for linear acceleration g data

Defines the handle for linear acceleration object. This handle is required for the initialisation of linear acceleration

custom data types for linear acceleration data data type for linear acceleration lsb data

data type for linear acceleration m/s2 data

Enumeration Type Documentation

enum that defines calibration status of linear acceleration

Enumerator
LINEARACCELERATION_UNRELIABLE 

unreliable calibration status of linear acceleration

LINEARACCELERATION_LOW 

low calibration status of linear acceleration

LINEARACCELERATION_MEDIUM 

medium calibration status of linear acceleration

LINEARACCELERATION_HIGH 

high calibration status of linear acceleration

Function Documentation

Retcode_T LinearAcceleration_deInit ( void  )
Return values
RETCODE_OKLinear acceleration sensor De-initialization success.
RETCODE_FAILURELinear acceleration sensor De-initialization failure.
Warning
This API needs to be called when we require to stop the linear acceleration data reading.
Note
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T LinearAcceleration_init ( LinearAcceleration_HandlePtr_T  handle)
Parameters
[in]LinearAcceleration_HandlePtr_Tthe handle to the linear acceleration sensor object that should be initialized
Return values
RETCODE_OKlinear acceleration sensor initialization success.
RETCODE_NULL_POINTERIn case of invalid sensor handle.
RETCODE_UNINITIALIZEDIf called without initializing the sensor.
Warning
This API needs to be called before calling any other function of the linear acceleration sensor.
Note
Refer #XdkSensorHandle.h for selecting the proper handle.
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T LinearAcceleration_readXyzGValue ( LinearAcceleration_XyzGDataPtr_T  linearAccelerationData)
Parameters
[out]linearAccelerationDataoutput parameter in which the linear acceleration data will be written to, from within the function
Return values
RETCODE_OKReading linear acceleration 'g' xyz value success.
RETCODE_UNINITIALIZEDIf called without initializing the sensor.
RETCODE_NULL_POINTERIn case linearAccelerationData is NULL pointer.
Note
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T LinearAcceleration_readXyzLsbValue ( LinearAcceleration_XyzLsbDataPtr_T  linearAccelerationData)
Parameters
[out]linearAccelerationDataoutput parameter in which the linear acceleration data will be written to, from within the function
Return values
RETCODE_OKReading linear acceleration xyzLsb value success.
RETCODE_UNINITIALIZEDIf called without initializing the sensor.
RETCODE_NULL_POINTERIn case linearAccelerationData is NULL pointer.
Note
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T LinearAcceleration_readXyzMps2Value ( LinearAcceleration_XyzMps2DataPtr_T  linearAccelerationData)
Parameters
[out]linearAccelerationDataoutput parameter in which the linear acceleration data will be written to, from within the function
Return values
RETCODE_OKReading linear acceleration 'm/(s^2)' xyz value success.
RETCODE_UNINITIALIZEDIf called without initializing the sensor.
RETCODE_NULL_POINTERIn case linearAccelerationData is NULL pointer.
Note
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:52 by doxygen 1.8.8