Changeset 332 in ntrip


Ignore:
Timestamp:
Nov 26, 2006, 9:41:49 AM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC/RTCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/RTCM2.cpp

    r265 r332  
    3737//   2006/10/17  OMO  Removed obsolete check of multiple message indicator
    3838//   2006/10/17  OMO  Fixed parity handling
     39//   2006/10/18  OMO  Improved screening of bad data in RTCM2_Obs::extract
     40//   2006/11/25  OMO  Revised check for presence of GLONASS data
    3941//
    4042// (c) DLR/GSOC
     
    279281#if (DEBUG>0)
    280282  if (!validParity()) {
    281     cout << "Parity error "
     283    cerr << "Parity error "
    282284         << bitset<32>(all()) << endl;
    283285  };
     
    301303#if (DEBUG>0)
    302304  if (!validParity()) {
    303     cout << "Parity error "
     305    cerr << "Parity error "
    304306         << bitset<32>(all()) << endl;
    305307  };
     
    334336#if (DEBUG>0)
    335337  if (!validParity()) {
    336     cout << "Parity error "
     338    cerr << "Parity error "
    337339         << bitset<32>(all()) << endl;
    338340  };
     
    358360#if (DEBUG>0)
    359361  if (!validParity()) {
    360     cout << "Parity error "
     362    cerr << "Parity error "
    361363         << bitset<32>(all()) << endl;
    362364  };
     
    779781
    780782  clear();
     783  GPSonly = true;
    781784
    782785};
     
    841844bool RTCM2_Obs::valid() const {
    842845
    843   return ( allGPS() && (allGLONASS() || !anyGLONASS()) );
     846  return ( allGPS() && ( GPSonly || allGLONASS() ) );
    844847 
    845848};
     
    859862  // Check validity and packet type
    860863 
    861   if (!P.valid()) return;
     864  if ( ! ( P.valid() &&
     865           (P.ID()==18 || P.ID()==19) &&
     866           P.nDataWords()>1              ) ) return;
    862867
    863868  // Clear previous data if block was already complete
     
    883888    // Constellation (for first satellite in message)
    884889    isGPS = ( P.getUnsignedBits(26,1)==0 );
    885 
     890    GPSonly = GPSonly && isGPS;
     891   
    886892    // Multiple Message Indicator (only checked for first satellite)
    887893    // pendingMsg = ( P.getUnsignedBits(24,1)==1 );
     
    899905    };
    900906
    901     // Discard GLONASS obseravtions if no prior GPS observations
     907    // Discard GLONASS observations if no prior GPS observations
    902908    // are available
    903909    if (!isGPS && !anyGPS() ) return;
     
    971977    // Constellation (for first satellite in message)
    972978    isGPS = ( P.getUnsignedBits(26,1)==0 );
     979    GPSonly = GPSonly && isGPS;
    973980
    974981    // Multiple Message Indicator (only checked for first satellite)
     
    987994    };
    988995
    989     // Discard GLONASS obseravtions if nor prior GPS observations
     996    // Discard GLONASS observations if no prior GPS observations
    990997    // are available
    991998    if (!isGPS && !anyGPS() ) return;
     
    11011108
    11021109  epochWeek = refWeek;
    1103 
    1104   epochSecs = secs;
    1105   while (epochSecs < refSecs - 1800) {
    1106     epochSecs += 3600;
    1107   }
    1108   while (epochSecs > refSecs + 1800) {
    1109     epochSecs -= 3600;
    1110   }
    1111 
    1112   ////  epochSecs = secs + 3600.0*(floor((refSecs-secs)/3600.0+0.5));
     1110  epochSecs = secs + 3600.0*(floor((refSecs-secs)/3600.0+0.5));
    11131111 
    11141112  if (epochSecs<0          ) { epochWeek--; epochSecs+=secsPerWeek; };
  • trunk/BNC/RTCM/RTCM2.h

    r254 r332  
    2727//   2006/10/05  OMO  Specified const'ness of various member functions
    2828//   2006/10/17  OMO  Removed obsolete check of multiple message indicator
     29//   2006/11/25  OMO  Revised check for presence of GLONASS data
    2930//
    3031// (c) DLR/GSOC
     
    320321   
    321322    msgflags             availability;      // Msg availability flags
    322    
     323    bool                 GPSonly;           // Flag for GPS-only station
     324
    323325};
    324326
Note: See TracChangeset for help on using the changeset viewer.