Changeset 2764 in ntrip for trunk/rtcm3torinex/lib


Ignore:
Timestamp:
Dec 3, 2010, 12:14:40 PM (14 years ago)
Author:
stoecker
Message:

fix GLONASS week underflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/rtcm3torinex/lib/rtcm3torinex.c

    r2756 r2764  
    359359      {
    360360        struct gpsephemeris *ge;
    361         int sv;
     361        int sv, i;
    362362
    363363        ge = &handle->ephemerisGPS;
     
    405405          ge->flags |= GPSEPHF_L2PCODEDATA;
    406406
     407        i = ((int)ge->GPSweek - (int)handle->GPSWeek)*7*24*60*60
     408        + ((int)ge->TOE - (int)handle->GPSTOW) - 2*60*60;
     409        if(i > 5*60*60 && i < 8*60*60)
     410        {
     411          handle->GPSTOW = ge->TOE;
     412          handle->GPSWeek = ge->GPSweek;
     413        }
    407414        ret = 1019;
    408415      }
Note: See TracChangeset for help on using the changeset viewer.