trikRuntime
trikControl::GyroSensorInterface Class Referenceabstract

Class that returns raw and processed data from the gyroscope. More...

#include <gyroSensorInterface.h>

Inheritance diagram for trikControl::GyroSensorInterface:
Collaboration diagram for trikControl::GyroSensorInterface:

Public Slots

virtual void calibrate (int msec)=0
 Calibrates bias value of sensor, sets new bias value, resets other values include tilt values. More...
 
virtual QVector< int > getCalibrationValues ()=0
 Returns vector with calibration values, which consists of 6 elements: 0-2 – gyroscope bias, 3-5 – average accelerometer values. More...
 
virtual void setCalibrationValues (const QVector< int > &values)=0
 Sets vector with calibration values to gyroscope sensor. More...
 
virtual bool isCalibrated () const =0
 Checks if bias is counted or not. More...
 
virtual QVector< int > readRawData () const =0
 Returns current raw reading of a sensor. More...
 
- Public Slots inherited from trikControl::VectorSensorInterface
virtual QVector< int > read () const =0
 Returns current raw reading of a sensor. More...
 

Signals

void calibrationFinished ()
 Emites when average mean of bias is counted. More...
 
- Signals inherited from trikControl::VectorSensorInterface
void newData (QVector< int > reading, const trikKernel::TimeVal &eventTime)
 Emitted when new sensor reading is ready. More...
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 
virtual Status status () const =0
 Returns current status of the device. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Class that returns raw and processed data from the gyroscope.

Member Function Documentation

virtual void trikControl::GyroSensorInterface::calibrate ( int  msec)
pure virtualslot

Calibrates bias value of sensor, sets new bias value, resets other values include tilt values.

Preffered duration of calibration – 15-20 seconds.

Parameters
msec- duration of calibration in milliseconds
void trikControl::GyroSensorInterface::calibrationFinished ( )
signal

Emites when average mean of bias is counted.

virtual QVector<int> trikControl::GyroSensorInterface::getCalibrationValues ( )
pure virtualslot

Returns vector with calibration values, which consists of 6 elements: 0-2 – gyroscope bias, 3-5 – average accelerometer values.

Updated values is available only after calibration is done.

virtual bool trikControl::GyroSensorInterface::isCalibrated ( ) const
pure virtualslot

Checks if bias is counted or not.

virtual QVector<int> trikControl::GyroSensorInterface::readRawData ( ) const
pure virtualslot

Returns current raw reading of a sensor.

virtual void trikControl::GyroSensorInterface::setCalibrationValues ( const QVector< int > &  values)
pure virtualslot

Sets vector with calibration values to gyroscope sensor.

It consists of 6 elements: 0-2 – gyroscope bias, 3-5 – average accelerometer values at rest.


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