1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

added FY90Q buyild target to Makefile

fixed mag calibration finally I think...
heading + mag declination calculation done using better precision.
increased gyro bias calculation to 1000.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@163 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-06-14 03:35:23 +00:00
parent 572d5827cc
commit 8fb580d3f5
8 changed files with 2558 additions and 2850 deletions

View file

@ -246,8 +246,10 @@ static void getEstimatedAttitude(void)
#ifdef MAG
if (sensors(SENSOR_MAG)) {
// Attitude of the cross product vector GxM
heading = _atan2f(EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X, EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z) / 10;
heading = _atan2f(EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X, EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z);
heading = heading + magneticDeclination;
heading = heading / 10;
if (heading > 180)
heading = heading - 360;
else if (heading < -180)