dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Calibration Class Reference

The Calibration class is a UI free algorithm that can be connected to any interfaces. As such it only communicates with the UI via signals and slots, but has no direct handles to any particular controls or widgets. More...

#include <calibration.h>

Inheritance diagram for Calibration:

Public Slots

void doStartBiasAndLeveling ()
 Start collecting data while vehicle is level. More...
 
void doStartNoBiasLeveling ()
 Start collecting data while vehicle is level. More...
 
void doStartOrientation ()
 Start collecting data while vehicle is in pure pitch. More...
 
void doStartSixPoint ()
 Start the six point calibration routine. More...
 
void doCancelSixPoint ()
 Cancels the six point calibration routine. More...
 
void doSaveSixPointPosition ()
 Indicates UAV is in a position to collect data during 6pt calibration. More...
 
void doStartTempCal ()
 Start collecting gyro temp calibration data. More...
 
void doAcceptTempCal ()
 Accept gyro temp calibration data. More...
 
void doCancelTempCalPoint ()
 Cancels the temperature calibration routine. More...
 
void configureTempCurves (TempCompCurve *x, TempCompCurve *y, TempCompCurve *z)
 Set up the curves. More...
 
void setTempCalRange (int r)
 Set temperature calibration range. More...
 

Signals

void calibrationBusy (bool busy)
 Indicate whether the calibration is busy. More...
 
void toggleControls (bool enable)
 Indicate whether to enable or disable controls. More...
 
void toggleSavePosition (bool enable)
 Indicate whether to enable or disable controls. More...
 
void updatePlane (int position)
 Change the UAV visualization. More...
 
void showSixPointMessage (QString message)
 Show an instruction to the user for six point calibration. More...
 
void showYawOrientationMessage (QString message)
 Show an instruction to the user for yaw orientation. More...
 
void showLevelingMessage (QString message)
 Show an instruction to the user for leveling. More...
 
void yawOrientationProgressChanged (int)
 Indicate what the progress is for yaw orientation. More...
 
void levelingProgressChanged (int)
 Indicate what the progress is for leveling. More...
 
void sixPointProgressChanged (int)
 Indicate what the progress is for six point collection. More...
 
void showTempCalMessage (QString message)
 Show an instruction or message from temperature calibration. More...
 
void tempCalProgressChanged (int)
 Indicate what the progress is for temperature calibration. More...
 
void calibrationCompleted ()
 Indicate that a calibration process has successfully completed and the results saved to UAVO. More...
 

Public Member Functions

 Calibration ()
 
 ~Calibration ()
 
void initialize (bool calibrateAccels, bool calibrateMags)
 Calibration::initialize Configure whether to calibrate the magnetometer and/or accelerometer during 6-point calibration. More...
 

Protected Types

enum  sensor_type { ACCEL, GYRO, MAG }
 

Protected Member Functions

void connectSensor (sensor_type sensor, bool connect)
 Connect and speed up or disconnect a sensor. More...
 
bool storeSixPointMeasurement (UAVObject *obj, int position)
 Store a measurement at this position and indicate if it is the last one. More...
 
bool storeYawOrientationMeasurement (UAVObject *obj)
 Store yaw orientation sample and compute orientation if finished. More...
 
bool storeLevelingMeasurement (UAVObject *obj)
 Store leveling sample and compute level if finished. More...
 
int computeScaleBias ()
 Computes the scale and bias for the accelerometer and mag. More...
 
void rotate_vector (double R[3][3], const double vec[3], double vec_out[3], bool transpose)
 Rotate a vector by the rotation matrix, optionally trasposing. More...
 
void Euler2R (double rpy[3], double Rbe[3][3])
 Compute a rotation matrix from a set of euler angles. More...
 
void resetSensorCalibrationToOriginalValues ()
 Reset sensor settings to pre-calibration values. More...
 
bool storeTempCalMeasurement (UAVObject *obj)
 Store a sample for temperature compensation. More...
 
int computeTempCal ()
 Compute temperature compensation factors. More...
 
void updateTempCompCalibrationDisplay ()
 Update the graphs with the temperature compensation. More...
 

Static Protected Member Functions

static double listMean (QList< double > list)
 Compute the mean value of a list. More...
 

SixPointInConstFieldCal

Compute the scale and bias assuming the data comes from six orientations in a constant field

x, y, z are vectors of six measurements

Computes sensitivity and offset such that:

c = S * A + b

where c is the measurement, S is the sensitivity, b is the bias offset, and A is the field being measured expressed as a ratio of the measured value to the field strength. aka a direction cosine.

A is what we really want and it is computed using the equation:

A = (c - b)/S

int SixPointInConstFieldCal (double ConstMag, double x[6], double y[6], double z[6], double S[3], double b[3])
 

Detailed Description

The Calibration class is a UI free algorithm that can be connected to any interfaces. As such it only communicates with the UI via signals and slots, but has no direct handles to any particular controls or widgets.

It performs a number of calibration routines, including six-point calibration for accelerometers and magnetometers, temperature compensation for gyros, calculating the rotation to level the accelerometers, and calculating the board orientation.

Definition at line 46 of file calibration.h.

Member Enumeration Documentation

enum Calibration::sensor_type
protected
Enumerator
ACCEL 
GYRO 
MAG 

Definition at line 226 of file calibration.h.

Member Function Documentation

void Calibration::calibrationBusy ( bool  busy)
signal

Indicate whether the calibration is busy.

void Calibration::calibrationCompleted ( )
signal

Indicate that a calibration process has successfully completed and the results saved to UAVO.

void Calibration::levelingProgressChanged ( int  )
signal

Indicate what the progress is for leveling.

static double Calibration::listMean ( QList< double >  list)
inlinestaticprotected

Compute the mean value of a list.

Definition at line 253 of file calibration.h.

void Calibration::showLevelingMessage ( QString  message)
signal

Show an instruction to the user for leveling.

void Calibration::showSixPointMessage ( QString  message)
signal

Show an instruction to the user for six point calibration.

void Calibration::showTempCalMessage ( QString  message)
signal

Show an instruction or message from temperature calibration.

void Calibration::showYawOrientationMessage ( QString  message)
signal

Show an instruction to the user for yaw orientation.

void Calibration::sixPointProgressChanged ( int  )
signal

Indicate what the progress is for six point collection.

void Calibration::tempCalProgressChanged ( int  )
signal

Indicate what the progress is for temperature calibration.

void Calibration::toggleControls ( bool  enable)
signal

Indicate whether to enable or disable controls.

void Calibration::toggleSavePosition ( bool  enable)
signal

Indicate whether to enable or disable controls.

void Calibration::updatePlane ( int  position)
signal

Change the UAV visualization.

void Calibration::yawOrientationProgressChanged ( int  )
signal

Indicate what the progress is for yaw orientation.


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