1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Merge branch 'next' into thread/OP-39

This commit is contained in:
Fredrik Arvidsson 2012-08-02 19:51:36 +02:00
commit 40d5761a1d
4 changed files with 3 additions and 3 deletions

View File

@ -242,7 +242,7 @@ int WMM_GetMagVector(float Lat, float Lon, float AltEllipsoid, uint16_t Month, u
{ {
CoordGeodetic->lambda = Lon; CoordGeodetic->lambda = Lon;
CoordGeodetic->phi = Lat; CoordGeodetic->phi = Lat;
CoordGeodetic->HeightAboveEllipsoid = AltEllipsoid; CoordGeodetic->HeightAboveEllipsoid = AltEllipsoid/1000.0; // convert to km
// Convert from geodeitic to Spherical Equations: 17-18, WMM Technical report // Convert from geodeitic to Spherical Equations: 17-18, WMM Technical report
if (WMM_GeodeticToSpherical(CoordGeodetic, CoordSpherical) < 0) if (WMM_GeodeticToSpherical(CoordGeodetic, CoordSpherical) < 0)

View File

@ -66,7 +66,7 @@ static float GravityAccel(float latitude, float longitude, float altitude);
#ifdef PIOS_GPS_SETS_HOMELOCATION #ifdef PIOS_GPS_SETS_HOMELOCATION
// Unfortunately need a good size stack for the WMM calculation // Unfortunately need a good size stack for the WMM calculation
#define STACK_SIZE_BYTES 750 #define STACK_SIZE_BYTES 784
#else #else
#if defined(PIOS_GPS_MINIMAL) #if defined(PIOS_GPS_MINIMAL)
#define STACK_SIZE_BYTES 500 #define STACK_SIZE_BYTES 500

View File

@ -158,7 +158,7 @@ namespace Utils {
{ {
double Lat = LLA[0]; double Lat = LLA[0];
double Lon = LLA[1]; double Lon = LLA[1];
double AltEllipsoid = LLA[2]; double AltEllipsoid = LLA[2]/1000.0; // convert to km
// *********** // ***********
// range check supplied params // range check supplied params