mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-19 23:28:32 -04:00
45ddbbf982
git-svn-id: https://arducopter.googlecode.com/svn/trunk@995 f9c3cf11-9bcb-44bc-f272-b75c42450872
27 lines
534 B
C++
27 lines
534 B
C++
#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
|