mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
GCS-PathPlanner
Fixes UAVO to DataModel convertion.
This commit is contained in:
parent
06e56165c5
commit
a01930b12f
@ -143,7 +143,8 @@ void modelUavoProxy::objectsToModel()
|
||||
myModel->setData(index,wpfields.Velocity);
|
||||
distance=sqrt(wpfields.Position[Waypoint::POSITION_NORTH]*wpfields.Position[Waypoint::POSITION_NORTH]+
|
||||
wpfields.Position[Waypoint::POSITION_EAST]*wpfields.Position[Waypoint::POSITION_EAST]);
|
||||
bearing=acos(wpfields.Position[Waypoint::POSITION_NORTH]/wpfields.Position[Waypoint::POSITION_EAST])*180/M_PI;
|
||||
bearing=atan2(wpfields.Position[Waypoint::POSITION_EAST],wpfields.Position[Waypoint::POSITION_NORTH])*180/M_PI;
|
||||
|
||||
if(bearing!=bearing)
|
||||
bearing=0;
|
||||
index=myModel->index(x,flightDataModel::DISRELATIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user