27 class Plane :
public XPMP2::Aircraft
37 void UpdatePosition (
float _elapsedSinceLastCall,
int _flCounter)
override;
std::list< ptrFlightDataTy > listFlightDataTy
List of flight data elements.
Definition: FlightData.h:146
std::shared_ptr< FlightData > ptrFlightDataTy
Smart pointer to flight data objects.
Definition: FlightData.h:143
std::chrono::time_point< std::chrono::system_clock > tsTy
Timestamp format is a system clock's timepoint.
Definition: FlightData.h:29
void PlaneShutdown()
Shutdown the plane module.
Definition: Plane.cpp:444
void PlaneMaintenance()
Regular updates from flight data.
Definition: Plane.cpp:27
std::map< XPMPPlaneID, Plane > mapPlanesTy
Type of the map that stores and owns the plane objects.
Definition: Plane.h:81
bool PlaneStartup()
Initialie the Plane module.
Definition: Plane.cpp:437
ptrFlightDataTy fdTo
the to-position for interpolation
Definition: Plane.h:44
ptrFlightDataTy fdFrom
the from-position for interpolation
Definition: Plane.h:43
XPLMDrawInfo_t diTo
Definition: Plane.h:46
bool ShallBeRemoved(const tsTy &cutOff) const
Determines if this plane shall be removed, sets bToBeRemoved if so.
Definition: Plane.cpp:275
void UpdateFromFlightData(listFlightDataTy &listFD, const tsTy &now)
Regularly called to update from/to positions from the list of available flight data.
Definition: Plane.cpp:143
void DetermineGndAlt(ptrFlightDataTy &fd)
Determine ground altitude of a given location.
Definition: Plane.cpp:239
Plane(ptrFlightDataTy &&from, ptrFlightDataTy &&to)
Create a new plane from two flight data objects.
Definition: Plane.cpp:302
static tsTy::rep ticksNow
'now' timestamp
Definition: Plane.h:75
~Plane() override
Destructor cleans up all resources acquired.
Definition: Plane.cpp:312
float tTouchDown
time since touch down
Definition: Plane.h:51
float f
Definition: Plane.h:49
XPLMDrawInfo_t diFrom
the from-position in XP speak
Definition: Plane.h:45
void UpdatePosition(float _elapsedSinceLastCall, int _flCounter) override
Called by XPMP2 right before updating the aircraft's placement in the world.
Definition: Plane.cpp:324
static int flCounter
flight loop counter of last update
Definition: Plane.h:74
static void OncePerCycle(int _flCounter)
perform once-per-cycle activities
Definition: Plane.cpp:291
void TakeOverData(bool bFrom, ptrFlightDataTy &&source)
Prepare given position for usage after taking over from passed-in smart pointer.
Definition: Plane.cpp:191
float GetLift() const override
Lift produced. Either given in wake.lift or simple defaults apply.
Definition: Plane.cpp:419