1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

Ground/CoordinateConversions: Shows correct location now. I just typed in a 3.14 constants and forgot to change to M_PI.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1520 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-09-04 05:58:43 +00:00 committed by peabody124
parent 544f15eadf
commit 8dbc382e5b
2 changed files with 4 additions and 3 deletions

View File

@ -250,7 +250,7 @@ static void setHomeLocation(GPSPositionData * gpsData)
home.Altitude = gpsData->Altitude + gpsData->GeoidSeparation;
// Compute home ECEF coordinates and the rotation matrix into NED
double LLA[3] = {(double) home.Latitude / 10e6, (double) home.Longitude / 10e6, (double) home.Altitude};
double LLA[3] = {((double) home.Latitude) / 10e6, ((double) home.Longitude) / 10e6, ((double) home.Altitude)};
double ECEF[3];
RneFromLLA(LLA, (float (*)[3]) home.RNE);
LLA2ECEF(LLA, ECEF);

View File

@ -30,9 +30,10 @@
#include "coordinateconversions.h"
#include <stdint.h>
#include <QDebug>
#include <math.h>
#define RAD2DEG (180.0/3.14)
#define DEG2RAD (3.14/180.0)
#define RAD2DEG (180.0/M_PI)
#define DEG2RAD (M_PI/180.0)
namespace Utils {