Changeset 7844 in ntrip for trunk


Ignore:
Timestamp:
Mar 17, 2016, 1:38:18 PM (3 years ago)
Author:
stuerze
Message:

bug fixed in GLONASS ephemeris encoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/ephEncoder.cpp

    r7053 r7844  
    9393    /static_cast<double>(1<<13))
    9494    GPSADDBITSFLOAT(8, eph._TGD, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    95     GPSADDBITS(6, eph._health) 
     95    GPSADDBITS(6, eph._health)
    9696    GPSADDBITS(1, eph._L2PFlag)
    9797    GPSADDBITS(1, eph._fitInterval)
     
    126126  GLONASSADDBITS(1, 0)
    127127  GLONASSADDBITS(2, 0)
    128   eph._tki=eph._tki+3*60*60;
    129   GLONASSADDBITS(5, static_cast<int>(eph._tki)/(60*60))
    130   GLONASSADDBITS(6, (static_cast<int>(eph._tki)/60)%60)
    131   GLONASSADDBITS(1, (static_cast<int>(eph._tki)/30)%30)
    132   GLONASSADDBITS(1, eph._health)
     128  int tki = static_cast<int>(eph._tki)+3*60*60;
     129  if (tki > 86400) {tki -= 86400;}
     130  GLONASSADDBITS(5, tki/(60*60))
     131  GLONASSADDBITS(6, (tki/60)%60)
     132  GLONASSADDBITS(1, (tki/30)%30)
     133  GLONASSADDBITS(1, eph._health)
    133134  GLONASSADDBITS(1, 0)
    134135  unsigned long long timeofday = (static_cast<int>(eph._tt.gpssec()+3*60*60-eph._gps_utc)%86400);
Note: See TracChangeset for help on using the changeset viewer.