mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Ground/OPMap & Coordinate conversions: Keep units in cm throughout
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1762 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ba0fb92853
commit
6fe9a12358
@ -133,7 +133,7 @@ int CoordinateConversions::GetLLA(double BaseECEFcm[3], double NED[3], double po
|
||||
{
|
||||
int i;
|
||||
// stored value is in cm, convert to m
|
||||
double BaseECEFm[3] = {BaseECEFcm[0] / 100, BaseECEFcm[1] / 100, BaseECEFcm[2] / 100};
|
||||
double BaseECEFm[3] = {BaseECEFcm[0], BaseECEFcm[1], BaseECEFcm[2]};
|
||||
double BaseLLA[3];
|
||||
double ECEF[3];
|
||||
double Rne [3][3];
|
||||
|
@ -1461,9 +1461,9 @@ QPointF OPMapGadgetWidget::getLatLon()
|
||||
UAVObject *obj;
|
||||
|
||||
obj = dynamic_cast<UAVDataObject*>(m_objManager->getObject(QString("HomeLocation")));
|
||||
BaseECEF[0] = obj->getField(QString("ECEF"))->getDouble(0);
|
||||
BaseECEF[1] = obj->getField(QString("ECEF"))->getDouble(1);
|
||||
BaseECEF[2] = obj->getField(QString("ECEF"))->getDouble(2);
|
||||
BaseECEF[0] = obj->getField(QString("ECEF"))->getDouble(0) / 100;
|
||||
BaseECEF[1] = obj->getField(QString("ECEF"))->getDouble(1) / 100;
|
||||
BaseECEF[2] = obj->getField(QString("ECEF"))->getDouble(2) / 100;
|
||||
|
||||
obj = dynamic_cast<UAVDataObject*>(m_objManager->getObject(QString("PositionActual")));
|
||||
NED[0] = obj->getField(QString("North"))->getDouble() / 100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user