1
0
Fork 0

Fix displaced threshold handling when using in-scenery definitions of runways.

This commit is contained in:
jmt 2009-12-05 10:55:55 +00:00 committed by Tim Moore
parent 6fcd9f967b
commit e9a9ad6478

View file

@ -151,9 +151,8 @@ void FGRunway::processThreshold(SGPropertyNode* aThreshold)
_displ_thresh = aThreshold->getDoubleValue("displ-m") * SG_METER_TO_FEET; _displ_thresh = aThreshold->getDoubleValue("displ-m") * SG_METER_TO_FEET;
_stopway = aThreshold->getDoubleValue("stopw-m") * SG_METER_TO_FEET; _stopway = aThreshold->getDoubleValue("stopw-m") * SG_METER_TO_FEET;
// compute the new runway center, based on the threshold lat/lon, length, // compute the new runway center, based on the threshold lat/lon and length,
// and any displaced threshold. double offsetFt = (0.5 * _length);
double offsetFt = (0.5 * _length) - _displ_thresh;
SGGeod newCenter; SGGeod newCenter;
double dummy; double dummy;
SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy); SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);