RNAV: use runway departure end for previous wpt.
Should fix leg computation following a runway waypt.
This commit is contained in:
parent
6b9aa0fb97
commit
cc2a78b70b
1 changed files with 10 additions and 3 deletions
|
@ -464,9 +464,16 @@ SGGeod GPS::previousLegWaypointPosition(bool& isValid)
|
||||||
Waypt* waypt = leg->waypoint();
|
Waypt* waypt = leg->waypoint();
|
||||||
if (waypt) {
|
if (waypt) {
|
||||||
isValid = true;
|
isValid = true;
|
||||||
|
// ensure computations use runway end, not threshold
|
||||||
|
if (waypt->type() == "runway") {
|
||||||
|
RunwayWaypt* rwpt = static_cast<RunwayWaypt*>(waypt);
|
||||||
|
return rwpt->runway()->end();
|
||||||
|
}
|
||||||
|
|
||||||
return waypt->position();
|
return waypt->position();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isValid = false;
|
isValid = false;
|
||||||
return SGGeod();
|
return SGGeod();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue