00001
00045 #define _EXPORT_CCL_
00046
00047 #include "CigiBaseLosVectReq.h"
00048 #include "CigiSwapping.h"
00049 #include "CigiExceptions.h"
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 CigiBaseLosVectReq::CigiBaseLosVectReq()
00061 {
00062
00063 }
00064
00065
00066
00067
00068
00069
00070 CigiBaseLosVectReq::~CigiBaseLosVectReq()
00071 {
00072
00073 }
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 int CigiBaseLosVectReq::GetCnvt(CigiVersionID &CnvtVersion,
00085 CigiCnvtInfoType::Type &CnvtInfo)
00086 {
00087 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00088
00089
00090
00091 if(CnvtVersion.CigiMajorVersion < 3)
00092 CnvtInfo.CnvtPacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V2;
00093 else
00094 CnvtInfo.CnvtPacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V3;
00095
00096 return(CIGI_SUCCESS);
00097 }
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 int CigiBaseLosVectReq::SetVectEl(const float VectElIn, bool bndchk)
00109 {
00110
00111 #ifndef CIGI_NO_BND_CHK
00112 if(bndchk && ((VectElIn < -90.0)||(VectElIn > 90.0)))
00113 {
00114 #ifndef CIGI_NO_EXCEPT
00115 throw CigiValueOutOfRangeException("VectEl",(float)VectElIn,-90.0,90.0);
00116 #endif
00117 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00118 }
00119 #endif
00120
00121 VectEl = VectElIn;
00122 return(CIGI_SUCCESS);
00123
00124 }
00125
00126
00127
00128
00129
00130 int CigiBaseLosVectReq::SetSrcLat(const double SrcLatIn, bool bndchk)
00131 {
00132
00133 #ifndef CIGI_NO_BND_CHK
00134 if(bndchk && ((SrcLatIn < -90.0)||(SrcLatIn > 90.0)))
00135 {
00136 #ifndef CIGI_NO_EXCEPT
00137 throw CigiValueOutOfRangeException("SrcLat",(double)SrcLatIn,-90.0,90.0);
00138 #endif
00139 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00140 }
00141 #endif
00142
00143 SrcXLat = SrcLatIn;
00144 return(CIGI_SUCCESS);
00145
00146 }
00147
00148
00149
00150
00151
00152 int CigiBaseLosVectReq::SetSrcLon(const double SrcLonIn, bool bndchk)
00153 {
00154
00155 #ifndef CIGI_NO_BND_CHK
00156 if(bndchk && ((SrcLonIn < -180.0)||(SrcLonIn > 180.0)))
00157 {
00158 #ifndef CIGI_NO_EXCEPT
00159 throw CigiValueOutOfRangeException("SrcLon",(double)SrcLonIn,-180.0,180.0);
00160 #endif
00161 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00162 }
00163 #endif
00164
00165 SrcYLon = SrcLonIn;
00166 return(CIGI_SUCCESS);
00167
00168 }
00169
00170