Thread: [Gcblue-commits] gcb_wx/include/sim tcLauncher.h,1.7,1.8 tcLauncherState.h,1.12,1.13 tcTorpedoObject
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-07 03:59:25
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13413/include/sim Modified Files: tcLauncher.h tcLauncherState.h tcTorpedoObject.h Log Message: Sonar work, passive sonar, torpedoes Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcLauncher.h 5 Dec 2004 02:49:46 -0000 1.7 --- tcLauncher.h 7 Dec 2004 03:59:14 -0000 1.8 *************** *** 55,60 **** --- 55,78 ---- { public: + enum teLauncherStatus + { + LAUNCHER_READY = 0, + BAD_LAUNCHER = 1, ///< launcher index does not exist + LAUNCHER_EMPTY = 2, + LAUNCHER_BUSY = 3, ///< launcher reloading + NO_DATUM = 4, + NO_TARGET = 5, + NOT_DETECTED_FC = 6, ///< fire control sensor can't detect target (could be off) + NOT_DETECTED_SEEKER = 7, ///< seeker can't detect target + FC_BUSY = 8, ///< fire control sensor has no free tracks + LAUNCHER_ERROR = 9, + LAUNCHER_INACTIVE = 10, + NO_FIRECONTROL = 11, + TOO_DEEP = 12 ///< too deep for sub launch + }; ///< launcher status codes + int mbActive; + std::string displayName; long mnDBKey; ///< key in launcher database tcLauncherDBObject *mpLauncherDBObj; *************** *** 78,81 **** --- 96,107 ---- unsigned fireControlSensorIdx; ///< index of sensor on parent platform + // torpedo programming params + bool usePassive; + float preEnableSpeed_kts; + float runDepth_m; + float ceiling_m; + float floor_m; + float runToEnable_m; + tcCommandStream& operator<<(tcCommandStream& stream); tcCreateStream& operator<<(tcCreateStream& stream); *************** *** 89,105 **** void CopyCommandInfoFrom(const tcLauncher& launcher); std::string GetChildClassName() const; float GetCycleTime() const; int GetErrorCode() const {return errorCode;} void SetErrorCode(int code) {errorCode = code;} void SetChildClass(const std::string& childClass); void SetChildQuantity(unsigned int quantity); void SetLoadState(bool state); unsigned int GetCompatibleCount() const; std::string GetCompatibleName(unsigned int idx) const; bool IsItemCompatible(const std::string& item) const; tcLauncher(); ! tcLauncher(tcLauncherDBObject* dbObj); ~tcLauncher(); }; --- 115,140 ---- void CopyCommandInfoFrom(const tcLauncher& launcher); std::string GetChildClassName() const; + const std::string& GetLauncherName() const; float GetCycleTime() const; int GetErrorCode() const {return errorCode;} + int GetLauncherStatus(); + void SetErrorCode(int code) {errorCode = code;} void SetChildClass(const std::string& childClass); void SetChildQuantity(unsigned int quantity); void SetLoadState(bool state); + void SetParent(tcGameObject *obj); unsigned int GetCompatibleCount() const; std::string GetCompatibleName(unsigned int idx) const; bool IsItemCompatible(const std::string& item) const; + static std::string TranslateStatus(int status); + tcLauncher(); ! tcLauncher(tcLauncherDBObject* dbObj, tcGameObject* par); ~tcLauncher(); + private: + tcGameObject* parent; + static tcSimState* simState; }; Index: tcTorpedoObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcTorpedoObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcTorpedoObject.h 5 Dec 2004 02:58:24 -0000 1.1 --- tcTorpedoObject.h 7 Dec 2004 03:59:14 -0000 1.2 *************** *** 53,57 **** { SEARCH_STRAIGHT = 0, ! SEARCH_S = 1, SEARCH_LEFTCIRCLE = 2, SEARCH_RIGHTCIRCLE = 3 --- 53,57 ---- { SEARCH_STRAIGHT = 0, ! SEARCH_SNAKE = 1, SEARCH_LEFTCIRCLE = 2, SEARCH_RIGHTCIRCLE = 3 *************** *** 70,78 **** tsGeoPoint waypoint; // nav datum ! float rangeToObjective_km; // for segment determination ! unsigned int currentSegment; tcSonar seeker; ! float fuel_kg; float searchHeading_rad; ///< center of "S" sector to search int searchMode; --- 70,81 ---- tsGeoPoint waypoint; // nav datum ! float runToEnable_m; ! float ceiling_m; // min depth ! float floor_m; // max depth ! bool isWireActive; // true if wire is available to receive remote commands ! tcSonar seeker; ! float battery_kJ; ///< current battery charge float searchHeading_rad; ///< center of "S" sector to search int searchMode; *************** *** 88,92 **** virtual void UpdateGuidance(double t); virtual void SetHeading(float newHeading); - int GetCurrentGuidanceMode(); virtual void SetSpeed(float newSpeed); virtual tcSonar* GetSensorState(); --- 91,94 ---- Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcLauncherState.h 5 Dec 2004 02:49:46 -0000 1.12 --- tcLauncherState.h 7 Dec 2004 03:59:14 -0000 1.13 *************** *** 58,79 **** { public: - enum teLauncherStatus - { - LAUNCHER_READY = 0, - BAD_LAUNCHER = 1, ///< launcher index does not exist - LAUNCHER_EMPTY = 2, - LAUNCHER_BUSY = 3, ///< launcher reloading - NO_DATUM = 4, - NO_TARGET = 5, - NOT_DETECTED_FC = 6, ///< fire control sensor can't detect target (could be off) - NOT_DETECTED_SEEKER = 7, ///< seeker can't detect target - FC_BUSY = 8, ///< fire control sensor has no free tracks - LAUNCHER_ERROR = 9, - LAUNCHER_INACTIVE = 10, - NO_FIRECONTROL = 11, - TOO_DEEP = 12 ///< too deep for sub launch - }; ///< launcher status codes - - tcGameObject *parent; int mnCount; --- 58,61 ---- *************** *** 83,87 **** static void AttachSimState(tcSimState* ss) {simState = ss;} ! void AddFullLauncher(tnPoolIndex anKey, float azimuth_rad); float EstimateInterceptTimeForLauncher(unsigned nLauncher, tcTrack& track); const char* GetFireControlSensorClass(unsigned nLauncher) const; --- 65,69 ---- static void AttachSimState(tcSimState* ss) {simState = ss;} ! void AddFullLauncher(tnPoolIndex anKey, float azimuth_rad, const std::string& displayName); float EstimateInterceptTimeForLauncher(unsigned nLauncher, tcTrack& track); const char* GetFireControlSensorClass(unsigned nLauncher) const; |