17 #include <matrix/LibMatrix.h>
18 #include <vlpi/disEnums.h>
66 virtual bool init()
override;
70 virtual const char*
type()
const override;
74 virtual void tick()
override;
89 virtual void calculateBodyVelocity(
const DtVector& oldRelativeVelocity,
90 const DtDcm& newLocalOrientation, DtVector& newBodyVelocity);
95 virtual void calculateAirborneAcceleration(
const DtVector oldLocalPosition,
96 double oldSpeed,
const DtDcm& newLocalOrientation,
97 const DtVector& newBodyVelocity,
double throttle,
98 DtVector& newRelativeAcceleration);
103 virtual void doFlying();
106 virtual void doTaxiing();
110 virtual bool isTouchingDown(
const DtVector& newLocalPosition,
111 const DtVector& newRelativeVelocity);
115 virtual bool isTakingOff(
bool isOnGround,
double speed);
117 virtual bool updateGroundInteractionPoints(
122 const DtDcm& localOrientation,
123 const DtVector& localPosition,
124 double halfHeightOfTerrainIntersectChord);
130 virtual double calculateYawRate(
double pedal);
133 virtual double calculatePitchRate(
double stickYValue);
136 virtual double calculateRollRate(
double stickXValue);
138 virtual void calculateBodyRotationRates(
double pedal,
double stickXValue,
139 double stickYValue, DtVector& newBodyRotationRates);
143 virtual void calculateOrientation(
const DtDcm&
144 oldLocalOrientation,
const DtVector& newBodyRotationRates,
145 DtDcm& newLocalOrientation);
148 virtual void calculateBodyGravity(
const DtVector oldLocalPosition,
149 const DtDcm& newLocalOrientation, DtVector& newBodyGravityAcceleration);
153 virtual void calculateThrustAcceleration(
double throttle,
154 DtVector& newBodyThrustAccleration);
160 virtual void calculateDragAcceleration(
double oldSpeed,
161 const DtVector& newBodyVelocity,
bool flapsDeployed,
162 DtVector& newBodyDragAccleration);
168 virtual void fallFromSky(
const DtString& reason = DtString::nullString());
170 virtual bool collidesWithGround(
const DtVector& oldLocalPosition,
171 const DtVector& newLocalPosition, DtVector& localCenterGoundPosition);
174 void integrate(
const DtVector& oldLocalPosition,
175 const DtVector& oldRelativeVelocity,
176 const DtVector& newRelativeAcceleration, DtVector& newLocalPosition,
177 DtVector& newRelativeVelocity,
178 double maxSpeed = 0);
184 virtual void useFuel(
double fuelUsed);
185 virtual double fuelLeft()
const;
188 virtual double fullMass()
const;
191 virtual double currentMass()
const;
197 virtual double calculateHeading(
double oldHeading,
198 double steering,
double dT,
double speed,
double turningRadius);
200 virtual void calculateScalarVelocityAndAcceleration(
201 double oldPitch,
double &scalarVelocity,
double &scalarAcceleration);
202 virtual double calculateMaxGroundSpeed();
203 virtual double calculateMaxGroundAcceleration();
207 virtual double calculateAcceleration(
double pitch,
double maxSpeed,
208 double maxAccel,
double newSpeed);
209 virtual double calculateAccelerationFromThrottle();
212 virtual double calculateAccelerationFromSlope(
double slope);
214 virtual double calculateAccelerationFromResistance(
double maxSpeed,
216 virtual double calculateAccelerationFromBrake(
double otherAccels);
218 virtual DtVector calculateProjectedLocation(
219 const DtVector& oldLocalPosition,
const DtVector& newBodyAcceleration,
220 const DtVector& oldBodyVelocity,
double newHeading);
223 virtual bool calculateOrientationAndPositionOnGround(
224 const DtVector& newLocalProjectedLocation,
double newHeading,
225 DtDcm& newLocalOrientation, DtVector& newLocalPosition);
228 virtual void updateRepository(
const DtVector& newLocalPosition,
229 const DtVector& newRelativeVelocity,
230 const DtVector& newRelativeAcceleration,
231 const DtDcm& newLocalOrientation,
const DtVector& newBodyRotationRates,
232 bool isOnGround,
const DtAppearance& newAppearance);
247 virtual void updateAirspeedToRepository(
const DtVector& newLocalPosition,
const double altitude);
249 virtual void updateDisplay()
const;
253 virtual double maxThrustAcceleration()
const;
254 virtual double maxClimbRate()
const;
255 virtual double maxYawVelocity()
const;
256 virtual double maxPitchVelocity()
const;
257 virtual double maxRollVelocity()
const;
258 virtual double maxAltitude()
const;
271 virtual bool createPSR();
274 virtual bool createFuelConsumptionModel();
276 virtual void sendDetonation(
const DtVector& geocentricPosition);
279 virtual void updateOrderedSpeed();
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAirspeedCalculator * myAirSpeedCalculator
Air Speed Calculator for updating state properties Created in init()
Definition: fixedWingActuatorComponent.h:363
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
double myLastSpeed
myLastSpeed is used in tick() to catch velocity changes while paused, due to setCurrentSpeed() or set...
Definition: fixedWingActuatorComponent.h:369
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
bool mySentFallingMessage
Used to make sure fall message is only sent once.
Definition: fixedWingActuatorComponent.h:349
DtInputPortGroup * myFixedWingControlPortGroup
Input Port Group Name: fixed-wing-control Input Port Group Description: Provides input to the fixed-w...
Definition: fixedWingActuatorComponent.h:305
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
DtFixedWingFlightPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: fixedWingActuatorComponent.h:346
#define CACHED_NEXT_FRAME_STATE_PROPERTY(property)
The following macros can be used within sim components to cache and access cached state properties...
Definition: simComponent.h:57
Implements the Breguet range equation V(L/D) Range = ---—*ln(Wi/Wf) g*SFC V = Velocity L/D = Lift/Dra...
Definition: aircraftFuelConsumptionModel.h:28
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:41
DtConstrainedAnalogInputPort * myThrottlePort
Input Port Name: throttle Input Port Description: Input Port Range: 0. to 1. Input Port Default Valu...
Definition: fixedWingActuatorComponent.h:312
bool myPreviouslyHadData
Definition: fixedWingActuatorComponent.h:358
This repository holds all information that is common to all the forms of local fixed wing entities wi...
Definition: fixedWingEntityStateRepository.h:41
virtual bool init() override
Overridden to cache a pointer to the entity's radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtAircraftFuelConsumptionModel * myFuelConsumptionModel
Definition: fixedWingActuatorComponent.h:297
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
class DtAirspeedCalculator:
Definition: airSpeedCalculator.h:23
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Class Invariant: The DtGroundInteractionPt class must always have a valid DtAttachedTerrain or DtSimM...
Definition: groundInteractionPt.h:28
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: fixedWingActuatorComponent.h:372
DtBooleanInputPort * myFlapsDeployedPort
Input Port Name: flaps Input Port Description: Input Port Range: Input Port Default Value: false In...
Definition: fixedWingActuatorComponent.h:340
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Port group used to set what values should be set into the VRF state repository. All values are in loc...
Definition: fixedWingActuatorComponent.h:356
bool myPutTaxiingPlaneOnGround
Used to make sure a taxiing, destroyed aircraft is only set down on the terrain once.
Definition: fixedWingActuatorComponent.h:352
DtFixedWingActuatorDescriptor, a descriptor for the DtFixedWingActuatorComponent component.
Definition: fixedWingActuatorDescriptor.h:24
bool myKeepParentPosition
Definition: fixedWingActuatorComponent.h:359
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:31
DtFixedWingActuatorDescriptor * myFixedWingActuatorDescriptor
Definition: fixedWingActuatorComponent.h:296
DtConstrainedAnalogInputPort * myBrakePort
Input Port Name: brake Input Port Description: Input Port Range: 0. to 1. Input Port Default Value: ...
Definition: fixedWingActuatorComponent.h:333
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtFixedWingActuatorComponent provides a simple, kinematics-based model for air motion based on thrott...
Definition: fixedWingActuatorComponent.h:46
DtConstrainedAnalogInputPort * myPedalPort
Input Port Name: pedal Input Port Description: Input Port Range: -1. to 1. Input Port Default Value:...
Definition: fixedWingActuatorComponent.h:326
A locally simulated VRF object.
Definition: localObject.h:98
DtConstrainedDualAxisAnalogInputPort * myStickPort
Input Port Name: stick Input Port Description: Input Port Range: X:-1. to 1., Y:-1. to 1. Input Port Default Value: Input Group Parent: fixed-wing-control.
Definition: fixedWingActuatorComponent.h:319
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingActuatorComponent.h:295