SGGeod FGRunwayBase::pointOnCenterline(double aOffset) const
{
- SGGeod result;
- double dummyAz2;
double halfLengthMetres = lengthM() * 0.5;
- SGGeodesy::direct(mPosition, _heading,
- aOffset - halfLengthMetres,
- result, dummyAz2);
+ SGGeod result = SGGeodesy::direct(mPosition, _heading,
+ aOffset - halfLengthMetres);
+ result.setElevationM(mPosition.getElevationM());
+
return result;
}
-
-
SGGeod FGRunwayBase::pointOffCenterline(double aOffset, double lateralOffset) const
{
SGGeod result;
double lat = sqlite3_column_double(loadPositioned, 6);
double elev = sqlite3_column_double(loadPositioned, 7);
SGGeod pos = SGGeod::fromDegM(lon, lat, elev);
-
+
reset(loadPositioned);
switch (ty) {
// compute the new runway center, based on the threshold lat/lon and length,
double offsetFt = (0.5 * d->runwayLengthFt(runwayID));
- SGGeod newCenter;
- double dummy;
- SGGeodesy::direct(aThreshold, aHeading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);
-
+ SGGeod newCenter= SGGeodesy::direct(aThreshold, aHeading, offsetFt * SG_FEET_TO_METER);
+ newCenter.setElevationM(aThreshold.getElevationM());
+
// now update the positional data
updatePosition(runwayID, newCenter);
}