You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef Compass_h
|
|
|
|
#define Compass_h
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <AP_Math.h>
|
|
|
|
|
|
|
|
class Compass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int magX;
|
|
|
|
int magY;
|
|
|
|
int magZ;
|
|
|
|
float heading;
|
|
|
|
float headingX;
|
|
|
|
float headingY;
|
|
|
|
unsigned long lastUpdate;
|
|
|
|
|
|
|
|
//
|
|
|
|
virtual bool init(int initialiseWireLib = 1);
|
|
|
|
virtual void read();
|
|
|
|
virtual void calculate(float roll, float pitch);
|
|
|
|
virtual void setOrientation(const Matrix3f &rotationMatrix);
|
|
|
|
virtual void setOffsets(int x, int y, int z);
|
|
|
|
virtual void setDeclination(float radians);
|
|
|
|
};
|
|
|
|
#endif
|