18#include <vrfmodel/fixedWingActuatorComponent.h>
20class DtSetJoyDeviceSwitchRequest;
22class DtBooleanInputPort;
23class DtIntegerInputPort;
24class DtBooleanOutputPort;
25class DtSetRestoreRequest;
26class DtSetLocationRequest;
27class DtSetHeadingRequest;
31class AirplaneDynamics;
69class RTD_VRF_BACKEND_PLUGIN_EXPORT
DtVreFwlActuator :
public DtFixedWingActuatorComponent
80 DtVreFwlActuator(
const DtString& name, DtLocalObject*
object, DtSimulationServices* simManager,
81 DtComponentDescriptor* compDescriptor, DtReaderWriterRegistry* parentRegistry);
92 virtual const char*
type()
const override;
98 virtual void setRadio(DtSimRadio* radio)
override;
135 static DtSimComponent*
creator(
const DtString& name, DtLocalObject*
object, DtSimulationServices* simManager,
136 DtComponentDescriptor* compDescriptor, DtReaderWriterRegistry* parentRegistry);
227 DtVector& position, DtVector& velocity, DtVector& acceleration, DtTaitBryan& orientation, DtVector& rotVelocity);
FixedWingLibCGF::AirplaneDynamics * myDynamics
Pointer to the real-time dynamics model.
Definition vreFwlActuator.h:295
void enableStatePropThresholding(bool enable)
Enables or disables state propagation thresholding.
DtConstrainedAnalogInputPort * myThrottlePort
Input port for throttle control.
Definition vreFwlActuator.h:265
DtAnalogOutputPort * myRudderPort
Output port for rudder position.
Definition vreFwlActuator.h:271
DtAnalogInputPort * myWheelBrakePort
Input port for wheel brake control.
Definition vreFwlActuator.h:256
virtual void processSetRestore(DtSetRestoreRequest *req)
Processes a restore request.
DtIntegerInputPort * myFlapSettingPort
Input port for flap setting.
Definition vreFwlActuator.h:250
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:280
DtVreFwlActuator(const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry)
Constructor.
DtBooleanOutputPort * myLandingGearState
Output port for landing gear state.
Definition vreFwlActuator.h:268
bool myPlayerControlled
Flag indicating whether the entity is player-controlled.
Definition vreFwlActuator.h:298
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:262
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:253
DtBooleanInputPort * myLandingGearPort
Input port for landing gear control.
Definition vreFwlActuator.h:247
DtConstrainedDualAxisAnalogInputPort * myStickPort
Input port for control stick (pitch/roll)
Definition vreFwlActuator.h:259
DtAnalogOutputPort * myLeftFlapPort
Output port for left flap position.
Definition vreFwlActuator.h:286
bool myExtendedGearsLocked
Flag to keep landing gear extended when on ground.
Definition vreFwlActuator.h:308
virtual ~DtVreFwlActuator() override
Virtual destructor.
DtAnalogOutputPort * myRightElevatorPort
Output port for right elevator position.
Definition vreFwlActuator.h:283
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:244
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:292
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:274
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:289
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:277
DtReal myLastSpeed
Last recorded speed value.
Definition vreFwlActuator.h:301
Fixed-wing parameters for VREngage.
Definition vreFwlParameters.h:41
Forward declarations for the FixedWingLibCGF namespace.
Definition vreFwlActuator.h:30
Definition vreFwlActuator.h:35
const char TS_VREngageActuator[]
Type string for VREngage fixed-wing actuator component.
Definition vreFwlActuator.h:41
Common definitions for the RTD backend library.