109 return std::optional<LegData>();
114 return std::optional<double>{};
189 virtual std::string
status()
const;
191 virtual std::optional<RNAV::LegData>
legData()
const
197 return std::optional<RNAV::LegData>();
246 bool init()
override;
247 virtual void update(
double dt);
255 double _distanceAircraftTargetMeter;
257 double _courseAircraftToTarget;
268 bool init()
override;
269 virtual void update(
double dt);
274 virtual bool toFlag()
const;
277 double _distanceAircraftTargetMeter;
279 double _courseAircraftToTarget;
289 ENTRY_PARALLEL_OUTBOUND,
290 ENTRY_PARALLEL_INBOUND,
297 HoldState _state = HOLD_INIT;
298 double _holdCourse = 0.0;
299 double _holdLegTime = 60.0;
300 double _holdLegDistance = 0.0;
301 double _holdCount = 0;
302 bool _leftHandTurns =
false;
304 bool _inTurn =
false;
306 double _turnEndAngle, _turnRadius;
309 bool checkOverHold();
310 void checkInitialEntry(
double dNm);
312 void startInboundTurn();
313 void startOutboundTurn();
314 void startParallelEntryTurn();
317 SGGeod outboundEndPoint();
318 SGGeod outboundTurnCenter();
319 SGGeod inboundTurnCenter();
321 double holdLegLengthNm()
const;
327 bool inLeftTurn()
const;
336 bool init()
override;
337 void update(
double)
override;
344 std::string
status()
const override;
virtual double xtrackErrorNm() const
virtual void update(double dt)
virtual double courseDeviationDeg() const
virtual double distanceToWayptM() const
Compute distance until the waypoint is done.
virtual SGGeod position() const
Position associated with the waypt.
DirectToController(RNAV *aRNAV, const WayptRef &aWpt, const SGGeod &aOrigin)
virtual double trueBearingDeg() const
Bearing to the waypoint, if this value is meaningful.
double xtrackErrorNm() const override
double courseDeviationDeg() const override
double distanceToWayptM() const override
Compute distance until the waypoint is done.
void setHoldCount(int count)
void update(double) override
SGGeod position() const override
Position associated with the waypt.
std::string status() const override
Allow waypoints to indicate a status value as a string.
HoldCtl(RNAV *aRNAV, const WayptRef &aWpt)
virtual void update(double dt)
OBSController(RNAV *aRNAV, const WayptRef &aWpt)
virtual double courseDeviationDeg() const
virtual double trueBearingDeg() const
Bearing to the waypoint, if this value is meaningful.
virtual double xtrackErrorNm() const
virtual SGGeod position() const
Position associated with the waypt.
virtual double distanceToWayptM() const
Compute distance until the waypoint is done.
virtual bool toFlag() const
to/from flag - true = to, false = from.
Abstract RNAV interface, for devices which implement an RNAV system - INS / GPS / FMS.
virtual double magvarDeg()=0
Magnetic variation at current position.
virtual double vspeedFPM()=0
Vertical speed in ft/minute.
virtual bool canFlyBy() const
double turnRadiusNm()
compute turn radius based on current ground-speed
virtual std::optional< LegData > previousLegData()
device leg previous waypoint position(eg, from route manager)
virtual SGGeod position()=0
virtual double overflightArmAngleDeg()=0
angle for overflight sequencing.
virtual double maxFlyByTurnAngleDeg() const
maximum angle in degrees where flyBy is permitted.
virtual double overflightDistanceM()=0
minimum distance to switch next waypoint.
virtual double groundSpeedKts()=0
Ground speed (along the track) in knots.
virtual double trackDeg()=0
True track in degrees.
virtual double overflightArmDistanceM()=0
minimum distance to a waypoint for overflight sequencing.
virtual std::optional< double > nextLegTrack()
virtual double turnRadiusNm(const double groundSpeedKnots)=0
compute the turn radius (based on standard rate turn) for a given ground speed in knots.
virtual double selectedMagCourse()=0
device selected course (eg, from autopilot / MCP / OBS) in degrees
virtual double trueBearingDeg() const
Bearing to the waypoint, if this value is meaningful.
virtual double courseDeviationDeg() const
virtual bool toFlag() const
to/from flag - true = to, false = from.
WayptController(RNAV *aRNAV, const WayptRef &aWpt)
virtual double targetTrackDeg() const
std::unique_ptr< WayptController > _subController
void setSubController(WayptController *sub)
bool isDone() const
Is this controller finished?
virtual double distanceToWayptM() const =0
Compute distance until the waypoint is done.
virtual SGGeod position() const =0
Position associated with the waypt.
virtual ~WayptController()
virtual std::string status() const
Allow waypoints to indicate a status value as a string.
virtual void update(double dt)=0
virtual double timeToWaypt() const
Compute time until the waypoint is done.
virtual std::optional< RNAV::LegData > legData() const
static WayptController * createForWaypt(RNAV *rnav, const WayptRef &aWpt)
Static factory method, given a waypoint, return a controller bound to it, of the appropriate type.
virtual double xtrackErrorNm() const
WayptRef waypoint() const
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
SGSharedPtr< Waypt > WayptRef