|
Enroute Flight Navigation
A navigation app for VFR pilots
|
Flight detection for powered aircraft. More...
#include <AirplaneFlightDetector.h>
Public Member Functions | |
| AirplaneFlightDetector (QObject *parent=nullptr) | |
| Standard constructor. | |
| ~AirplaneFlightDetector () override=default | |
| Standard destructor. | |
| auto | detectionState () const -> DetectionState override |
| Current detection state. | |
| void | processPositionUpdate (const Positioning::PositionInfo &info) override |
| Process a position update. | |
| void | endFlight () override |
| Manually end the current in-flight recording. | |
| void | resetDetection () override |
| Reset the detection state to Idle. | |
| Public Member Functions inherited from Flightlog::FlightDetector | |
| FlightDetector (QObject *parent=nullptr) | |
| Standard constructor. | |
| ~FlightDetector () override=default | |
| Standard destructor. | |
Additional Inherited Members | |
| Public Types inherited from Flightlog::FlightDetector | |
| enum | DetectionState : quint8 { Idle , TakeoffPhase , InFlight , LandingPhase } |
| Detection state for automatic takeoff/landing detection. More... | |
| Signals inherited from Flightlog::FlightDetector | |
| void | detectionStateChanged () |
| Emitted when the detection state changes. | |
| void | takeoffDetected (const QString &departureICAO, const QGeoCoordinate &departureCoordinate, const QDateTime &startTime, const QString &aircraftCallsign) |
| Emitted when a takeoff is confirmed. | |
| void | landingDetected (const QString &arrivalICAO, const QGeoCoordinate &arrivalCoordinate, const QDateTime &landingTime, int landingCount) |
| Emitted when a landing is confirmed. | |
Flight detection for powered aircraft.
This detector implements a state machine suitable for powered aircraft (airplanes, motor gliders, etc.). It uses ground speed, altitude AGL, and proximity to ICAO airfields to detect takeoff and landing.
Detection criteria:
Definition at line 48 of file AirplaneFlightDetector.h.
|
explicit |
Standard constructor.
| parent | The standard QObject parent pointer |
|
inlinenodiscardoverridevirtual |
Current detection state.
Implements Flightlog::FlightDetector.
Definition at line 62 of file AirplaneFlightDetector.h.
|
overridevirtual |
Manually end the current in-flight recording.
If the detector is in the InFlight or LandingPhase state, this creates a completed flight with the current UTC time as landing time and resolves the nearest airport if available. The accumulated landing count from LandingPhase is preserved. Resets the detection state to Idle.
Does nothing if the detection state is Idle or TakeoffPhase.
Implements Flightlog::FlightDetector.
|
overridevirtual |
Process a position update.
Called on every position update when auto-detection is enabled. Subclasses implement the state machine transitions here.
| info | The current position information |
Implements Flightlog::FlightDetector.
|
overridevirtual |
Reset the detection state to Idle.
Clears all pending detection data and returns to the Idle state. Used when auto-detection is disabled while detection is in progress.
Implements Flightlog::FlightDetector.