19#include <vrfmodel/fixedWingActuatorComponent.h>
21class DtSetJoyDeviceSwitchRequest;
23class DtBooleanInputPort;
24class DtIntegerInputPort;
25class DtBooleanOutputPort;
26class DtSetRestoreRequest;
27class DtSetLocationRequest;
28class DtSetHeadingRequest;
33class AirplaneDynamics;
71class RTD_VRF_BACKEND_PLUGIN_EXPORT
DtVreFwlActuator :
public DtFixedWingActuatorComponent
82 DtVreFwlActuator(
const DtString& name, DtLocalObject*
object, DtSimulationServices* simManager,
83 DtComponentDescriptor* compDescriptor, DtReaderWriterRegistry* parentRegistry);
94 virtual const char*
type()
const override;
137 static DtSimComponent*
creator(
const DtString& name, DtLocalObject*
object, DtSimulationServices* simManager,
138 DtComponentDescriptor* compDescriptor, DtReaderWriterRegistry* parentRegistry);
240 DtVector& position, DtVector& velocity, DtVector& acceleration, DtTaitBryan& orientation, DtVector& rotVelocity);
FixedWingLibCGF::AirplaneDynamics * myDynamics
Pointer to the real-time dynamics model.
Definition vreFwlActuator.h:308
void enableStatePropThresholding(bool enable)
Enables or disables state propagation thresholding.
DtConstrainedAnalogInputPort * myThrottlePort
Input port for throttle control.
Definition vreFwlActuator.h:278
DtAnalogOutputPort * myRudderPort
Output port for rudder position.
Definition vreFwlActuator.h:284
DtAnalogInputPort * myWheelBrakePort
Input port for wheel brake control.
Definition vreFwlActuator.h:269
virtual void processSetRestore(DtSetRestoreRequest *req)
Processes a restore request.
DtIntegerInputPort * myFlapSettingPort
Input port for flap setting.
Definition vreFwlActuator.h:263
static void radioMsgCallback(DtSimMessage *msg, void *usr)
Static callback for radio messages.
DtFixedWingEntityStateRepository * getStateRepository()
Gets the state repository.
DtAnalogOutputPort * myLeftElevatorPort
Output port for left elevator position.
Definition vreFwlActuator.h:293
DtVreFwlActuator(const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry)
Constructor.
DtBooleanOutputPort * myLandingGearState
Output port for landing gear state.
Definition vreFwlActuator.h:281
bool myPlayerControlled
Flag indicating whether the entity is player-controlled.
Definition vreFwlActuator.h:311
virtual void tick() override
Performs per-frame processing.
void writeOutputData()
Writes output data to ports.
virtual const char * type() const override
Gets the component type.
DtConstrainedAnalogInputPort * myPedalPort
Input port for rudder pedals (yaw)
Definition vreFwlActuator.h:275
const DtVreFwlParameters * getFWParameters()
Gets the fixed-wing parameters.
static DtSimComponent * creator(const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry)
Component factory function.
DtAnalogInputPort * myAirBrakePort
Input port for air brake control.
Definition vreFwlActuator.h:266
DtBooleanInputPort * myLandingGearPort
Input port for landing gear control.
Definition vreFwlActuator.h:260
DtConstrainedDualAxisAnalogInputPort * myStickPort
Input port for control stick (pitch/roll)
Definition vreFwlActuator.h:272
DtAnalogOutputPort * myLeftFlapPort
Output port for left flap position.
Definition vreFwlActuator.h:299
bool myExtendedGearsLocked
Flag to keep landing gear extended when on ground.
Definition vreFwlActuator.h:321
virtual ~DtVreFwlActuator() override
Virtual destructor.
DtAnalogOutputPort * myRightElevatorPort
Output port for right elevator position.
Definition vreFwlActuator.h:296
virtual void copyStateFromRTD(DtVector &position, DtVector &velocity, DtVector &acceleration, DtTaitBryan &orientation, DtVector &rotVelocity)
Copies state from RTD to provided parameters.
virtual void updateControlSurfaces(bool resetToZero=false)
Updates the control surface positions.
virtual void processSetLocation(DtSetLocationRequest *req)
Processes a location change request.
virtual void processRadioMsg(DtSimMessage *msg)
Processes a radio message.
DtBooleanInputPort * myJoystickEnabledPort
Input port for joystick enabled state.
Definition vreFwlActuator.h:257
virtual void copyStateToRTD()
Copies state from the state repository to RTD.
virtual bool createPorts() override
Creates component ports.
UNIMPLEMENTED_COPYCTOR_AND_ASSIGNMENT_OPERATOR(DtVreFwlActuator)
virtual void processSetHeading(DtSetHeadingRequest *req)
Processes a heading change request.
virtual void setRadio(DtSimRadio *radio) override
Sets the radio interface for this component.
DtOutputPortGroup * myControlSurfacesGroup
Output port group for all control surfaces.
Definition vreFwlActuator.h:305
virtual void copyStateFromRTD()
Copies state from RTD to the state repository.
virtual bool createPortGroups() override
Creates port groups.
DtAnalogOutputPort * myLeftAileronPort
Output port for left aileron position.
Definition vreFwlActuator.h:287
virtual void checkAndClampAircraftOnGround(const DtVector &localPosition)
Checks and adjusts the aircraft position to keep it on the ground.
DtAnalogOutputPort * myRightFlapPort
Output port for right flap position.
Definition vreFwlActuator.h:302
void updateFuelExtendedData()
Publishes the fuel amount used by the frontend displays.
virtual void setSpeed(DtReal speed)
Sets the aircraft speed.
bool isPlayerControlled()
Checks if the entity is currently player-controlled.
DtAnalogOutputPort * myRightAileronPort
Output port for right aileron position.
Definition vreFwlActuator.h:290
void synchronizeFuel()
Synchronizes RTD fuel with the configured VR-Forces resource.
DtReal myLastSpeed
Last recorded speed value.
Definition vreFwlActuator.h:314
DtSimResource * fuelResource()
Returns the configured VR-Forces fuel resource, or nullptr when unavailable.
vreRtd::RtdFuelSynchronizer myFuelSynchronizer
Synchronizes the RTD fuel tank with the VR-Forces fuel resource.
Definition vreFwlActuator.h:324
Fixed-wing parameters for VREngage.
Definition vreFwlParameters.h:41
Synchronizes RTD vehicle fuel with a VR-Forces fuel resource.
Definition vreRtdUtil.h:98
Forward declarations for the FixedWingLibCGF namespace.
Definition vreFwlActuator.h:32
Definition vreFwlActuator.h:37
const char TS_VREngageActuator[]
Type string for VREngage fixed-wing actuator component.
Definition vreFwlActuator.h:43
Common definitions for the RTD backend library.
Utility functions for VREngage RTD components.