15 #include <matrix/LibMatrix.h>
72 virtual const char*
type()
const;
92 virtual void taxiTo(
const DtVector& destination,
double speed);
100 virtual void taxi(
double speed,
double turnRate);
105 virtual double calculateSteering(
double turnAngle)
const;
109 virtual double approximateThrottle(
double speed);
113 virtual double calculateCurrentBrakingDistance()
const;
129 virtual void flyTo(
const DtVector& destination,
double speed,
double maxTerrainAvoidanceLookaheadDist = -1);
136 virtual void flyToDirect(
const DtVector& destination,
double speed,
double maxTerrainAvoidanceLookaheadDist = -1);
146 virtual void fly(
double speed,
double turnRate,
double climbRate,
double maxTerrainAvoidanceLookaheadDist = -1);
156 virtual void flyFixedPitch(
double speed,
double turnRate,
double desiredPitch,
double maxTerrainAvoidanceLookaheadDist = -1);
161 virtual double terrainAvoidancePitch(
double speed,
double desiredPitch,
double maxTerrainAvoidanceLookaheadDist);
165 virtual bool clearPathTo(
const DtVector& localPosition);
192 virtual void circle(
const DtVector& center,
double radius,
double speed,
193 double altitude,
bool clockwise =
true);
197 virtual double calcControlForRoll(
double rollRate);
212 virtual double calcControlForThrottle(
double speed,
bool& deployFlaps);
225 virtual double decelerationLimitedClimbRate(
double altitudeError,
226 double desiredSpeed,
double finalClimbRate = 0.0);
231 virtual void calcControlForTurnAndClimb(
double turnRate,
double climbRate,
232 double& stickX,
double& pedal);
238 virtual void calcControlForTurnAndPitch(
double turnRate,
double desiredPitch,
239 double& stickX,
double& pedal,
double rollRate = 0.0);
247 virtual double calculateClimbRate(
double altitude,
double climbTime)
const;
262 virtual double calculateTurnRate(
double turnAngle,
double additionalTurnRate = 0)
const;
267 virtual double calculateRollAngle(
double turnRate,
double speed)
272 virtual double calculateRollRate(
double rollAngle,
double turnRate);
289 virtual void calculateNormalizedBodyVelocity();
296 virtual void calculateLocalAngularVelocity();
304 virtual void calculateSpeedRatioSquared();
313 virtual void initializeControllerForTick();
317 virtual bool createFixedWingControlPortGroup();
318 virtual bool createThrottlePort();
319 virtual bool createStickPort();
320 virtual bool createPedalPort();
321 virtual bool createBrakePort();
324 virtual bool createFlapsDeployedPort();
334 virtual void setMaxThrustAcceleration(
double maxThrustAcceleration);
337 virtual void setTakeOffDir(
const DtVector& takeOffDir);
338 virtual const DtVector& takeOffDir()
const;
342 virtual DtReal maxTurningGsForTask()
const;
343 virtual DtReal maxTurnRateCutoffAngle()
const;
344 virtual DtReal maxTaxiingTurnSpeed()
const;
345 virtual DtReal taxiingNearDistance()
const;
346 virtual DtReal taxiingAtDistance()
const;
347 virtual DtReal taxiingApproachSpeed()
const;
348 virtual DtReal maxPitchAngle()
const;
349 virtual DtReal timeToTargetAltitude()
const;
355 virtual double maxTurningGs()
const;
359 virtual bool terrainAvoidanceEnabled();
364 virtual double terrainAvoidanceLookaheadTime();
390 virtual void lookupAndCacheProcessSR();
406 virtual void updateCurrentState();
409 virtual void processEstimatedTotCalculation();
416 virtual double calculateCollisionLookAhead(
const double climbRate,
418 const double desiredAltitude);
424 virtual double convertSpeedtoGroundSpeed(
double speed,
double currentAlt,
DtAirSpeedType speedType);
512 const double DtEstimatedTotCalcInterval = 5.0;
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:146
double myCurrentHeading
Definition: fixedWingPilotController.h:505
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Instances of DtConstrainedDualAxisAnalogOutputPort are output ports through which data producers can ...
Definition: constrainedDualAxisAnalogIOPort.h:61
DtFixedWingFlightPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: fixedWingPilotController.h:492
DtVector myCurrentLocalVelocity
Definition: fixedWingPilotController.h:502
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
double myCurrentTopoRoll
Definition: fixedWingPilotController.h:507
DtConstrainedAnalogOutputPort * myThrottlePort
Output Port Name: throttle Output Port Description: Output Port Range: 0.
Definition: fixedWingPilotController.h:455
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
DtConstrainedAnalogOutputPort * myBrakePort
Output Port Name: brake Output Port Description: Output Port Range: 0.
Definition: fixedWingPilotController.h:476
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
DtOutputPortGroup is a data port group of a data provider.
Definition: outputPortGroup.h:30
DtFixedWingPilotController is a controller that models the capabilities of a fixed-wing pilot...
Definition: fixedWingPilotController.h:46
virtual bool init()
Calls setRadio()
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:54
DtAirspeedCalculator * myAirSpeedCalculator
Air Speed Calculator for updating state properties Created in init()
Definition: fixedWingPilotController.h:496
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: fixedWingPilotController.h:519
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick.
Definition: simComponent.h:487
DtDcm myCurrentOrientationMatrix
Definition: fixedWingPilotController.h:504
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:38
DtVector myEstimatedTotTextPos
tot text position
Definition: fixedWingPilotController.h:521
This repository holds all information that is common to all the forms of local fixed wing entities wi...
Definition: fixedWingEntityStateRepository.h:38
virtual void tick()
This gives the thread of control to the component.
DtConstrainedAnalogOutputPort * myPedalPort
Output Port Name: pedal Output Port Description: Output Port Range: -1.
Definition: fixedWingPilotController.h:469
const double DtLandingTolerance
This is the tolerance for determining if a control point is close enough to the terrain (and maybe la...
Definition: fixedWingPilotController.h:37
const double DtTurningSpeedTol
Allow a turn of no more than 2 degrees when moving too fast, which equals ~ 0.0556 radians...
Definition: fixedWingPilotController.h:30
DtOutputPortGroup * myFixedWingControlPortGroup
Output Port Group Name: fixed-wing-control Output Port Group Description:
Definition: fixedWingPilotController.h:448
virtual bool createPorts()
Called by init.
virtual bool decideToGiveUpTask() const
This function is used to determine if the controller should give up trying to execute the current tas...
double myCurrentSpeed
Definition: fixedWingPilotController.h:503
DtConstrainedDualAxisAnalogOutputPort * myStickPort
Output Port Name: stick Output Port Description: Output Port Range: X: -1.
Definition: fixedWingPilotController.h:462
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:24
class DtAirspeedCalculator:
Definition: airSpeedCalculator.h:23
virtual bool createPortGroups()
Called by init.
double myCurrentTopoPitch
Definition: fixedWingPilotController.h:506
DtDcm myLocalToTopoDcm
Definition: fixedWingPilotController.h:508
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtVector myCurrentLocalPosition
State variables updated for the current time.
Definition: fixedWingPilotController.h:501
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
double myEstimatedTotValue
the tot value
Definition: fixedWingPilotController.h:517
DtBooleanOutputPort * myFlapsDeployedPort
Output Port Name: flaps Output Port Description: Output Port Range: Output Port Default Value: true...
Definition: fixedWingPilotController.h:483
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingPilotController.h:441
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: fixedWingPilotController.h:515