![]() |
Limb Range Analyzer
Cross-platform application for human limb range analysis.
|
Introduces possibilities of retrieved sensor data processing. More...
#include <sensormodule.hpp>
Signals | |
| void | SensorModule_SignalProvideResults () |
| Signal that gets emitted when measurement results are ready to be presented in the main UI class. | |
Public Member Functions | |
| SensorModule () | |
| Default constructor of class SensorModule. More... | |
| ~SensorModule () | |
| Default destructor function. More... | |
| void | SensorModule_SetSensorValues (const QString &hexValue) |
| Provides received string splitting and further processing. More... | |
| void | SensorModule_ProcessSensorComponent (const QString &hexValue, DeviceType deviceType) |
| This member function retrieves accelerometer and gyroscope measurements dispatched by a BlueCoin device and estimates its rotation. More... | |
| qreal | SensorModule_ConvertAccelerometerValue (qint32 accValue) |
| Member function that converts raw accelerometer value to required form. More... | |
| qreal | SensorModule_ConvertGyroscopeValue (qint32 gyroValue) |
| This member function manages conversion of raw gyroscope value so that it can be further used. More... | |
| void | SensorModule_SetProcessingStatus (ProcessingSelection processingSelected, DeviceType deviceType) |
| Function that sets SensorComponent variables through processing type and device selection parameters. More... | |
| void | SensorModule_SetCombinedMin (qint16 combinedMin) |
Setter member function of mCombinedMin member variable. More... | |
| void | SensorModule_SetCombinedMax (qint16 combinedMax) |
Setter member function of mCombinedMax member variable. More... | |
| void | SensorModule_ResetMeasurement (DeviceType deviceType) |
| Function that manages exercise related measurement variables resetting to their initial state. More... | |
| qint32 | SensorModule_GetAccelerometerX (DeviceType deviceType) |
Getter function established for mAccelerometerX. More... | |
| qint32 | SensorModule_GetAccelerometerY (DeviceType deviceType) |
Getter function established for mAccelerometerY. More... | |
| qint32 | SensorModule_GetAccelerometerZ (DeviceType deviceType) |
Getter function established for mAccelerometerZ. More... | |
| qint32 | SensorModule_GetGyroscopeX (DeviceType deviceType) |
Getter function established for mGyroscopeX. More... | |
| qint32 | SensorModule_GetGyroscopeY (DeviceType deviceType) |
Getter function established for mGyroscopeY. More... | |
| qint32 | SensorModule_GetGyroscopeZ (DeviceType deviceType) |
Getter function established for mGyroscopeZ. More... | |
| qint16 | SensorModule_GetCurrentRoll (DeviceType deviceType) |
| Getter member function retrieving current roll value. More... | |
| qint16 | SensorModule_GetCurrentPitch (DeviceType deviceType) |
| Getter member function retrieving current pitch value. More... | |
| qint16 | SensorModule_GetCurrentYaw (DeviceType deviceType) |
| Getter member function retrieving current yaw value. More... | |
| qint16 | SensorModule_GetCurrentMin (DeviceType deviceType) |
| Getter function that returns currently measured minimum. More... | |
| qint16 | SensorModule_GetCurrentMax (DeviceType deviceType) |
| Getter function that returns currently measured maximum. More... | |
| qint16 | SensorModule_GetCurrentRange (DeviceType deviceType) |
| Getter function that returns currently measured range. More... | |
| qint16 | SensorModule_GetCurrentAngle (DeviceType deviceType) |
| Getter function that returns currently measured angle. More... | |
| qint16 | SensorModule_GetCombinedMin () |
| Getter for mCombinedMin member variable. More... | |
| qint16 | SensorModule_GetCombinedMax () |
| Getter for mCombinedMax member variable. More... | |
Private Attributes | |
| SensorComponent | mComponent |
| SensorComponent is a member representing currently processed sensor measurement structure. | |
| SensorComponent | mPrimaryComponent |
| SensorComponent, a member representing primary device related sensor measurement structure. | |
| SensorComponent | mSecondaryComponent |
| SensorComponent is member representing secondary device related sensor measurement structure. | |
| QString | mFullHexValue |
| QString, a text string member variable that holds the entire Bluetooth received hexadecimal-form data. More... | |
| QString | mHexValue |
| QString, a text string member variable that holds Bluetooth received measurement data. More... | |
| QString | mAuxiliary |
| QString, a helper text member variable that separates parts of received hexadecimal string. | |
| qint16 | mCombinedMin |
| qint16 numerical value that holds dual devices estimated minimum angle reached. | |
| qint16 | mCombinedMax |
| qint16 numerical value that holds dual devices estimated maximum angle reached. | |
| bool | mConversionOK |
bool value that in its TRUE state confirms successful hexadecimal string to number conversion, FALSE otherwise. | |
Introduces possibilities of retrieved sensor data processing.
This class uses obtained BlueCoin sensor data and manages its processing. This project module relies on SensorComponent struct that is maintained for single or both active Bluetooth connections.
| SensorModule::SensorModule | ( | ) |
Default constructor of class SensorModule.
This function is responsible for member variables initialization.
| SensorModule::~SensorModule | ( | ) |
Default destructor function.
Destructor function for class SensorModule.
| qreal SensorModule::SensorModule_ConvertAccelerometerValue | ( | qint32 | accValue | ) |
Member function that converts raw accelerometer value to required form.
A member function that uses raw accelerometer data transmitted by a BlueCoin device and reshapes it into needed form that is further used by a filtering algorithm, while accelerometer range and IMU maximum range values are used.
| accValue | - raw accelerometer value |
| qreal SensorModule::SensorModule_ConvertGyroscopeValue | ( | qint32 | gyroValue | ) |
This member function manages conversion of raw gyroscope value so that it can be further used.
Function that serves as a converter of raw gyroscope value that uses gyroscope DPS parameter and IMU maximum range constants.
| gyroValue | - raw gyroscope value |
| qint32 SensorModule::SensorModule_GetAccelerometerX | ( | DeviceType | deviceType | ) |
Getter function established for mAccelerometerX.
Function that returns mAccelerometerX value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint32 SensorModule::SensorModule_GetAccelerometerY | ( | DeviceType | deviceType | ) |
Getter function established for mAccelerometerY.
Function that returns mAccelerometerY value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint32 SensorModule::SensorModule_GetAccelerometerZ | ( | DeviceType | deviceType | ) |
Getter function established for mAccelerometerZ.
Function that returns mAccelerometerZ value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCombinedMax | ( | ) |
Getter for mCombinedMax member variable.
Function provides current mCombinedMax value that is used for dual-device maximum measurement.
| qint16 SensorModule::SensorModule_GetCombinedMin | ( | ) |
Getter for mCombinedMin member variable.
Function provides current mCombinedMin value that is used for dual-device minimum measurement.
| qint16 SensorModule::SensorModule_GetCurrentAngle | ( | DeviceType | deviceType | ) |
Getter function that returns currently measured angle.
This member function is used in order to obtain latest angle.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentMax | ( | DeviceType | deviceType | ) |
Getter function that returns currently measured maximum.
This member function is used in order to obtain latest maximum value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentMin | ( | DeviceType | deviceType | ) |
Getter function that returns currently measured minimum.
This member function is used in order to obtain latest minimum value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentPitch | ( | DeviceType | deviceType | ) |
Getter member function retrieving current pitch value.
Member function that serves for retrieval of pitch angle value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentRange | ( | DeviceType | deviceType | ) |
Getter function that returns currently measured range.
This member function is used in order to obtain latest range value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentRoll | ( | DeviceType | deviceType | ) |
Getter member function retrieving current roll value.
Member function that serves for retrieval of roll angle value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint16 SensorModule::SensorModule_GetCurrentYaw | ( | DeviceType | deviceType | ) |
Getter member function retrieving current yaw value.
Member function that serves for retrieval of yaw angle value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint32 SensorModule::SensorModule_GetGyroscopeX | ( | DeviceType | deviceType | ) |
Getter function established for mGyroscopeX.
Function that returns mGyroscopeX value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint32 SensorModule::SensorModule_GetGyroscopeY | ( | DeviceType | deviceType | ) |
Getter function established for mGyroscopeY.
Function that returns mGyroscopeY value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| qint32 SensorModule::SensorModule_GetGyroscopeZ | ( | DeviceType | deviceType | ) |
Getter function established for mGyroscopeZ.
Function that returns mGyroscopeZ value.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| void SensorModule::SensorModule_ProcessSensorComponent | ( | const QString & | hexValue, |
| DeviceType | deviceType | ||
| ) |
This member function retrieves accelerometer and gyroscope measurements dispatched by a BlueCoin device and estimates its rotation.
A key part of SensorModule class that uses accelerometer and gyroscope data that gets processed in order to estimate device rotation - roll, pitch and yaw. Calculated angle, minimum, maximum and range values are also updated based on 3D space axis used when evaluating selected exercise.
| hexValue | - hexadecimal measurement string |
| deviceType | - selection parameter of primary or secondary Bluetooth device |
| void SensorModule::SensorModule_ResetMeasurement | ( | DeviceType | deviceType | ) |
Function that manages exercise related measurement variables resetting to their initial state.
Member function that re-sets rotation variables along with current angle, minimum, maximum and range of a selected device.
| deviceType | - parameter distinguishing primary and secondary measurement device |
| void SensorModule::SensorModule_SetCombinedMax | ( | qint16 | combinedMax | ) |
Setter member function of mCombinedMax member variable.
This function manages mCombinedMax setting according to parameter value.
| combinedMax | - numerical parameter of combined maximum value |
| void SensorModule::SensorModule_SetCombinedMin | ( | qint16 | combinedMin | ) |
Setter member function of mCombinedMin member variable.
This function manages mCombinedMin setting according to parameter value.
| combinedMin | - numerical parameter of combined minimum value |
| void SensorModule::SensorModule_SetProcessingStatus | ( | ProcessingSelection | processingSelected, |
| DeviceType | deviceType | ||
| ) |
Function that sets SensorComponent variables through processing type and device selection parameters.
Measurement related SensorComponent properties are set accordingly to exercise related axis used and selected BlueCoin device. Processing is either stopped through SensorModule_ResetMeasurement or established for new measurement needs.
| processingSelected | - choice whether X/Y or Z axis is used |
| deviceType | - selection of primary or secondary device |
| void SensorModule::SensorModule_SetSensorValues | ( | const QString & | hexValue | ) |
Provides received string splitting and further processing.
This function manages the division of obtained hexadecimal string that will be processed through filtration (via SensorComponent) and then prepared for user interface presentation. When the necessary data describing three-dimensional rotation is ready, this function manages emitting of SensorModule_SignalProvideResults signal. Note that this member function is triggered immediately after Bluetooth manages characteristics reading.
| hexValue | - hexadecimal measurement string |
|
private |
QString, a text string member variable that holds the entire Bluetooth received hexadecimal-form data.
This string may include data from both BlueCoin devices.
|
private |
QString, a text string member variable that holds Bluetooth received measurement data.
This string includes one BlueCoin device data only.