16 #include <matrix/LibMatrix.h>
64 virtual bool init()
override;
69 virtual void tick()
override;
73 virtual const char*
type()
const override;
87 static DtReaderWriter* provideMaxThrustAcceleration(
void* controller);
104 virtual void taxiTo(
const DtVector& destination,
double speed);
112 virtual void taxi(
double speed,
double turnRate);
117 virtual double calculateSteering(
double turnAngle)
const;
121 virtual double approximateThrottle(
double speed);
125 virtual double calculateCurrentBrakingDistance()
const;
141 virtual void flyTo(
const DtVector& destination,
double speed,
double maxTerrainAvoidanceLookaheadDist = -1);
148 virtual void flyToDirect(
const DtVector& destination,
double speed,
double maxTerrainAvoidanceLookaheadDist = -1);
158 virtual void fly(
double speed,
double turnRate,
double climbRate,
double maxTerrainAvoidanceLookaheadDist = -1);
168 virtual void flyFixedPitch(
double speed,
double turnRate,
double desiredPitch,
double maxTerrainAvoidanceLookaheadDist = -1);
173 virtual double terrainAvoidancePitch(
double speed,
double desiredPitch,
double maxTerrainAvoidanceLookaheadDist);
178 virtual bool clearPathTo(
const DtVector& localPosition,
bool& dataAvailable,
double minAltitude);
205 virtual void circle(
const DtVector& center,
double radius,
double speed,
206 double altitude,
bool clockwise =
true);
210 virtual double calcControlForRoll(
double rollRate);
225 virtual double calcControlForThrottle(
double speed,
bool& deployFlaps);
238 virtual double decelerationLimitedClimbRate(
double altitudeError,
239 double desiredSpeed,
double finalClimbRate = 0.0);
244 virtual void calcControlForTurnAndClimb(
double turnRate,
double climbRate,
245 double& stickX,
double& pedal);
251 virtual void calcControlForTurnAndPitch(
double turnRate,
double desiredPitch,
252 double& stickX,
double& pedal,
double rollRate = 0.0);
260 virtual double calculateClimbRate(
double altitude,
double climbTime)
const;
275 virtual double calculateTurnRate(
double turnAngle,
double additionalTurnRate = 0)
const;
280 virtual double calculateRollAngle(
double turnRate,
double speed)
285 virtual double calculateRollRate(
double rollAngle,
double turnRate);
302 virtual void calculateNormalizedBodyVelocity();
309 virtual void calculateLocalAngularVelocity();
317 virtual void calculateSpeedRatioSquared();
326 virtual void initializeControllerForTick();
330 virtual bool createFixedWingControlPortGroup();
331 virtual bool createThrottlePort();
332 virtual bool createStickPort();
333 virtual bool createPedalPort();
334 virtual bool createBrakePort();
337 virtual bool createFlapsDeployedPort();
347 virtual void setMaxThrustAcceleration(
double maxThrustAcceleration);
350 virtual void setTakeOffDir(
const DtVector& takeOffDir);
351 virtual const DtVector& takeOffDir()
const;
355 virtual DtReal maxTurningGsForTask()
const;
356 virtual DtReal maxTurnRateCutoffAngle()
const;
357 virtual DtReal maxTaxiingTurnSpeed()
const;
358 virtual DtReal taxiingNearDistance()
const;
359 virtual DtReal taxiingAtDistance()
const;
360 virtual DtReal taxiingApproachSpeed()
const;
361 virtual DtReal maxPitchAngle()
const;
362 virtual DtReal timeToTargetAltitude()
const;
368 virtual double maxTurningGs()
const;
372 virtual bool terrainAvoidanceEnabled()
const;
377 virtual double terrainAvoidanceLookaheadTime();
405 virtual void lookupAndCacheProcessSR();
421 virtual void updateCurrentState();
424 virtual void processEstimatedTotCalculation();
431 virtual double calculateCollisionLookAhead(
const double climbRate,
433 const double desiredAltitude);
439 virtual double convertSpeedtoGroundSpeed(
double speed,
double currentAlt,
DtAirSpeedType speedType);
527 const double DtEstimatedTotCalcInterval = 5.0;
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
double myCurrentHeading
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:520
Instances of DtConstrainedDualAxisAnalogOutputPort are output ports through which data producers can ...
Definition: constrainedDualAxisAnalogIOPort.h:61
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtFixedWingFlightPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: fixedWingPilotController.h:507
DtVector myCurrentLocalVelocity
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:517
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
double myCurrentTopoRoll
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:522
DtConstrainedAnalogOutputPort * myThrottlePort
Output Port Name: throttle Output Port Description: Output Port Range: 0. to 1. Output Port Default ...
Definition: fixedWingPilotController.h:470
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
DtConstrainedAnalogOutputPort * myBrakePort
Output Port Name: brake Output Port Description: Output Port Range: 0. to 1. Output Port Default Val...
Definition: fixedWingPilotController.h:491
Definition: readerWriter.h:85
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
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
DtFixedWingPilotController is a controller that models the capabilities of a fixed-wing pilot...
Definition: fixedWingPilotController.h:47
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:57
DtAirspeedCalculator * myAirSpeedCalculator
Air Speed Calculator for updating state properties Created in init()
Definition: fixedWingPilotController.h:511
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: fixedWingPilotController.h:534
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:443
virtual bool init() override
Calls setRadio()
DtDcm myCurrentOrientationMatrix
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:519
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:41
DtVector myEstimatedTotTextPos
tot text position
Definition: fixedWingPilotController.h:536
This repository holds all information that is common to all the forms of local fixed wing entities wi...
Definition: fixedWingEntityStateRepository.h:41
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtConstrainedAnalogOutputPort * myPedalPort
Output Port Name: pedal Output Port Description: Output Port Range: -1. to 1. Output Port Default Va...
Definition: fixedWingPilotController.h:484
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:38
const double DtTurningSpeedTol
Allow a turn of no more than 2 degrees when moving too fast, which equals ~ 0.0556 radians...
Definition: fixedWingPilotController.h:31
DtOutputPortGroup * myFixedWingControlPortGroup
Output Port Group Name: fixed-wing-control Output Port Group Description:
Definition: fixedWingPilotController.h:463
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
virtual bool decideToGiveUpTask() const
This function is used to determine if the controller should give up trying to execute the current tas...
double myCurrentSpeed
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:518
DtConstrainedDualAxisAnalogOutputPort * myStickPort
Output Port Name: stick Output Port Description: Output Port Range: X: -1. to 1. Y: -1...
Definition: fixedWingPilotController.h:477
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:23
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...
double myCurrentTopoPitch
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:521
DtDcm myLocalToTopoDcm
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:523
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
DtVector myCurrentLocalPosition
State variables updated for the current time. Computed at the beginning of the tick, and used only in that tick.
Definition: fixedWingPilotController.h:516
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:131
double myEstimatedTotValue
the tot value
Definition: fixedWingPilotController.h:532
DtBooleanOutputPort * myFlapsDeployedPort
Output Port Name: flaps Output Port Description: Output Port Range: Output Port Default Value: true...
Definition: fixedWingPilotController.h:498
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: fixedWingPilotController.h:537
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingPilotController.h:456
A locally simulated VRF object.
Definition: localObject.h:98
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: fixedWingPilotController.h:530