Changeset 10587 in ntrip for trunk/BNC/src/ephemeris.h
- Timestamp:
- Dec 10, 2024, 3:57:21 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.h
r10580 r10587 13 13 class t_orbCorr; 14 14 class t_clkCorr; 15 enum e_navType {EPH, STO, EOP, ION};16 15 17 16 class t_eph { 18 17 public: 19 enum e_ type{unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS, IRNSS};18 enum e_system {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS, IRNSS}; 20 19 enum e_checkState {unchecked, ok, bad, outdated, unhealthy}; 21 enum e_ ephType {undefined, LNAV, FDMA, FNAV, INAF, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};20 enum e_type {undefined, LNAV, FDMA, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC}; 22 21 23 22 t_eph(); 24 23 virtual ~t_eph(); 25 24 26 virtual e_ type type() const = 0;25 virtual e_system system() const = 0; 27 26 virtual QString toString(double version) const = 0; 28 27 virtual unsigned int IOD() const = 0; … … 43 42 } 44 43 } 45 e_ ephType ephType() const {return _ephType;}46 t_irc setEphType(QString ephTypeStr);44 e_type type() const {return _type;} 45 void setType(QString typeStr); 47 46 48 47 t_prn prn() const {return _prn;} … … 54 53 static QString rinexDateStr(const bncTime& tt, const t_prn& prn, double version); 55 54 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version); 56 static QString ephTypeStr(e_ephType ephType, const t_prn& prn, double version);55 static QString typeStr(e_type type, const t_prn& prn, double version); 57 56 static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;} 58 57 static bool prnSort(const t_eph* eph1, const t_eph* eph2) {return eph1->prn() < eph2->prn();} … … 65 64 QString _receptStaID; 66 65 e_checkState _checkState; 67 e_ ephType _ephType; // defined in RINEX 466 e_type _type; // defined in RINEX 4 68 67 t_orbCorr* _orbCorr; 69 68 t_clkCorr* _clkCorr; … … 123 122 _ISC_L1P = 0.0; 124 123 _wnop = 0.0; 125 _intSF = -1; 126 _ephSF = -1; 127 _L2Cphasing = -1; 128 _alert = -1; 124 _flags_unknown = true; 125 _intSF = 0.0; 126 _ephSF = 0.0; 127 _L2Cphasing = 0.0; 128 _alert = 0.0; 129 129 _receptStaID = ""; 130 130 } … … 132 132 virtual ~t_ephGPS() {} 133 133 134 virtual e_ type type() const {134 virtual e_system system() const { 135 135 switch (_prn.system()) { 136 136 case 'J': … … 208 208 double _ISC_L1P; // [s] 209 209 210 int _intSF; // [-] integrity status flag 211 int _ephSF; // [-] ephemeris status flag (QZSS) 212 int _L2Cphasing; // [-] L2C phasing flag 213 int _alert; // [-] alert flag 210 bool _flags_unknown; // [-] status flags are unknown => BNK; fitInterval LNAV from QZSS or GPS 211 double _intSF; // [-] integrity status flag 212 double _ephSF; // [-] ephemeris status flag (QZSS) 213 double _L2Cphasing; // [-] L2C phasing flag 214 double _alert; // [-] alert flag 214 215 215 216 double _wnop; // GPS continuous week number with the ambiguity resolved (same as _TOEweek?) … … 221 222 public: 222 223 t_ephGlo() { 223 _xv.ReSize(6); _xv = 0.0; 224 _gps_utc = 0.0; 225 _tau = 0.0; 226 _gamma = 0.0; 227 _tki = 0.0; 228 _x_pos = 0.0; 229 _x_velocity = 0.0; 230 _x_acceleration = 0.0; 231 _health = 0.0; 232 _y_pos = 0.0; 233 _y_velocity = 0.0; 234 _y_acceleration = 0.0; 235 _frequency_number = 0.0; 236 _z_pos = 0.0; 237 _z_velocity = 0.0; 238 _z_acceleration = 0.0; 239 _E = 0.0; 240 _almanac_health = 0.0; 224 _xv.ReSize(6); 225 _xv = 0.0; 226 _gps_utc = 0.0; 227 _tau = 0.0; 228 _tau1 = 0.0; 229 _tau2 = 0.0; 230 _tauC = 0.0; 231 _Tin = 0.0; 232 _gamma = 0.0; 233 _tki = 0.0; 234 _x_pos = 0.0; 235 _x_vel = 0.0; 236 _x_acc = 0.0; 237 _health = 0.0; 238 _y_pos = 0.0; 239 _y_vel = 0.0; 240 _y_acc = 0.0; 241 _frq_num = 0.0; 242 _z_pos = 0.0; 243 _z_vel = 0.0; 244 _z_acc = 0.0; 245 _E = 0.0; 246 _EE = 0.0; 247 _ET = 0.0; 248 _RE = 0.0; 249 _RT = 0.0; 250 _P1 = 0.0; 251 _P2 = 0.0; 252 _P3 = 0.0; 253 _M_M = 0.0; 254 _M_FE = 0.0; 255 _M_FT = 0.0; 256 _M_l3 = 0.0; 257 _M_l5 = 0.0; 258 _M_NA = 0.0; 259 _M_NT = 0.0; 260 _M_N4 = 0.0; 261 _M_P = 0.0; 262 _M_P4 = 0.0; 263 _X_PC = 0.0; 264 _Y_PC = 0.0; 265 _Z_PC = 0.0; 266 _TOT = 0.0; 267 _yaw = 0.0; 268 _sn = 0.0; 269 _sat_type = 0.0; 270 _TGD_L2OCp = 0.0; 271 _TGD_L3OCp = 0.0; 272 _M_tau_GPS = 0.0; 273 _M_delta_tau = 0.0; 274 _attitude_P2 = 0.0; 275 _angular_rate = 0.0; 276 _angular_acc = 0.0; 277 _angular_rate_max = 0.0; 278 _data_validity = 0; 279 _healthflags_unknown = false; 280 _statusflags_unknown = false; 281 _almanac_health = 0.0; 241 282 _almanac_health_availablility_indicator = 0.0; 242 283 _additional_data_availability = 0.0; 243 _tauC = 0.0; 244 _P1 = 0.0; 245 _P2 = 0.0; 246 _P3 = 0.0; 247 _NA = 0.0; 248 _M_P = 0.0; 249 _M_l3 = 0.0; 250 _M_delta_tau = 0.0; 251 _M_P4 = 0.0; 252 _M_FT = 0.0; 253 _M_NT = 0.0; 254 _M_M = 0.0; 255 _M_N4 = 0.0; 256 _M_tau_GPS = 0.0; 257 _M_l5 = 0.0; 258 _receptStaID = ""; 259 _flags_unknown = true; 284 260 285 } 261 286 t_ephGlo(double rnxVersion, const QStringList& lines); 262 287 virtual ~t_ephGlo() {} 263 288 264 virtual e_ type type() const {return t_eph::GLONASS;}289 virtual e_system system() const {return t_eph::GLONASS;} 265 290 virtual QString toString(double version) const; 266 291 virtual unsigned int IOD() const; 267 292 virtual unsigned int isUnhealthy() const; 268 virtual int slotNum() const {return int(_fr equency_number);}293 virtual int slotNum() const {return int(_frq_num);} 269 294 270 295 private: … … 272 297 static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc); 273 298 274 mutable bncTime _tt; // time 275 mutable ColumnVector _xv; // status vector (position, velocity) at time _tt 276 277 double _gps_utc; 278 double _tau; // [s] 279 double _gamma; // [-] 280 mutable double _tki; // message frame time 281 282 double _x_pos; // [km] 283 double _x_velocity; // [km/s] 284 double _x_acceleration; // [km/s^2] 285 double _health; // 0 = O.K. MSB of Bn word 286 287 double _y_pos; // [km] 288 double _y_velocity; // [km/s] 289 double _y_acceleration; // [km/s^2] 290 double _frequency_number; // ICD-GLONASS data position 291 292 double _z_pos; // [km] 293 double _z_velocity; // [km/s] 294 double _z_acceleration; // [km/s^2] 295 double _E; // Age of Information [days] 296 297 double _almanac_health; // Cn word 298 double _almanac_health_availablility_indicator; 299 300 double _additional_data_availability; // 301 double _tauC; // GLONASS time scale correction to UTC(SU) time [sec] 302 double _P1; // flag of the immediate data updating [-] 303 double _P2; // flag of oddness or evenness of the value of tb for intervals 30 or 60 minutes [-] 304 double _P3; // flag indicating a number of satellites for which almanac is transmitted within given frame [-] 305 double _NA; // calendar day number within the 4-year period [days] 306 307 double _M_P; // control segment parameter that indicates the satellite operation mode with respect of time parameters 308 double _M_l3; // health flag 309 double _M_delta_tau; // [sec] 310 double _M_P4; // flag to show that ephemeris parameters are present [-] 311 double _M_FT; // Indicator for predicted satellite User Range Accuracy (URAI) [-] 312 double _M_NT; // current date, calendar number of day within 4-year interval [days] 313 double _M_M; // type of satellite transmitting navigation signal: 0 = GLONASS, 1 = GLONASS-M satellite [-] 314 double _M_N4; // 4-year interval number starting from 1996 315 double _M_tau_GPS; // correction to GPS time relative to GLONASS time [days] 316 double _M_l5; // health flag 317 bool _flags_unknown; // status and health flags are unknown (rnx version < 3.05) or known (rnx version >= 3.05) 299 mutable bncTime _tt; // time 300 mutable ColumnVector _xv; // status vector (position, velocity) at time _tt 301 302 double _gps_utc; // [s] 303 double _tau; // [s] 304 double _tau1; // [s] 305 double _tau2; // [s] 306 double _tauC; // GLONASS time scale correction to UTC(SU) [sec] 307 double _Tin; // sec of day UTC(SU) [s] 308 309 double _gamma; // [-] 310 mutable double _tki; // message frame time 311 312 double _x_pos; // [km] 313 double _x_vel; // [km/s] 314 double _x_acc; // [km/s^2] 315 double _health; // 0 = OK. MSB of Bn word 316 317 double _y_pos; // [km] 318 double _y_vel; // [km/s] 319 double _y_acc; // [km/s^2] 320 double _frq_num; // ICD-GLONASS data position 321 322 double _z_pos; // [km] 323 double _z_vel; // [km/s] 324 double _z_acc; // [km/s^2] 325 326 double _E; // Age of current Information [days] 327 double _EE; // Age Of Data eph [days] 328 double _ET; // Age Of Data clk [days] 329 330 double _TGD_L2OCp; // [sec] 331 double _TGD_L3OCp; // [sec] 332 333 double _almanac_health ; // almanac health bit; 1 = healthy, 1 = not healthy 334 double _almanac_health_availablility_indicator; // 1 = reported in eph record, 0 = not reported 335 double _additional_data_availability; 336 337 double _sat_type; // 0 = GLO_SAT, 1 = GLO_SAT_M (M type), 2 = GLO_SAT_K (K type) 338 double _RE; // source flags; 01 = relay; 10 = prediction (propagation), 11 = use of inter-satellite measurements 339 double _RT; // source flags; 01 = relay, 10 = prediction (propagation), 11 = use of inter-satellite measurements 340 341 double _P1; // update and validity interval [-]; 00 = 0 min, 01 = 30 min, 10 ) 45 min, 11 = 60 min 342 double _P2; // flag of oddness or evenness of the value of tb for intervals 30 or 60 minutes [-] 343 double _P3; // flag indicating a number of satellites for which almanac is transmitted within given frame [-] 344 345 double _M_M; // type of satellite transmitting navigation signal: 0 = GLONASS, 1 = GLONASS-M/K satellite [-] 346 double _M_FE; // Indicator for predicted satellite User Range Accuracy (URAI_orb) [-] 347 double _M_FT; // Indicator for predicted satellite User Range Accuracy (URAI_clk) [-] 348 double _M_l3; // health bit on string 3 GLO-M/K only 349 double _M_l5; // health flag 350 double _M_NA; // calendar day number within the 4-year period [days] 351 double _M_NT; // current date, calendar number of day within 4-year interval [days] 352 double _M_N4; // 4-year interval number starting from 1996 353 double _M_P; // control segment parameter that indicates the satellite operation mode with respect of time parameters 354 double _M_P4; // flag to show that ephemeris parameters are present [-] GLO-M/K only 355 double _M_tau_GPS; // correction to GPS time relative to GLONASS time [days] 356 double _M_delta_tau; // [s] 357 358 bool _statusflags_unknown;// status flags are unknown => BNK in RNX NAV file if message type is FDMA 359 bool _healthflags_unknown;// health flags are unknown => BNK in RNX NAV file if message type is FDMA 360 int _data_validity; // data validity; 0 = valid, 1 = invalid 361 362 double _attitude_P2; // 0 = nominal yaw steering, 1 = rate-limited yaw maneuver 363 double _yaw; // [rad] 364 double _sn; // sign flag 365 double _angular_rate; // [rad/sec] 366 double _angular_rate_max; // [rad/sec] 367 double _angular_acc; // [rad/sec^2] 368 369 double _X_PC; // X PC coord [m] GLO manufacturer coordinate system 370 double _Y_PC; // Y PC coord [m] GLO manufacturer coordinate system 371 double _Z_PC; // Y PC coord [m] GLO manufacturer coordinate system 372 double _TOT; // Time of transmission 318 373 }; 319 374 … … 345 400 _TOEweek = 0.0; 346 401 _SISA = 0.0; 347 _E5a HS= 0.0;348 _E5b HS= 0.0;349 _E1 _bHS = 0.0;402 _E5a_HS = 0.0; 403 _E5b_HS = 0.0; 404 _E1B_HS = 0.0; 350 405 _BGD_1_5A = 0.0; 351 406 _BGD_1_5B = 0.0; … … 353 408 _inav = false; 354 409 _fnav = false; 355 _ e1DataInvalid= false;356 _ e5aDataInvalid= false;357 _ e5bDataInvalid= false;410 _E1B_DataInvalid = false; 411 _E5a_DataInvalid = false; 412 _E5b_DataInvalid = false; 358 413 _receptStaID = ""; 359 414 }; … … 362 417 363 418 virtual QString toString(double version) const; 364 virtual e_ type type() const {return t_eph::Galileo;}419 virtual e_system system() const {return t_eph::Galileo;} 365 420 virtual unsigned int IOD() const { return static_cast<unsigned long>(_IODnav); } 366 421 virtual unsigned int isUnhealthy() const; … … 394 449 395 450 double _IDOT; // [rad/s] 396 double _TOEweek; 451 double _TOEweek; // [-] 397 452 // spare 398 453 399 454 mutable double _SISA; // Signal In Space Accuracy 400 double _E5a HS;// [0..3] E5a Health Status401 double _E5b HS;// [0..3] E5b Health Status402 double _E1 _bHS; // [0..3] E1-bHealth Status455 double _E5a_HS; // [0..3] E5a Health Status 456 double _E5b_HS; // [0..3] E5b Health Status 457 double _E1B_HS; // [0..3] E1B Health Status 403 458 double _BGD_1_5A; // group delay [s] 404 459 double _BGD_1_5B; // group delay [s] … … 407 462 bool _inav; // Data comes from I/NAV when <code>true</code> 408 463 bool _fnav; // Data comes from F/NAV when <code>true</code> 409 bool _ e1DataInvalid; // E1Data is not valid410 bool _ e5aDataInvalid; // E5AData is not valid411 bool _ e5bDataInvalid; // E5BData is not valid464 bool _E1B_DataInvalid; // E1B Data is not valid 465 bool _E5a_DataInvalid; // E5a Data is not valid 466 bool _E5b_DataInvalid; // E5b Data is not valid 412 467 }; 413 468 … … 417 472 public: 418 473 t_ephSBAS() { 419 _IODN 420 _TOT 421 _agf0 422 _agf1 423 _x_pos 424 _x_vel ocity= 0.0;425 _x_acc eleration= 0.0;426 _y_pos 427 _y_vel ocity= 0.0;428 _y_acc eleration= 0.0;429 _z_pos 430 _z_vel ocity= 0.0;431 _z_acc eleration= 0.0;432 _ura 433 _health 434 _receptStaID 474 _IODN = 0; 475 _TOT = 0.0; 476 _agf0 = 0.0; 477 _agf1 = 0.0; 478 _x_pos = 0.0; 479 _x_vel = 0.0; 480 _x_acc = 0.0; 481 _y_pos = 0.0; 482 _y_vel = 0.0; 483 _y_acc = 0.0; 484 _z_pos = 0.0; 485 _z_vel = 0.0; 486 _z_acc = 0.0; 487 _ura = 0.0; 488 _health = 0.0; 489 _receptStaID = ""; 435 490 } 436 491 t_ephSBAS(double rnxVersion, const QStringList& lines); 437 492 virtual ~t_ephSBAS() {} 438 493 439 virtual e_ type type() const {return t_eph::SBAS;}494 virtual e_system system() const {return t_eph::SBAS;} 440 495 virtual unsigned int IOD() const; 441 496 virtual unsigned int isUnhealthy() const; … … 446 501 447 502 int _IODN; 448 double _TOT; 449 double _agf0; 450 double _agf1; 451 452 double _x_pos; 453 double _x_vel ocity;// [m/s]454 double _x_acc eleration; // [m/s^2]455 456 double _y_pos; 457 double _y_vel ocity;// [m/s]458 double _y_acc eleration; // [m/s^2]459 460 double _z_pos; 461 double _z_vel ocity;// [m/s]462 double _z_acc eleration; // [m/s^2]503 double _TOT; // not used (set to 0.9999e9) 504 double _agf0; // [s] clock correction 505 double _agf1; // [s/s] clock correction drift 506 507 double _x_pos; // [m] 508 double _x_vel; // [m/s] 509 double _x_acc; // [m/s^2] 510 511 double _y_pos; // [m] 512 double _y_vel; // [m/s] 513 double _y_acc; // [m/s^2] 514 515 double _z_pos; // [m] 516 double _z_vel; // [m/s] 517 double _z_acc; // [m/s^2] 463 518 464 519 mutable double _ura; … … 474 529 _AODE = 0; 475 530 _AODC = 0; 476 _URAI = 0; 477 _URA = 0.0; 531 _ura = 0.0; 478 532 _clock_bias = 0.0; 479 533 _clock_drift = 0.0; 480 534 _clock_driftrate = 0.0; 535 _ADOT = 0.0; 481 536 _Crs = 0.0; 482 537 _Delta_n = 0.0; … … 523 578 virtual ~t_ephBDS() {} 524 579 525 virtual e_ type type() const {return t_eph::BDS;}580 virtual e_system system() const {return t_eph::BDS;} 526 581 virtual unsigned int IOD() const; 527 582 virtual unsigned int isUnhealthy() const; … … 535 590 int _AODE; 536 591 int _AODC; 537 int _URAI; // [0..15] index from RTCM stream 538 mutable double _URA; // user range accuracy [m] 592 mutable double _ura; // user range accuracy [m] 539 593 double _clock_bias; // [s] 540 594 double _clock_drift; // [s/s] 541 595 double _clock_driftrate; // [s/s^2] 596 double _ADOT; // [m/s] 542 597 double _Crs; // [m] 543 598 double _Delta_n; // [rad/s] 544 599 double _M0; // [rad] 545 600 double _Cuc; // [rad] 546 double _e; // 601 double _e; // [-] 547 602 double _Cus; // [rad] 548 603 double _sqrt_A; // [m^0.5] … … 562 617 double _top; // [s] 563 618 564 double _SISAI_oe; // [ ]565 double _SISAI_ocb; // [ ]566 double _SISAI_oc1; // [ ]567 double _SISAI_oc2; // [ ]619 double _SISAI_oe; // [-] 620 double _SISAI_ocb; // [-] 621 double _SISAI_oc1; // [-] 622 double _SISAI_oc2; // [-] 568 623 569 624 double _ISC_B1Cd; // [s] … … 576 631 double _TGD_B2bI; // [s] 577 632 578 double _SISMAI; // [ ]579 580 int _SatH1; // 581 int _health; // 633 double _SISMAI; // [-] 634 635 int _SatH1; // [-] 636 int _health; // [-] 582 637 583 638 double _INTEGRITYF_B1C; // 3 bits word from sf 3 … … 585 640 double _INTEGRITYF_B2b; // 3 bits word from msg 10 586 641 587 double _IODC; // [ ]588 double _IODE; // [ ] IODE are the same as the 8 LSBs of IODC642 double _IODC; // [-] 643 double _IODE; // [-] IODE are the same as the 8 LSBs of IODC 589 644 590 645 };
Note:
See TracChangeset
for help on using the changeset viewer.