mirror->removeChildren("wp");
int num = numWaypts();
+ double totalDistanceEnroute = 0.0;
+
for (int i = 0; i < num; i++) {
Waypt* wp = _route[i];
SGPropertyNode *prop = mirror->getChild("wp", i, 1);
next->courseAndDistanceFrom(pos);
prop->setDoubleValue("leg-bearing-true-deg", crsDist.first);
prop->setDoubleValue("leg-distance-nm", crsDist.second * SG_METER_TO_NM);
+ prop->setDoubleValue("distance-along-route-nm", totalDistanceEnroute);
+ totalDistanceEnroute += crsDist.second * SG_METER_TO_NM;
}
if (wp->altitudeRestriction() != RESTRICT_NONE) {
if (rmDlg) {
rmDlg->updateValues();
}
+
+ if (_departure) {
+ departure->setDoubleValue("field-elevation-ft", _departure->getElevation());
+ }
+
+ if (_destination) {
+ destination->setDoubleValue("field-elevation-ft", _destination->getElevation());
+ }
+
+ totalDistance->setDoubleValue(totalDistanceEnroute);
}
// command interface /autopilot/route-manager/input: