VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtFixedWingTakeoffController Class Reference

DtFixedWingTakeoffController is a controller that models take-off behavior for fixed-wing entities. More...

Inheritance diagram for DtFixedWingTakeoffController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtFixedWingTakeoffController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtFixedWingTakeoffController ()
 destructor
virtual bool init ()
 Initializes any state that is needed.
virtual bool postAddComponentsInit ()
 Called after all components have been created, initialized and added to the component manager.
virtual DtString type () const
 Returns a string identifies the class type of component.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void registerTaskMsgCallbacks ()
 Override for interest in both takeoff tasks.
virtual void tick ()
 Ticks and performs current state.
virtual void clearTask ()
 Override to clear out any subtasks we might have.
virtual bool createPSR ()
 Tasks.
DtFixedWingFlightPSRlookupFixedWingFlightPSR ()
 Looks up the fixed wing flight PSR in the PSR manager, and returns it.
virtual void processTaskComplete (DtSimMessage *msg)
virtual void processTakeoffTask (DtSimMessage *msg)
 Starts the processing of the takeoff task.
virtual void processDeleteVrfObjectCallback (DtVrfObject *obj)
virtual void setState (DtVrfFixedWingTakeoffPSR::DtTakeoffControllerState)
 Sets state in PSR and returns state from PSR.
virtual
DtVrfFixedWingTakeoffPSR::DtTakeoffControllerState 
state () const
virtual void movingAlongTakeoffRoute ()
 Called when moving along the takeoff strip.
virtual void calculateVertexAndRotation (const DtLocalVector &start, const DtLocalVector &end, const DtVector &distance, DtVector &vertex, DtDcm &rotationDcm) const
 Calculats the last point in the landing strip takeoff vector.
virtual double turningPointDistance () const
 Returns a number of meters out from start point to give the plane a chance to turn around to meet.
virtual void startTakeoff ()
 Issues move along task for landing strip and sets state to DtMovingAlongTakeoffRoute.
virtual void flyingTowardsTakeoffPoint ()
 Called when flying towards takeoff point. Currently does nothing.
virtual void flyTowardsTakeoffPoint ()
 Sends DtFlyToLocationTask task (with fixed pitch) and sets state to DtFlyingTowardsTakeoffPoint.

Static Protected Member Functions

static void taskCompleteReportCallback (DtSimMessage *msg, void *usr)
 Monitor taskReportComplete callback to see when our moveTo task is complete during embarkation so we can then set state to DtMoveToEmbarkPoint.
static void takeoffTaskCallback (DtSimMessage *msg, void *usr)
static void deleteVrfObjectCallback (DtVrfObject *msg, void *usr)
 If an object is deleted and it is the object we are trying to takeoff from, then stop the current takeoff task.

Protected Attributes

DtVrfFixedWingTakeoffPSRmyProcessState
 Container for state data associated with this component.
DtFixedWingTakeoffDescriptormyFixedWingTakeoffDescriptor
DtFixedWingFlightPSRmyFixedWingFlightPSR
DtFixedWingEntityStateRepositorymyFixedWingEntityState

Private Member Functions

 DtFixedWingTakeoffController ()
 default constructor; not implemented
 DtFixedWingTakeoffController (const DtFixedWingTakeoffController &orig)
 copy constructor; not implemented
const
DtFixedWingTakeoffController
operator= (const DtFixedWingTakeoffController &orig)
 assignment operator; not DtFixedWingTakeoffController

Detailed Description

DtFixedWingTakeoffController is a controller that models take-off behavior for fixed-wing entities.

End User Description: This controller tasks an entity to move along the landing strip, causing its speed to increase to takeoff speed. Once at takeoff speed, it tasks the entity to fly to the takeoff location. This controller tasks a plane to move along the takeoff route using the DtFlyAlongRoute task. While taxiing, the plane's speed is set to the takeoff speed (which defaults to 30% above lift). At the end of the takeoff route, the plane is tasked to fly to a point above the ground, given the DtFlyToLocationTask (this, like the DtFlyAlongRouteTask has the "useFixedPitch" flag, which is true). The point to fly to is specified by takeoff-target-distance: The distance away from the takeoff route to fly to and takeoff-target-altitude: The height above the terrain to fly to

No information needs to be published since the plane is simply flying to a point. Once the task is complete, if the plane has no other task it circles around the takeoff target point

