2010-08-29 20:03:49 -03:00
|
|
|
#ifndef Compass_h
|
|
|
|
#define Compass_h
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
2010-11-14 22:15:16 -04:00
|
|
|
#include <AP_Math>
|
2010-08-29 20:03:49 -03:00
|
|
|
|
|
|
|
class Compass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void init();
|
|
|
|
virtual void update();
|
|
|
|
virtual void calculate(float roll, float pitch);
|
|
|
|
|
2010-11-14 22:15:16 -04:00
|
|
|
Vector3f mag;
|
2010-08-29 20:03:49 -03:00
|
|
|
int16_t mag_X;
|
|
|
|
int16_t mag_Y;
|
|
|
|
int16_t mag_Z;
|
2010-08-29 21:09:47 -03:00
|
|
|
int32_t ground_course;
|
2010-08-29 20:03:49 -03:00
|
|
|
float heading;
|
|
|
|
float heading_X;
|
|
|
|
float heading_Y;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|