Browse Source

TransectStyleComplexItem.cc: Fix bug generating empty surveys when no terrain data:

Selecting terrain data on surverys was generating an empty survey if the polygon
was on an area where QGC doesn't have terrain height info about.

This is because QGC was waiting on terrain info to build the path on such surveys,
which is not needed at all, because terrain frame just specifies an altitude above
terrain, and relies on the vehicle for being able to calculate that height, by terrain
database or by altitude sensors, having terrain height information is not needed at all
to generate this kind of surveys
QGC4.4
davidsastresas 2 years ago committed by David Sastre
parent
commit
72f10e5282
  1. 8
      src/MissionManager/TransectStyleComplexItem.cc

8
src/MissionManager/TransectStyleComplexItem.cc

@ -422,12 +422,14 @@ void TransectStyleComplexItem::_rebuildTransects(void) @@ -422,12 +422,14 @@ void TransectStyleComplexItem::_rebuildTransects(void)
return;
case QGroundControlQmlGlobal::AltitudeModeRelative:
case QGroundControlQmlGlobal::AltitudeModeAbsolute:
// Not following terrain so we can build the flight path now
case QGroundControlQmlGlobal::AltitudeModeTerrainFrame:
// Terrain height not needed to calculate path, as TerrainFrame specifies a fixed altitude over terrain, doesn't need to know the actual terrain height
// so vehicle is responsible for having or not this altitude calculation, so we can build the flight path right away.
_buildFlightPathCoordInfoFromTransects();
break;
case QGroundControlQmlGlobal::AltitudeModeCalcAboveTerrain:
case QGroundControlQmlGlobal::AltitudeModeTerrainFrame:
// Query the terrain data. Once available flight path will be calculated
// Query the terrain data. Once available flight path will be calculated, as on this mode QGC actually calculates the individual altitude for each waypoint
// having into account terrain data.
_queryTransectsPathHeightInfo();
break;
}

Loading…
Cancel
Save