[Gcblue-commits] gcb_wx/include/sim tcGameObject.h,1.11,1.12 tcLauncherState.h,1.4,1.5 tcMapView.h,1
Status: Alpha
Brought to you by:
ddcforge
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11210/include/sim Modified Files: tcGameObject.h tcLauncherState.h tcMapView.h tcPlatformObject.h tcRadarSensorState.h tcSensorState.h tcSimState.h Log Message: Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcGameObject.h 30 Jan 2004 01:02:34 -0000 1.11 --- tcGameObject.h 1 Feb 2004 22:19:08 -0000 1.12 *************** *** 119,123 **** void SetVisible(bool vis) {rel_pos.isVisible = vis;} virtual void SetSpeed(float afNewSpeed) {} ! virtual void SetLaunch(int anLauncher, int anQuantity) {} virtual void SetFormation(tsFormationParameters asFP) {} static void SetGameObjectDatabase(Database::tcDatabase *db) {database = db;} --- 119,123 ---- void SetVisible(bool vis) {rel_pos.isVisible = vis;} virtual void SetSpeed(float afNewSpeed) {} ! virtual int SetLaunch(int anLauncher, int anQuantity) {return 9;} virtual void SetFormation(tsFormationParameters asFP) {} static void SetGameObjectDatabase(Database::tcDatabase *db) {database = db;} Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcLauncherState.h 30 Jan 2004 01:02:34 -0000 1.4 --- tcLauncherState.h 1 Feb 2004 22:19:08 -0000 1.5 *************** *** 47,63 **** { int mbActive; long mnDBKey; ///< key in launcher database tcLauncherDBObject *mpLauncherDBObj; long mnChildDBKey; tcDatabaseObject *mpChildDBObj; float mfTimeToReady; unsigned int mnCurrent; tsGeoPoint msDatum; ///< datum to pass to weapon nav guidance tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land - unsigned int mnPending; float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow tcRadar *fireControlSensor; ///< sensor for fire control guidance }; --- 47,68 ---- { int mbActive; + long mnDBKey; ///< key in launcher database tcLauncherDBObject *mpLauncherDBObj; long mnChildDBKey; tcDatabaseObject *mpChildDBObj; + float mfTimeToReady; unsigned int mnCurrent; + unsigned int mnPending; + tsGeoPoint msDatum; ///< datum to pass to weapon nav guidance tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow + tcRadar *fireControlSensor; ///< sensor for fire control guidance + unsigned fireControlSensorIdx; ///< index of sensor on parent platform }; *************** *** 68,71 **** --- 73,91 ---- { 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, + }; ///< launcher status codes tcGameObject *parent; int mnCount; *************** *** 75,89 **** static void AttachSimState(tcSimState* ss) {simState = ss;} ! void AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey, float azimuth_rad); int GetLauncherQuantity(unsigned anLauncher); std::string GetLaunchMode(unsigned anLauncher); bool IsDatumLaunch(unsigned anLauncher); bool IsSeekerLaunch(unsigned anLauncher); ! bool ReadyToLaunch(unsigned nLauncher); void Serialize(tcFile& file, bool abLoad); ! void SetFireControlSensor(unsigned nLauncher, tcRadar* radar); bool SetLauncherDatum(unsigned nLauncher, double lon_rad, double lat_rad); bool SetLauncherTarget(unsigned nLauncher, long targetID); void SetParent(tcGameObject *obj) {parent = obj;} tcLauncherState(); tcLauncherState(tcGameObject *parentObj); --- 95,111 ---- static void AttachSimState(tcSimState* ss) {simState = ss;} ! void AddFullLauncher(tnPoolIndex anKey, float azimuth_rad); int GetLauncherQuantity(unsigned anLauncher); + int GetLauncherStatus(unsigned nLauncher); std::string GetLaunchMode(unsigned anLauncher); bool IsDatumLaunch(unsigned anLauncher); bool IsSeekerLaunch(unsigned anLauncher); ! void Serialize(tcFile& file, bool abLoad); ! void SetFireControlSensor(unsigned nLauncher, tcRadar* radar, unsigned sensorIdx); bool SetLauncherDatum(unsigned nLauncher, double lon_rad, double lat_rad); bool SetLauncherTarget(unsigned nLauncher, long targetID); void SetParent(tcGameObject *obj) {parent = obj;} + static std::string TranslateLauncherStatus(int status); tcLauncherState(); tcLauncherState(tcGameObject *parentObj); Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMapView.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcMapView.h 29 Jan 2004 00:05:17 -0000 1.13 --- tcMapView.h 1 Feb 2004 22:19:08 -0000 1.14 *************** *** 156,161 **** float mfGridSize_rad; float mfGridBaseLon_rad,mfGridBaseLat_rad; ! float mfScale_pelprad; ///< map scale, pixels per radian ! float mfScale_radppel; ///< map scale, radians per pixel std::vector<tcMapObject*> specialGraphics; ///< mission graphics display for now --- 156,163 ---- float mfGridSize_rad; float mfGridBaseLon_rad,mfGridBaseLat_rad; ! float mfScaleX_pelprad; ///< map scale in X, pixels per radian ! float mfScaleX_radppel; ///< map scale in X, radians per pixel ! float mfScaleY_pelprad; ///< map scale in Y, pixels per radian ! float mfScaleY_radppel; ///< map scale in Y, radians per pixel std::vector<tcMapObject*> specialGraphics; ///< mission graphics display for now *************** *** 192,195 **** --- 194,198 ---- tcPoint ScreenToGeo(float x, float y); void SetActive(bool abActive); ///< overrides base class + void SetSize(const wxRect& rect); void SetView(tcPoint center, float afLonSpan); void SetViewCenterZoom(wxPoint pscreen, float afZoom); Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcPlatformObject.h 30 Jan 2004 01:02:34 -0000 1.8 --- tcPlatformObject.h 1 Feb 2004 22:19:08 -0000 1.9 *************** *** 67,70 **** --- 67,71 ---- virtual bool IsRadiating(void); virtual std::vector<tcSensorState*>* GetSensorStateArray(void) {return &mapSensorState;} + virtual tcSensorState* GetSensor(unsigned idx); virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher); virtual void RandInitNear(float afLon_deg, float afLat_deg); *************** *** 72,76 **** virtual void SetHeading(float afNewHeading) {mcGS.SetHeading(afNewHeading);} virtual void SetSpeed(float afNewSpeed); ! virtual void SetLaunch(int anLauncher, int anQuantity); virtual void SetFormation(tsFormationParameters asFP) {msFormationParameters=asFP;} virtual void UpdateKin(double afStatusTime); --- 73,77 ---- virtual void SetHeading(float afNewHeading) {mcGS.SetHeading(afNewHeading);} virtual void SetSpeed(float afNewSpeed); ! virtual int SetLaunch(int anLauncher, int anQuantity); virtual void SetFormation(tsFormationParameters asFP) {msFormationParameters=asFP;} virtual void UpdateKin(double afStatusTime); Index: tcRadarSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadarSensorState.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcRadarSensorState.h 30 Jan 2004 01:02:34 -0000 1.4 --- tcRadarSensorState.h 1 Feb 2004 22:19:08 -0000 1.5 *************** *** 64,71 **** // fire control methods ! virtual bool IsTrackAvailable(const tcGameObject* target); ! virtual bool RequestTrack(const tcGameObject* target); virtual bool ReleaseTrack(); virtual void SetIlluminator(long illum_id, unsigned sensor_idx); --- 64,72 ---- // fire control methods ! virtual bool IsTrackAvailable(); ! virtual bool RequestTrack(); virtual bool ReleaseTrack(); + virtual bool IsSemiactive() {return isSemiactive;} virtual void SetIlluminator(long illum_id, unsigned sensor_idx); *************** *** 79,82 **** --- 80,85 ---- protected: bool isSemiactive; + + tcRadar* GetSemiactiveIlluminator(); }; Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSensorState.h 29 Jan 2004 00:05:18 -0000 1.3 --- tcSensorState.h 1 Feb 2004 22:19:08 -0000 1.4 *************** *** 37,40 **** --- 37,42 ---- #define SSMODE_FCSURVEILLANCE 6 // both + class tcSimState; + /** * Represents the state of a sensor. *************** *** 55,58 **** --- 57,61 ---- float mfSensorHeight_m; ///< height of sensor relative to platform altitude + static void AttachSimState(tcSimState *ss) {simState = ss;} void GetTestArea(tcRect& region); virtual bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); *************** *** 64,67 **** --- 67,73 ---- tcSensorState(); virtual ~tcSensorState(); + + protected: + static tcSimState *simState; }; #endif \ No newline at end of file Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcSimState.h 29 Jan 2004 00:05:21 -0000 1.12 --- tcSimState.h 1 Feb 2004 22:19:08 -0000 1.13 *************** *** 103,107 **** void BuildCollisionGroups(); bool RadarCanDetect(tnPoolIndex anSensorKey, const tcGameObject* target, ! tsGeoPoint asSensorLocation, float afSensorAz); void ChangeHeading(long anKey, float afNewHeading); void ChangeHeadingForced(tnPoolIndex anKey, float afNewHeading); // for scen edit mode --- 103,107 ---- void BuildCollisionGroups(); bool RadarCanDetect(tnPoolIndex anSensorKey, const tcGameObject* target, ! tsGeoPoint asSensorLocation, float afSensorAz, long fcID = -1, unsigned fcIdx = 0); void ChangeHeading(long anKey, float afNewHeading); void ChangeHeadingForced(tnPoolIndex anKey, float afNewHeading); // for scen edit mode |