VR-Forces 4.0.4 Class Documentation
include/vrfmodel/rotWingAct.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1999-2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: rotWingAct.h,v $ $Revision: 1.52 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00014 
00015 #ifndef rotWingAct_H_
00016 #define rotWingAct_H_
00017 #include "vrfobjcore/actCmpnt.h"
00018 #include <vlpi/disEnums.h>
00019 #include <matrix/LibMatrix.h>
00020 
00021 class DtString;
00022 class DtSimManager;
00023 class DtRotaryWingEntityStateRepository;
00024 class DtConstrainedAnalogInputPort;
00025 class DtConstrainedDualAxisAnalogInputPort;
00026 class DtRotaryWingActuatorDescriptor;
00027 class DtRotaryWingFlightPSR;
00028 class DtPhysicalWorld;
00029 class DtTerrainDatabase;
00030 
00039 #include "vrfmodel/vrfmodelDefines.h"
00040 class DT_DLL_vrfmodel DtRotaryWingActuatorComponent : public DtActuatorComponent
00041 {
00042 
00043 public:
00044 
00047    DtRotaryWingActuatorComponent(const DtString& name, 
00048       DtVrfObject* owner,
00049       DtSimManager* simManager, 
00050       DtComponentDescriptor* desc = 0,
00051       DtReaderWriterRegistry* parentRegistry = 0);
00052 
00056    virtual ~DtRotaryWingActuatorComponent();
00057 
00060    virtual bool init();
00061 
00064    virtual DtString type() const;
00065 
00067    virtual void tick();
00068 
00072    virtual void useFuel(double fuelUsed);
00073    virtual double fuelLeft() const;
00074 
00076    virtual double calculateFuel() const;
00077 
00083    virtual void fallFromSky();
00084 
00088    static DtSimComponent * creator(const DtString& name, 
00089       DtVrfObject* owner,
00090       DtSimManager* simManager, 
00091       DtComponentDescriptor* desc = 0,
00092       DtReaderWriterRegistry* parentRegistry = 0);
00093 
00094 protected:
00095 
00097    virtual bool createPortGroups();
00098 
00100    virtual bool createPorts();
00101 
00107    virtual bool createPSR();
00108 
00110    virtual void clampFrameRate();
00111 
00113    virtual void setLanded(const DtVector& localIntersectionPoint);
00114 
00116    virtual bool checkFlyingWithoutFuel();
00117 
00119    virtual void calculateYawAcceleration();
00120    virtual void calculateYawRate();
00121 
00123    virtual void calculatePitchAcceleration();
00124    virtual void calculatePitchRate();
00125 
00127    virtual void calculateRollAcceleration();
00128    virtual void calculateRollRate();
00129 
00132    virtual void calculateOrientation();
00133 
00135    virtual void calculateNormalizedBodyVelocity();
00136 
00138    virtual void calculateBodyGravity();
00139 
00141    virtual void calculateLiftAcceleration();
00142 
00144    virtual void calculateDragAcceleration();
00145 
00148    virtual void calculateResultantAcceleration();
00149 
00151    virtual void integrate();
00152 
00154    virtual void updateRepository();
00155 
00157    virtual void updateDisplay() const;
00158 
00178    virtual void checkLandedOrCrashed();
00179 
00183 
00191    virtual bool isCrashedIntoGround(const DtVector& localPosition, 
00192       DtVector& localIntersectionPoint) const;
00193 
00196    virtual void sendDetonation(const DtVector& geocentricLocation) const;
00197 
00203    virtual bool isSubsurface() const;
00204 
00213    virtual bool componentInitialized() const;
00214 
00217    virtual bool engineOperational() const;
00218 
00219 
00220 private:
00221    
00223    DtRotaryWingActuatorComponent();
00224 
00226    DtRotaryWingActuatorComponent(const DtRotaryWingActuatorComponent & orig);
00227 
00229    DtRotaryWingActuatorComponent& operator=(const DtRotaryWingActuatorComponent& orig);
00230 
00231 
00232 protected:
00233 
00234    DtRotaryWingEntityStateRepository*  myRotaryWingEntityState;
00235    DtRotaryWingActuatorDescriptor*     myRotaryWingActuatorDescriptor;
00236 
00239    
00242    DtInputPortGroup*                   myRotaryWingControlPortGroup;
00243          
00249    DtConstrainedAnalogInputPort*       myThrottlePort;
00250 
00256    DtConstrainedDualAxisAnalogInputPort*  myCyclicPort;
00257 
00263    DtConstrainedAnalogInputPort*       myPedalPort;
00264 
00270    DtConstrainedAnalogInputPort*       myCollectivePort;
00271    
00273 
00274    DtReal      myMaxDragAcceleration;
00275    DtVector    myBodyRotationalAcceleration;
00276    DtVector    myBodyRotationRates;
00277    DtTaitBryan myOrientation;
00278    DtDcm       myBodyToLocalMatrix;
00279    DtDcm       myLocalToBodyMatrix;
00280    DtReal      mySpeedRatioSquared;
00281    DtVector    myBodyVelocity;
00282    DtVector    myNormalizedBodyVelocity;
00283    DtVector    myBodyDrag;
00284    DtVector    myBodyGravity;
00285    DtVector    myBodyLift;
00286    DtVector    myBodyAcceleration;
00287    DtVector    myRelativeAcceleration;
00288    DtVector    myRelativeVelocity;
00289    DtReal      mySpeed;
00290    DtVector    myLocalPosition;
00291    DtVector    myLocalOrientation;
00292    DtReal      myAltitude;
00293    DtVector    myPreviousGroundClampedPosition;
00294    bool        myPrintedOutOfFuelMessage;
00295 
00298    DtRotaryWingFlightPSR* myProcessState;
00299 };
00300 
00301 #endif

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)