From de7fc817954ea39a74c4942f40021a90a2970316 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 1 Mar 2012 04:05:52 -0600 Subject: [PATCH] Fixes to the GPS LLA to NED translation --- flight/Modules/Attitude/revolution/attitude.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flight/Modules/Attitude/revolution/attitude.c b/flight/Modules/Attitude/revolution/attitude.c index ce8b8ed26..079c2599c 100644 --- a/flight/Modules/Attitude/revolution/attitude.c +++ b/flight/Modules/Attitude/revolution/attitude.c @@ -67,7 +67,7 @@ #include "CoordinateConversions.h" // Private constants -#define STACK_SIZE_BYTES 3540 +#define STACK_SIZE_BYTES 2540 #define TASK_PRIORITY (tskIDLE_PRIORITY+3) #define FAILSAFE_TIMEOUT_MS 10 @@ -694,8 +694,8 @@ float T[3]; const float DEG2RAD = 3.141592653589793f / 180.0f; static int32_t getNED(GPSPositionData * gpsPosition, float * NED) { - float dL[3] = {(gpsPosition->Latitude - homeLocation.Latitude) / 10.0e6 * DEG2RAD, - (gpsPosition->Longitude - homeLocation.Longitude) / 10.0e6 * DEG2RAD, + float dL[3] = {(gpsPosition->Latitude - homeLocation.Latitude) / 10.0e6f * DEG2RAD, + (gpsPosition->Longitude - homeLocation.Longitude) / 10.0e6f * DEG2RAD, (gpsPosition->Altitude - homeLocation.Altitude)}; NED[0] = T[0] * dL[0];