VR-Forces 4.0.4 Class Documentation
include/vrfmodel/fixWngMvAlg.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1999-2000 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00008 
00011 
00012 
00013 #pragma once
00014 
00015 #include "vrfmodel/fixWngPltCtl.h"
00016 
00017 class DtString;
00018 class DtSimManager;
00019 
00020 class DtConstrainedAnalogPort;
00021 class boolPort;
00022 class DtRouteState;
00023 class DtSimMessage;
00024 
00027 #define DT_LANDING_BUFFER 5.0
00028 
00045 #include "vrfmodel/vrfmodelDefines.h"
00046 class DT_DLL_vrfmodel DtFixedWingMoveAlongController : public DtFixedWingPilotController
00047 {
00048 
00049 public:
00050 
00053    DtFixedWingMoveAlongController(const DtString& name, 
00054       DtVrfObject* owner,
00055       DtSimManager* simManager, 
00056       DtComponentDescriptor* desc = 0,
00057       DtReaderWriterRegistry* parentRegistry = 0);
00058 
00060    virtual ~DtFixedWingMoveAlongController();
00061 
00066    virtual void tick();
00067 
00070    virtual DtString type() const;
00071 
00074    virtual void doFinishing();
00075 
00083    virtual void doFinishingForFlying();
00084 
00088    virtual void doFinishingForTaxiing();
00089 
00092    virtual void doMoving();
00093 
00099    virtual void doFlying();
00100 
00105    virtual void doTaxiing();
00106 
00111    virtual void doTakeOff();
00112 
00119    virtual void doLanding();
00120 
00129    virtual double findDesiredSpeed();
00130 
00139    virtual bool nearGoal();
00140 
00145    virtual bool atGoal();
00146 
00150    virtual bool passedGoal();
00151 
00157    static void moveAlongCallback(DtSimMessage * msg, void * usrData);
00158    static void flyAlongCallback(DtSimMessage * msg, void * usrData);
00159    static void routeChangedCallback(DtVrfObject * obj, void * usrData);
00160    static void setAltitudeCallback(DtSimMessage * msg, void * usrData);
00161    static void setLocationCallback(DtSimMessage * msg, void * usrData);
00162    static void setRestoreCallback(DtSimMessage * msg, void * usrData);
00163    static void modifyVrfObjectCallback(DtSimMessage * msg, void * usr);
00164    static void deleteVrfObjectCallback(DtVrfObject * msg, void * usr);
00165 
00166    virtual void processFlyAlongTask(DtSimMessage * msg);
00167 
00168    virtual void processMoveAlongTask(DtSimMessage * msg);
00172    virtual void processRouteChanged(DtVrfObject * obj);
00176    virtual void processSetAltitude(DtSimMessage * msg);
00177    virtual void processSetLocation(DtSimMessage * msg);
00178    virtual void processSetRestore(DtSimMessage * msg);
00183    virtual void processModifyVrfObject(DtSimMessage * msg);
00186    virtual void processDeleteVrfObject(DtVrfObject *msg);
00187 
00188    virtual bool setupRoute();
00189 
00192    virtual void registerTaskMsgCallbacks();
00193 
00197    static DtSimComponent * creator(const DtString& name, 
00198       DtVrfObject* owner,
00199       DtSimManager* simManager, 
00200       DtComponentDescriptor* desc = 0,
00201       DtReaderWriterRegistry* parentRegistry = 0);
00202 
00203 protected:
00204 
00206    DtFixedWingMoveAlongController();
00207 
00209    DtFixedWingMoveAlongController(
00210       const DtFixedWingMoveAlongController& orig);
00211 
00213    DtFixedWingMoveAlongController& operator=(
00214       const DtFixedWingMoveAlongController& orig);
00215 
00217    void clearStoredRoute();
00218 
00222    void updateTakeOffDir();
00223    void updateLandingDir();
00224 
00232    void processEntityLocationChange();
00233 
00256    virtual bool setMovementStatusFromRoute();
00257 
00259    virtual void resetValues();
00260 
00262    virtual void clearTask();
00263 
00264 protected:
00265 
00268    DtVrfObject*   myRoute;
00269 
00270    bool      myRouteHasChanged;
00271 
00272    bool           myFirstTick;
00273 
00274 };
00275 

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)