Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
compass_calibrator_3D.h
Go to the documentation of this file.
1/***********************************************************************/
25#ifndef NAV_ALGORITHMS_COMPASS_CALIBRATOR_3D_H_
26#define NAV_ALGORITHMS_COMPASS_CALIBRATOR_3D_H_
27
28#include "embedded_memory.h"
29#include "embedded_math.h"
30#include "float3vector.h"
31#include "quaternion.h"
32
35{
36public:
37 enum { AXES=3, PARAMETERS=11, OBSERVATIONS=22};
38
40 : calibration_successful(false)
41 {
43 }
44
45 void start_learning( void)
46 {
47 for( unsigned i=0; i<OBSERVATIONS; ++i)
48 heading_sector_error[i]=1e20f;
49 }
50
53 bool calculate( void);
54 bool available( void) const
55 {
56 return calibration_successful;
57 }
58private:
59 float c[AXES][PARAMETERS];
60 float target_vector[AXES][OBSERVATIONS];
61 float observation_matrix[AXES][OBSERVATIONS][PARAMETERS];
62 float heading_sector_error[OBSERVATIONS];
63 bool calibration_successful;
64};
65
66#endif /* NAV_ALGORITHMS_COMPASS_CALIBRATOR_3D_H_ */
3 dimensional magnetic calibration and error compensation mechanism
bool learn(const float3vector &observed_induction, const float3vector &expected_induction, const quaternion< float > &q, bool turning_right, float error_margin)
float3vector calibrate(const float3vector &induction, const quaternion< float > &q)
mathematical vector of arbitrary type and size
Definition vector.h:40
defines platform-dependent algorithms and constants
settings to allow compiling embedded software on a PC target
quaternion for 3d attitude representation (template)