displ_thresh2, stopway2, surface_code, true);
runways.push_back(reciprocal);
+
+ rwy->setReciprocalRunway(reciprocal);
+ reciprocal->setReciprocalRunway(rwy);
}
}
pos, heading_2, length, width,
displ_thresh2, stopway2, surface_code, true);
runways.push_back(reciprocal);
+
+ rwy->setReciprocalRunway(reciprocal);
+ reciprocal->setReciprocalRunway(rwy);
}
void parseWaterRunwayLine850(const vector<string>& token)
pos, heading_2, length, width,
0.0, 0.0, 13, true);
runways.push_back(reciprocal);
+
+ rwy->setReciprocalRunway(reciprocal);
+ reciprocal->setReciprocalRunway(rwy);
}
void parseHelipadLine850(const vector<string>& token)
bool reciprocal) :
FGRunwayBase(RUNWAY, cleanRunwayNo(aIdent), aGeod, heading, length, width, surface_code, true),
_airport(aAirport),
- _reciprocal(reciprocal),
+ _isReciprocal(reciprocal),
+ _reciprocal(NULL),
_displ_thresh(displ_thresh),
_stopway(stopway),
_ils(NULL)
SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);
mPosition = newCenter;
}
+
+void FGRunway::setReciprocalRunway(FGRunway* other)
+{
+ assert(_reciprocal==NULL);
+ assert((other->_reciprocal == NULL) || (other->_reciprocal == this));
+
+ _reciprocal = other;
+}
+
class FGRunway : public FGRunwayBase
{
FGAirport* _airport;
- bool _reciprocal;
+ bool _isReciprocal;
+ FGRunway* _reciprocal;
double _displ_thresh;
double _stopway;
FGNavRecord* _ils;
* over runways to avoid counting runways twice, if desired.
*/
bool isReciprocal() const
- { return _reciprocal; }
+ { return _isReciprocal; }
/**
* Get the runway begining point - this is syntatic sugar, equivalent to
FGNavRecord* ILS() const { return _ils; }
void setILS(FGNavRecord* nav) { _ils = nav; }
+ FGRunway* reciprocalRunway() const
+ { return _reciprocal; }
+ void setReciprocalRunway(FGRunway* other);
+
/**
* Helper to process property data loaded from an ICAO.threshold.xml file
*/