1
0
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:
James Cotton 2012-06-15 16:01:15 -05:00
parent 495bb280c7
commit 416618a26f
3 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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);

View File

@ -76,6 +76,7 @@ public:
double latitude;
double longitude;
double altitude;
};
private: