00001
00061 #if !defined(_CIGI_BASE_LOS_RESP_INCLUDED_)
00062 #define _CIGI_BASE_LOS_RESP_INCLUDED_
00063
00064 #include "CigiBasePacket.h"
00065
00066
00067
00068
00069
00070 #define CIGI_LOS_RESP_PACKET_ID_V1 103
00071 #define CIGI_LOS_RESP_PACKET_SIZE_V1 40
00072
00073 #define CIGI_LOS_RESP_PACKET_ID_V2 103
00074 #define CIGI_LOS_RESP_PACKET_SIZE_V2 40
00075
00076 #define CIGI_LOS_RESP_PACKET_ID_V3 104
00077 #define CIGI_LOS_RESP_PACKET_SIZE_V3 16
00078
00079 #define CIGI_LOS_XRESP_PACKET_ID_V3 105
00080 #define CIGI_LOS_XRESP_PACKET_SIZE_V3 56
00081
00082 #define CIGI_LOS_RESP_PACKET_ID_V3_2 104
00083 #define CIGI_LOS_RESP_PACKET_SIZE_V3_2 16
00084
00085 #define CIGI_LOS_XRESP_PACKET_ID_V3_2 105
00086 #define CIGI_LOS_XRESP_PACKET_SIZE_V3_2 56
00087
00088
00089 class CigiLosRespV1;
00090 class CigiLosRespV2;
00091 class CigiLosRespV3;
00092 class CigiLosXRespV3;
00093 class CigiLosRespV3_2;
00094 class CigiLosXRespV3_2;
00095
00096
00097 class CIGI_SPEC CigiBaseLosResp : public CigiBasePacket
00098 {
00099
00100 friend class CigiLosRespV1;
00101 friend class CigiLosRespV2;
00102 friend class CigiLosRespV3;
00103 friend class CigiLosXRespV3;
00104 friend class CigiLosRespV3_2;
00105 friend class CigiLosXRespV3_2;
00106
00107
00108 public:
00109
00110
00113 enum LOSCoordGrp
00114 {
00115 Geodetic=0,
00116 Entity=1
00117 };
00118
00119
00120
00121
00122
00123
00124
00127 CigiBaseLosResp();
00128
00129
00132 virtual ~CigiBaseLosResp();
00133
00134
00135
00136
00137
00148 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00149
00150
00160 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00161
00162
00163
00164
00165
00166
00167
00168
00175 int SetLosID(const Cigi_uint16 LosIDIn, bool bndchk=true)
00176 {
00177 LosID = LosIDIn;
00178 return(CIGI_SUCCESS);
00179 }
00180
00181
00184 Cigi_uint16 GetLosID(void) const { return(LosID); }
00185
00186
00187
00188
00189
00197 int SetValid(const bool ValidIn, bool bndchk=true)
00198 {
00199 Valid = ValidIn;
00200 return(CIGI_SUCCESS);
00201 }
00202
00203
00206 bool GetValid(void) const { return(Valid); }
00207
00208
00209
00210
00211
00219 int SetVisible(const bool VisibleIn, bool bndchk=true)
00220 {
00221 Visible = VisibleIn;
00222 return(CIGI_SUCCESS);
00223 }
00224
00225
00228 bool GetVisible(void) const { return(Visible); }
00229
00230
00231
00232
00233
00240 int SetRange(const double RangeIn, bool bndchk=true)
00241 {
00242 Range = RangeIn;
00243 return(CIGI_SUCCESS);
00244 }
00245
00246
00249 double GetRange(void) const { return(Range); }
00250
00251
00252
00253
00254
00261 int SetLatitude(const double LatitudeIn, bool bndchk=true);
00262
00263
00266 double GetLatitude(void) const { return(LatOrXoff); }
00267
00268
00269
00270
00271
00278 int SetLongitude(const double LongitudeIn, bool bndchk=true);
00279
00280
00283 double GetLongitude(void) const { return(LonOrYoff); }
00284
00285
00286
00287
00288
00295 int SetAltitude(const double AltitudeIn, bool bndchk=true)
00296 {
00297 AltOrZoff = AltitudeIn;
00298 return(CIGI_SUCCESS);
00299 }
00300
00301
00304 double GetAltitude(void) const { return(AltOrZoff); }
00305
00306
00307
00308
00309
00312 bool GetValidV1or2(void) const { return(ValidV1or2); }
00313
00314
00315
00316 protected:
00317
00318
00319
00320
00324 Cigi_uint16 LosID;
00325
00326
00330 bool Valid;
00331
00332
00337 bool EntityIDValid;
00338
00339
00343 bool RangeValid;
00344
00345
00350 bool Visible;
00351
00352
00357 Cigi_uint8 HostFrame;
00358
00359
00366 LOSCoordGrp IntersectionCoordSys;
00367
00368
00372 Cigi_uint8 RespCount;
00373
00374
00378 Cigi_uint16 EntityID;
00379
00380
00384 double Range;
00385
00386
00390 double LatOrXoff;
00391
00392
00396 double LonOrYoff;
00397
00398
00402 double AltOrZoff;
00403
00404
00409 Cigi_uint8 Red;
00410
00411
00416 Cigi_uint8 Green;
00417
00418
00423 Cigi_uint8 Blue;
00424
00425
00430 Cigi_uint8 Alpha;
00431
00432
00436 Cigi_uint32 Material;
00437
00438
00442 float NormalAz;
00443
00444
00448 float NormalEl;
00449
00450
00454 bool ValidV1or2;
00455
00456
00457 };
00458
00459 #endif // #if !defined(_CIGI_BASE_LOS_RESP_INCLUDED_)