Changeset 706 in ntrip for trunk/BNC/RTCM


Ignore:
Timestamp:
Mar 4, 2008, 9:44:11 AM (16 years ago)
Author:
weber
Message:

* empty log message *

File:
1 edited

Legend:

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

    r464 r706  
    4040//   2006/11/25  OMO  Revised check for presence of GLONASS data
    4141//   2007/05/25  GW   Round time tag to 100 ms
     42//   2007/12/11  AHA  Changed handling of C/A- and P-Code on L1
     43//   2007/12/13  AHA  Changed epoch comparison in packet extraction
     44//   2008/03/01  OMO  Compilation flag for epoch rounding
     45//   2008/03/04  AHA  Fixed problems with PRN 32
    4246//
    4347// (c) DLR/GSOC
     
    5963
    6064#define DEBUG 0   
     65
     66// Activate (1) or deactivate (0) rounding of measurement epochs to 100ms
     67//
     68// Note: A need to round the measurement epoch to integer tenths of a second was
     69// noted by BKG in the processing of RTCM2 data from various receivers in NTRIP
     70// real-time networks. It is unclear at present, whether this is due to an
     71// improper implementation of the RTCM2 standard in the respective receivers
     72// or an unclear formulation of the standard.
     73
     74#define ROUND_EPOCH 1 
     75
    6176
    6277using namespace std;
     
    881896    t = 0.6*P.modZCount()
    882897        + P.getUnsignedBits(4,20)*1.0e-6;
     898   
     899#if (ROUND_EPOCH==1)
    883900    // SC-104 V2.3 4-42 Note 1 4. Assume measurements at hard edges
    884901    // of receiver clock with minimum divisions of 10ms
    885902    // and clock error less then recommended 1.1ms
    886903    // Hence, round time tag to 100 ms
    887     t = floor(t*100.+0.5)/100.;
    888    
     904    t = floor(t*100.0+0.5)/100.0;
     905#endif
     906
    889907    // Frequency (exit if neither L1 nor L2)
    890908    isL1  = ( P.getUnsignedBits(0,1)==0 );
     
    906924        secs = t; // Store epoch
    907925      }
    908       else if (t!=secs) {
     926//    else if (t!=secs) {
     927      else if (abs(t-secs)>1e-6) {
    909928        clear(); secs = t; // Clear all data, then store epoch
    910929      };
     
    931950      // Satellite
    932951      sid = P.getUnsignedBits(iSat*48+27,5);
     952      if(sid==0) sid=32;
     953     
    933954      prn = (isGPS? sid : sid+200 );
    934955     
     
    975996    t = 0.6*P.modZCount()
    976997        + P.getUnsignedBits(4,20)*1.0e-6;
     998   
     999#if (ROUND_EPOCH==1)
    9771000    // SC-104 V2.3 4-42 Note 1 4. Assume measurements at hard edges
    9781001    // of receiver clock with minimum divisions of 10ms
    9791002    // and clock error less then recommended 1.1ms
    9801003    // Hence, round time tag to 100 ms
    981     t = floor(t*100.+0.5)/100.;
    982    
     1004    t = floor(t*100.0+0.5)/100.0;
     1005#endif
     1006
    9831007    // Frequency (exit if neither L1 nor L2)
    9841008    isL1  = ( P.getUnsignedBits(0,1)==0 );
     
    10001024        secs = t; // Store epoch
    10011025      }
    1002       else if (t!=secs) {
     1026//    else if (t!=secs) {
     1027      else if (abs(t-secs)>1e-6) {
    10031028        clear(); secs = t; // Clear all data, then store epoch
    10041029      };
     
    10241049      // Satellite
    10251050      sid = P.getUnsignedBits(iSat*48+27,5);
     1051      if(sid==0) sid=32;
    10261052      prn = (isGPS? sid : sid+200 );
    10271053     
     
    10481074      if (isL1) {
    10491075        if (isCAcode) {
    1050           rng_C1[idx] = rng;
    1051       } else {
    1052         rng_P1[idx] = rng;
    1053       } }
     1076          rng_C1[idx] = rng;
     1077        }
     1078        else {
     1079          rng_P1[idx] = rng;
     1080        }
     1081      }
    10541082      else {
    10551083        rng_P2[idx] = rng;
    10561084      };
    1057 
     1085           
    10581086    };
    10591087 
Note: See TracChangeset for help on using the changeset viewer.