00001 #pragma ident "$Id: DataHeaders.cpp 1940 2009-06-13 11:10:37Z architest $"
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "DataHeaders.hpp"
00032
00033
00034 using namespace std;
00035
00036
00037 namespace gpstk
00038 {
00039
00040
00041
00042 sourceHeader& sourceHeader::operator=(const sourceHeader& right)
00043 {
00044
00045 if ( this == &right )
00046 {
00047 return (*this);
00048 }
00049
00050 source = right.source;
00051
00052 return (*this);
00053
00054 }
00055
00056
00057
00058
00059 std::ostream& sourceHeader::dump(std::ostream& s) const
00060 {
00061
00062 s << source;
00063
00064 return s;
00065
00066 }
00067
00068
00069
00070
00071 std::ostream& operator<<( std::ostream& s,
00072 const sourceHeader& sh )
00073 {
00074
00075 sh.dump(s);
00076
00077 return s;
00078
00079 }
00080
00081
00082
00083
00084 sourceEpochHeader& sourceEpochHeader::operator=(
00085 const sourceEpochHeader& right )
00086 {
00087
00088 if ( this == &right )
00089 {
00090 return (*this);
00091 }
00092
00093 source = right.source;
00094 epoch = right.epoch;
00095
00096 return (*this);
00097
00098 }
00099
00100
00101
00102
00103 std::ostream& sourceEpochHeader::dump(std::ostream& s) const
00104 {
00105
00106 s << source << " " << epoch;
00107
00108 return s;
00109
00110 }
00111
00112
00113
00114
00115 std::ostream& operator<<( std::ostream& s,
00116 const sourceEpochHeader& seh )
00117 {
00118
00119 seh.dump(s);
00120
00121 return s;
00122
00123 }
00124
00125
00126
00127
00128 sourceEpochRinexHeader::sourceEpochRinexHeader( const sourceHeader& sh,
00129 const DayTime& time,
00130 const std::string& antType,
00131 const Triple& antPos,
00132 const short& flag )
00133 : antennaType(antType), antennaPosition(antPos), epochFlag(flag)
00134 {
00135
00136 source.sourceName = sh.source.sourceName;
00137 source.type = sh.source.type;
00138 epoch = time;
00139
00140 }
00141
00142
00143
00144
00145 sourceEpochRinexHeader& sourceEpochRinexHeader::operator=(
00146 const sourceEpochRinexHeader& right)
00147 {
00148
00149 if ( this == &right )
00150 {
00151 return (*this);
00152 }
00153
00154 source = right.source;
00155 epoch = right.epoch;
00156 antennaType = right.antennaType;
00157 antennaPosition = right.antennaPosition;
00158 epochFlag = right.epochFlag;
00159
00160 return (*this);
00161
00162 }
00163
00164
00165
00166
00167 std::ostream& sourceEpochRinexHeader::dump(std::ostream& s) const
00168 {
00169
00170 s << source << " "
00171 << epoch << " "
00172 << antennaType << " "
00173 << antennaPosition << " "
00174 << epochFlag;
00175
00176 return s;
00177
00178 }
00179
00180
00181
00182
00183 std::ostream& operator<<( std::ostream& s,
00184 const sourceEpochRinexHeader& serh )
00185 {
00186
00187 serh.dump(s);
00188
00189 return s;
00190
00191 }
00192
00193
00194
00195
00196 sourceTypeHeader& sourceTypeHeader::operator=(const sourceTypeHeader& right)
00197 {
00198
00199 if ( this == &right )
00200 {
00201 return (*this);
00202 }
00203
00204 source = right.source;
00205 type = right.type;
00206
00207 return (*this);
00208
00209 }
00210
00211
00212
00213
00214 std::ostream& sourceTypeHeader::dump(std::ostream& s) const
00215 {
00216
00217 s << source << " " << type;
00218
00219 return s;
00220
00221 }
00222
00223
00224
00225
00226 std::ostream& operator<<( std::ostream& s,
00227 const sourceTypeHeader& sth )
00228 {
00229
00230 sth.dump(s);
00231
00232 return s;
00233
00234 }
00235
00236
00237
00238
00239 sourceSatHeader& sourceSatHeader::operator=(const sourceSatHeader& right)
00240 {
00241
00242 if ( this == &right )
00243 {
00244 return (*this);
00245 }
00246
00247 source = right.source;
00248 satellite = right.satellite;
00249
00250 return (*this);
00251
00252 }
00253
00254
00255
00256
00257 std::ostream& sourceSatHeader::dump(std::ostream& s) const
00258 {
00259
00260 s << source << " " << satellite;
00261
00262 return s;
00263
00264 }
00265
00266
00267
00268
00269 std::ostream& operator<<( std::ostream& s,
00270 const sourceSatHeader& ssh )
00271 {
00272
00273 ssh.dump(s);
00274
00275 return s;
00276
00277 }
00278
00279
00280
00281
00282 sourceEpochSatHeader& sourceEpochSatHeader::operator=(
00283 const sourceEpochSatHeader& right )
00284 {
00285
00286 if ( this == &right )
00287 {
00288 return (*this);
00289 }
00290
00291 source = right.source;
00292 epoch = right.epoch;
00293 satellite = right.satellite;
00294
00295 return (*this);
00296
00297 }
00298
00299
00300
00301
00302 std::ostream& sourceEpochSatHeader::dump(std::ostream& s) const
00303 {
00304
00305 s << source << " "
00306 << epoch << " "
00307 << satellite;
00308
00309 return s;
00310
00311 }
00312
00313
00314
00315
00316 std::ostream& operator<<( std::ostream& s,
00317 const sourceEpochSatHeader& sesh )
00318 {
00319
00320 sesh.dump(s);
00321
00322 return s;
00323
00324 }
00325
00326
00327
00328
00329 sourceEpochTypeHeader& sourceEpochTypeHeader::operator=(
00330 const sourceEpochTypeHeader& right )
00331 {
00332
00333 if ( this == &right )
00334 {
00335 return (*this);
00336 }
00337
00338 source = right.source;
00339 epoch = right.epoch;
00340 type = right.type;
00341
00342 return (*this);
00343
00344 }
00345
00346
00347
00348
00349 std::ostream& sourceEpochTypeHeader::dump(std::ostream& s) const
00350 {
00351
00352 s << source << " "
00353 << epoch << " "
00354 << type;
00355
00356 return s;
00357
00358 }
00359
00360
00361
00362
00363 std::ostream& operator<<( std::ostream& s,
00364 const sourceEpochTypeHeader& seth )
00365 {
00366
00367 seth.dump(s);
00368
00369 return s;
00370
00371 }
00372
00373
00374
00375 }