16 #include <matrix/LibMatrix.h>
73 virtual const char*
type()
const;
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);
177 virtual bool clearPathTo(
const DtVector& localPosition,
bool& dataAvailable);
204 virtual void circle(
const DtVector& center,
double radius,
double speed,
205 double altitude,
bool clockwise =
true);
209 virtual double calcControlForRoll(
double rollRate);
224 virtual double calcControlForThrottle(
double speed,
bool& deployFlaps);
237 virtual double decelerationLimitedClimbRate(
double altitudeError,
238 double desiredSpeed,
double finalClimbRate = 0.0);
243 virtual void calcControlForTurnAndClimb(
double turnRate,
double climbRate,
244 double& stickX,
double& pedal);
250 virtual void calcControlForTurnAndPitch(
double turnRate,
double desiredPitch,
251 double& stickX,
double& pedal,
double rollRate = 0.0);
259 virtual double calculateClimbRate(
double altitude,
double climbTime)
const;
274 virtual double calculateTurnRate(
double turnAngle,
double additionalTurnRate = 0)
const;
279 virtual double calculateRollAngle(
double turnRate,
double speed)
284 virtual double calculateRollRate(
double rollAngle,
double turnRate);
301 virtual void calculateNormalizedBodyVelocity();
308 virtual void calculateLocalAngularVelocity();
316 virtual void calculateSpeedRatioSquared();
325 virtual void initializeControllerForTick();
329 virtual bool createFixedWingControlPortGroup();
330 virtual bool createThrottlePort();
331 virtual bool createStickPort();
332 virtual bool createPedalPort();
333 virtual bool createBrakePort();
336 virtual bool createFlapsDeployedPort();
346 virtual void setMaxThrustAcceleration(
double maxThrustAcceleration);
349 virtual void setTakeOffDir(
const DtVector& takeOffDir);
350 virtual const DtVector& takeOffDir()
const;
354 virtual DtReal maxTurningGsForTask()
const;
355 virtual DtReal maxTurnRateCutoffAngle()
const;
356 virtual DtReal maxTaxiingTurnSpeed()
const;
357 virtual DtReal taxiingNearDistance()
const;
358 virtual DtReal taxiingAtDistance()
const;
359 virtual DtReal taxiingApproachSpeed()
const;
360 virtual DtReal maxPitchAngle()
const;
361 virtual DtReal timeToTargetAltitude()
const;
367 virtual double maxTurningGs()
const;
371 virtual bool terrainAvoidanceEnabled();
376 virtual double terrainAvoidanceLookaheadTime();
404 virtual void lookupAndCacheProcessSR();
420 virtual void updateCurrentState();
423 virtual void processEstimatedTotCalculation();
430 virtual double calculateCollisionLookAhead(
const double climbRate,
432 const double desiredAltitude);
438 virtual double convertSpeedtoGroundSpeed(
double speed,
double currentAlt,
DtAirSpeedType speedType);
526 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:519
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:506
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:516
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:521
DtConstrainedAnalogOutputPort * myThrottlePort
Output Port Name: throttle Output Port Description: Output Port Range: 0. to 1. Output Port Default ...
Definition: fixedWingPilotController.h:469
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. to 1. Output Port Default Val...
Definition: fixedWingPilotController.h:490
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
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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
virtual bool init()
Calls setRadio()
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:510
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:533
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:436
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:518
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:40
DtVector myEstimatedTotTextPos
tot text position
Definition: fixedWingPilotController.h:535
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:483
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:462
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:517
DtConstrainedDualAxisAnalogOutputPort * myStickPort
Output Port Name: stick Output Port Description: Output Port Range: X: -1. to 1. Y: -1...
Definition: fixedWingPilotController.h:476
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:24
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:520
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:522
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
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:515
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
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:112
double myEstimatedTotValue
the tot value
Definition: fixedWingPilotController.h:531
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
DtBooleanOutputPort * myFlapsDeployedPort
Output Port Name: flaps Output Port Description: Output Port Range: Output Port Default Value: true...
Definition: fixedWingPilotController.h:497
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:536
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingPilotController.h:455
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: fixedWingPilotController.h:529