Uses Descriptor Type: DtComponentDescriptor


Constructor & Destructor Documentation

DtFixedWingTakeoffController::DtFixedWingTakeoffController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor

default constructor; not implemented

copy constructor; not implemented


Member Function Documentation

Initializes any state that is needed.

Reimplemented from DtControllerComponent.

Called after all components have been created, initialized and added to the component manager.

Override this function if you need to do any further initialization after all other components have been created.

Reimplemented from DtSimComponent.

virtual DtString DtFixedWingTakeoffController::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtFixedWingTakeoffControllerType

Implements DtTaskControllerComponent.

static DtSimComponent* DtFixedWingTakeoffController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.
virtual void DtFixedWingTakeoffController::registerTaskMsgCallbacks ( ) [protected, virtual]

Override for interest in both takeoff tasks.

Reimplemented from DtTaskControllerComponent.

virtual void DtFixedWingTakeoffController::tick ( ) [protected, virtual]

Ticks and performs current state.

Reimplemented from DtSimComponent.

virtual void DtFixedWingTakeoffController::clearTask ( ) [protected, virtual]

Override to clear out any subtasks we might have.

Reimplemented from DtSingleTaskControllerComponent.

virtual bool DtFixedWingTakeoffController::createPSR ( ) [protected, virtual]

Tasks.

Creates myProcessState data member, and adds it to our process state repository manager. Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.

Looks up the fixed wing flight PSR in the PSR manager, and returns it.

static void DtFixedWingTakeoffController::taskCompleteReportCallback ( DtSimMessage msg,
void *  usr 
) [static, protected]

Monitor taskReportComplete callback to see when our moveTo task is complete during embarkation so we can then set state to DtMoveToEmbarkPoint.

virtual void DtFixedWingTakeoffController::processTaskComplete ( DtSimMessage msg) [protected, virtual]
virtual void DtFixedWingTakeoffController::processTakeoffTask ( DtSimMessage msg) [protected, virtual]

Starts the processing of the takeoff task.

This will task the fixed wing to move along the landing strip, coming to takeoff speed, then flying to the takeoff point

static void DtFixedWingTakeoffController::takeoffTaskCallback ( DtSimMessage msg,
void *  usr 
) [static, protected]
static void DtFixedWingTakeoffController::deleteVrfObjectCallback ( DtVrfObject msg,
void *  usr 
) [static, protected]

If an object is deleted and it is the object we are trying to takeoff from, then stop the current takeoff task.

virtual void DtFixedWingTakeoffController::processDeleteVrfObjectCallback ( DtVrfObject obj) [protected, virtual]

Sets state in PSR and returns state from PSR.

virtual void DtFixedWingTakeoffController::movingAlongTakeoffRoute ( ) [protected, virtual]

Called when moving along the takeoff strip.

Once the plane gets to the check point, then, the plane will be tasked to fly to the takeoff point

virtual void DtFixedWingTakeoffController::calculateVertexAndRotation ( const DtLocalVector start,
const DtLocalVector end,
const DtVector distance,
DtVector vertex,
DtDcm &  rotationDcm 
) const [protected, virtual]

Calculats the last point in the landing strip takeoff vector.

virtual double DtFixedWingTakeoffController::turningPointDistance ( ) const [protected, virtual]

Returns a number of meters out from start point to give the plane a chance to turn around to meet.

Defaults to 20 meters

virtual void DtFixedWingTakeoffController::startTakeoff ( ) [protected, virtual]

Issues move along task for landing strip and sets state to DtMovingAlongTakeoffRoute.

virtual void DtFixedWingTakeoffController::flyingTowardsTakeoffPoint ( ) [protected, virtual]

Called when flying towards takeoff point. Currently does nothing.

virtual void DtFixedWingTakeoffController::flyTowardsTakeoffPoint ( ) [protected, virtual]

Sends DtFlyToLocationTask task (with fixed pitch) and sets state to DtFlyingTowardsTakeoffPoint.

const DtFixedWingTakeoffController& DtFixedWingTakeoffController::operator= ( const DtFixedWingTakeoffController orig) [private]

assignment operator; not DtFixedWingTakeoffController


Member Data Documentation

Container for state data associated with this component.

This state is saved and restored as part of a scenario (or checkpoint).


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)