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:
parent
544f15eadf
commit
8dbc382e5b
@ -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);
|
||||
|
@ -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 {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user