Changeset 7138 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jul 22, 2015, 10:45:16 AM (9 years ago)
Author:
stuerze
Message:

method added to set TOE from BDS week and sec

Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnctime.cpp

    r6812 r7138  
    3737  int  deltad;
    3838  int  dow = 0;
     39  while ( gpssec >= 86400 ) {
     40    gpssec-=86400;
     41    dow++;
     42  }
     43  while ( gpssec <  0 ) {
     44    gpssec+=86400;
     45    dow--;
     46  }
     47  deltad = gpsw*7 + dow;
     48  _mjd = 44244 + deltad;
     49  _sec = gpssec;
     50  return *this;
     51}
     52
     53
     54//
     55//////////////////////////////////////////////////////////////////////////////
     56bncTime& bncTime::setBDS(int gpsw, double gpssec) {
     57  int  deltad;
     58  int  dow = 0;
     59  gpssec += 14.0;
     60  gpsw   += 1356.0;
    3961  while ( gpssec >= 86400 ) {
    4062    gpssec-=86400;
  • trunk/BNC/src/bnctime.h

    r6980 r7138  
    5858   */
    5959  bncTime &setBDS (int year, int month, int day, int hour, int min, double sec);
     60  bncTime &setBDS(int gpsw, double gpssec);
    6061
    6162  void         reset() {_mjd = 0; _sec = 0;}
  • trunk/BNC/src/ephemeris.cpp

    r7133 r7138  
    13591359  }
    13601360
     1361  _TOE.setBDS(int(_TOEweek), _TOEsec);
     1362
    13611363  // remark: actually should be computed from second_tot
    13621364  //         but it seems to be unreliable in RINEX files
     
    14441446  double yp     = r*sin(u);
    14451447  double toesec = (_TOE.gpssec() - 14.0);
    1446 
    14471448  double sinom = 0;
    14481449  double cosom = 0;
Note: See TracChangeset for help on using the changeset viewer.