- Timestamp:
- Jul 16, 2015, 9:49:27 AM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r7014 r7054 645 645 // IOD of Glonass Ephemeris (virtual) 646 646 //////////////////////////////////////////////////////////////////////////// 647 intt_ephGlo::IOD() const {647 unsigned long t_ephGlo::IOD() const { 648 648 bncTime tMoscow = _TOC - _gps_utc + 3 * 3600.0; 649 return int(tMoscow.daysec() / 900);649 return (unsigned long)tMoscow.daysec() / 900; 650 650 } 651 651 … … 1130 1130 } 1131 1131 1132 // IOD of SBAS Ephemeris (virtual) 1133 //////////////////////////////////////////////////////////////////////////// 1134 1135 unsigned long t_ephSBAS::IOD() const { 1136 unsigned char buffer[80]; 1137 int size = 0; 1138 int numbits = 0; 1139 long long bitbuffer = 0; 1140 unsigned char *startbuffer = buffer; 1141 1142 SBASADDBITSFLOAT(30, this->_x_pos, 0.08) 1143 SBASADDBITSFLOAT(30, this->_y_pos, 0.08) 1144 SBASADDBITSFLOAT(25, this->_z_pos, 0.4) 1145 SBASADDBITSFLOAT(17, this->_x_velocity, 0.000625) 1146 SBASADDBITSFLOAT(17, this->_y_velocity, 0.000625) 1147 SBASADDBITSFLOAT(18, this->_z_velocity, 0.004) 1148 SBASADDBITSFLOAT(10, this->_x_acceleration, 0.0000125) 1149 SBASADDBITSFLOAT(10, this->_y_acceleration, 0.0000125) 1150 SBASADDBITSFLOAT(10, this->_z_acceleration, 0.0000625) 1151 SBASADDBITSFLOAT(12, this->_agf0, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1152 SBASADDBITSFLOAT(8, this->_agf1, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<10)) 1153 SBASADDBITS(5,0); // the last byte is filled by 0-bits to obtain a length of an integer multiple of 8 1154 1155 return CRC24(size, startbuffer); 1156 } 1157 1132 1158 // Compute SBAS Satellite Position (virtual) 1133 1159 //////////////////////////////////////////////////////////////////////////// … … 1331 1357 // but it seems to be unreliable in RINEX files 1332 1358 //_TOT = _TOC.bdssec(); 1359 } 1360 1361 // IOD of BDS Ephemeris (virtual) 1362 //////////////////////////////////////////////////////////////////////////// 1363 unsigned long t_ephBDS::IOD() const { 1364 unsigned char buffer[80]; 1365 int size = 0; 1366 int numbits = 0; 1367 long long bitbuffer = 0; 1368 unsigned char *startbuffer = buffer; 1369 1370 BDSADDBITSFLOAT(14, this->_IDOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13)) 1371 BDSADDBITSFLOAT(11, this->_clock_driftrate, 1.0/static_cast<double>(1<<30) 1372 /static_cast<double>(1<<30)/static_cast<double>(1<<6)) 1373 BDSADDBITSFLOAT(22, this->_clock_drift, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<20)) 1374 BDSADDBITSFLOAT(24, this->_clock_bias, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3)) 1375 BDSADDBITSFLOAT(18, this->_Crs, 1.0/static_cast<double>(1<<6)) 1376 BDSADDBITSFLOAT(16, this->_Delta_n, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13)) 1377 BDSADDBITSFLOAT(32, this->_M0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1378 BDSADDBITSFLOAT(18, this->_Cuc, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1379 BDSADDBITSFLOAT(32, this->_e, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3)) 1380 BDSADDBITSFLOAT(18, this->_Cus, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1381 BDSADDBITSFLOAT(32, this->_sqrt_A, 1.0/static_cast<double>(1<<19)) 1382 BDSADDBITSFLOAT(18, this->_Cic, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1383 BDSADDBITSFLOAT(32, this->_OMEGA0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1384 BDSADDBITSFLOAT(18, this->_Cis, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1385 BDSADDBITSFLOAT(32, this->_i0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1386 BDSADDBITSFLOAT(18, this->_Crc, 1.0/static_cast<double>(1<<6)) 1387 BDSADDBITSFLOAT(32, this->_omega, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 1388 BDSADDBITSFLOAT(24, this->_OMEGADOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13)) 1389 BDSADDBITS(5, 0) // the last byte is filled by 0-bits to obtain a length of an integer multiple of 8 1390 1391 return CRC24(size, startbuffer); 1333 1392 } 1334 1393 -
trunk/BNC/src/ephemeris.h
r6843 r7054 11 11 #include "gnss.h" 12 12 13 13 14 class t_orbCorr; 14 15 class t_clkCorr; … … 24 25 virtual e_type type() const = 0; 25 26 virtual QString toString(double version) const = 0; 26 virtual intIOD() const = 0;27 virtual unsigned long IOD() const = 0; 27 28 virtual int slotNum() const {return 0;} 28 29 bncTime TOC() const {return _TOC;} … … 60 61 virtual e_type type() const {return (_prn.system() == 'J' ? t_eph::QZSS : t_eph::GPS); } 61 62 virtual QString toString(double version) const; 62 virtual int IOD() const { return static_cast<int>(_IODC); }63 virtual unsigned long IOD() const { return static_cast<unsigned long>(_IODC); } 63 64 double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB) 64 65 … … 114 115 virtual e_type type() const {return t_eph::GLONASS;} 115 116 virtual QString toString(double version) const; 116 virtual intIOD() const;117 virtual unsigned long IOD() const; 117 118 virtual int slotNum() const {return int(_frequency_number);} 118 119 … … 155 156 virtual QString toString(double version) const; 156 157 virtual e_type type() const {return t_eph::Galileo;} 157 virtual int IOD() const { return static_cast<int>(_IODnav); }158 virtual unsigned long IOD() const { return static_cast<unsigned long>(_IODnav); } 158 159 159 160 private: … … 217 218 218 219 virtual e_type type() const {return t_eph::SBAS;} 219 virtual int IOD() const {return _IODN;}220 virtual unsigned long IOD() const; 220 221 virtual QString toString(double version) const; 221 222 … … 253 254 254 255 virtual e_type type() const {return t_eph::BDS;} 255 virtual int IOD() const {return _AODC;}256 virtual unsigned long IOD() const; 256 257 virtual QString toString(double version) const; 257 258
Note:
See TracChangeset
for help on using the changeset viewer.