Changeset 578 in ntrip


Ignore:
Timestamp:
Nov 18, 2007, 1:30:25 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r577 r578  
    169169  if ( *ee == 0                         ||
    170170       gpseph->GPSweek > (*ee)->GPSweek ||
    171        gpseph->TOW     > (*ee)->TOW    ) {
     171       (gpseph->GPSweek == (*ee)->GPSweek && gpseph->TOW > (*ee)->TOW) ) {
    172172    delete *ee;
    173173    *ee = gpseph;
     
    194194  glonassephemeris** ee = &_glonassEph[glonasseph->almanac_number-1];
    195195
    196   struct converttimeinfo ctiOld;
    197   struct converttimeinfo ctiNew;
     196  int wwOld, towOld, wwNew, towNew;
    198197  if (*ee != 0) {
    199     int ww  = (*ee)->GPSWeek;
    200     int tow = (*ee)->GPSTOW;
    201     updatetime(&ww, &tow, (*ee)->tb*1000, 1);
    202     converttime(&ctiOld, ww, tow);
    203 
    204     ww  = glonasseph->GPSWeek;
    205     tow = glonasseph->GPSTOW;
    206     updatetime(&ww, &tow, glonasseph->tb*1000, 1);
    207     converttime(&ctiNew, ww, tow);
    208   }
    209 
    210   if ( *ee == 0                       ||
    211        ctiOld.second != ctiNew.second ||
    212        ctiOld.minute != ctiNew.minute ||
    213        ctiOld.hour   != ctiNew.hour   ||
    214        ctiOld.day    != ctiNew.day    ||
    215        ctiOld.month  != ctiNew.month  ||
    216        ctiOld.year   != ctiNew.year   ) {
    217 
     198    wwOld  = (*ee)->GPSWeek;
     199    towOld = (*ee)->GPSTOW;
     200    updatetime(&wwOld, &towOld, (*ee)->tb*1000, 1);
     201
     202    wwNew  = glonasseph->GPSWeek;
     203    towNew = glonasseph->GPSTOW;
     204    updatetime(&wwNew, &towNew, glonasseph->tb*1000, 1);
     205  }
     206
     207  if ( *ee == 0      ||
     208       wwNew > wwOld ||
     209       (wwNew == wwOld && towNew > towOld) ) {
    218210    delete *ee;
    219211    *ee = glonasseph;
Note: See TracChangeset for help on using the changeset viewer.