mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Show the altitude on the map
This commit is contained in:
parent
495bb280c7
commit
416618a26f
@ -2538,7 +2538,7 @@ void OPMapGadgetWidget::doVisualizationChanged(QList<PathCompiler::waypoint> way
|
||||
foreach (PathCompiler::waypoint waypoint, waypoints) {
|
||||
internals::PointLatLng position(waypoint.latitude, waypoint.longitude);
|
||||
|
||||
WayPointItem * wayPointItem = m_map->WPCreate(position, 0, QString(index));
|
||||
WayPointItem * wayPointItem = m_map->WPCreate(position, waypoint.altitude, QString(index));
|
||||
Q_ASSERT(wayPointItem);
|
||||
if(wayPointItem) {
|
||||
wayPointItem->SetNumber(index);
|
||||
|
@ -335,6 +335,7 @@ struct PathCompiler::waypoint PathCompiler::UavoToInternal(Waypoint::DataFields
|
||||
|
||||
internalWaypoint.latitude = LLA[0];
|
||||
internalWaypoint.longitude = LLA[1];
|
||||
internalWaypoint.altitude = LLA[2];
|
||||
return internalWaypoint;
|
||||
}
|
||||
|
||||
@ -363,7 +364,7 @@ Waypoint::DataFields PathCompiler::InternalToUavo(waypoint internal)
|
||||
// TODO: Give the point a concept of altitude
|
||||
LLA[0] = internal.latitude;
|
||||
LLA[1] = internal.longitude;
|
||||
LLA[2] = -50;
|
||||
LLA[2] = internal.altitude;
|
||||
|
||||
Utils::CoordinateConversions().GetNED(homeLLA, LLA, NED);
|
||||
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
|
||||
double latitude;
|
||||
double longitude;
|
||||
double altitude;
|
||||
};
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user