Changeset 222 in ntrip for trunk/BNC/RTCM


Ignore:
Timestamp:
Oct 7, 2006, 11:57:05 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC/RTCM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/GPSDecoder.h

    r215 r222  
    1 // -*- C++ -*-
    2 //
    3 // $Id: GPSDecoder.h,v 1.2 2006/10/06 10:51:43 mervart Exp $
    4 // 2005/04/11: include 'int iPCode' into class 'GPSDecoder' (BKG)
    5 #if !defined(__GPSDecoder_h__)
    6 #define __GPSDecoder_h__
     1
     2#ifndef GPSDECODER_H
     3#define GPSDECODER_H
    74
    85#include <list>
    9 #include <iostream>
    106
    11 using namespace std;
    12 
    13 //
    14 // One Code/Phase - Measurement
    15 //
    16 struct Observation {
    17     Observation()
    18     :SVPRN(0)
    19     ,GPSWeek(0)
    20     ,GPSWeeks(0)
    21     ,sec(0.)
    22     ,C1(0.)
    23     ,P2(0.)
    24     ,L1(0.)
    25     ,L2(0.)
    26     ,SNR1(0)
    27     ,SNR2(0)
    28     ,pCodeIndicator(0)
    29     ,cumuLossOfCont(0)
    30     {StatID[0] = '\0';}
    31 
    32     Observation( char _statID
    33                 ,char _svprn
    34                 ,short _GPSWeek
    35                 ,int _GPSWeeks
    36                 ,double _sec
    37                 ,double _C1
    38                 ,double _P2
    39                 ,double _L1
    40                 ,double _L2
    41                 ,short _SNR1
    42                 ,short _SNR2
    43                 ,int _pCodeIndicator
    44                 ,unsigned _cumuLossOfCont)
    45     :SVPRN(_svprn)
    46     ,GPSWeek(_GPSWeek)
    47     ,GPSWeeks(_GPSWeeks)
    48     ,sec(_sec)
    49     ,C1(_C1)
    50     ,P2(_P2)
    51     ,L1(_L1)
    52     ,L2(_L2)
    53     ,SNR1(_SNR1)
    54     ,SNR2(_SNR2)
    55     ,pCodeIndicator(_pCodeIndicator)
    56     ,cumuLossOfCont(_cumuLossOfCont)
    57     {StatID[0] = _statID; StatID[1] = '\0';}
    58 
    59     char StatID[5+1];  //< Station ID
    60     char SVPRN;    //<  Satellite PRN
    61     short GPSWeek; //< Week of GPS-Time
    62     int GPSWeeks; //< Second of Week (GPS-Time>
    63     double sec;
    64     double C1;     //<  CA-code validated raw pseudorange (meters)
    65     double P2;     //<  P2-code validated raw pseudorange (meters)
    66     double L1;     //<  validated raw carrier phase (meters)
    67     double L2;     //<  validated raw carrier phase (meters)
    68     short SNR1;    //<  signal-to noise ration (0.1 dB)
    69     short SNR2;    //<  signal-to noise ration (0.1 dB)
    70     int   pCodeIndicator;  // 0 ... CA Code, 1 ... P Code
    71     unsigned cumuLossOfCont;  // 0 to 31
    72 } ;
    73 
    74 //
    75 // GPS Orbitinformation
    76 //
    77 struct Ephemeris {
    78     short   svprn;    //< Satellite PRN
    79     short   wn;       //< GPS - week number
    80     short   aodc;     //< Age of data issue Clock
    81     short   aode;     //< Age of data issue Orbit
    82     double  tow;      //< Seconds of GPS week
    83     double  toc;      //< Reference time, Clock (sec)
    84     double  toe;      //< Ref.time for Orbit:(sec)
    85     double  tgd;      //< Group delay (sec)
    86     double  af2;      //< Clock parameter: (sec/sec^2)
    87     double  af1;      //< Clock parameter: (sec/sec)
    88     double  af0;      //< Clock parameter: (sec)
    89     double  crs;      //< Sin-harmonic correction term, orbit radius:(meters)
    90     double  deltan;   //< Mean anomaly correction:(semi-cirl/sec)
    91     double  m0;       //< Mean anomaly @ ref.time:(semi-circle)
    92     double  cuc;      //< Cos-harmonic correction term, argument of Latitude:(radians)
    93     double  e;        //< Eccentricity
    94     double  cus;      //< Sin-harmonic correction term, argument of Latitude:(radians)
    95     double  roota;    //< Square root of semi-major axis:(m ^1/2)
    96     double  cic;      //< Cos-harmonic correction term, angle of inclination:(radians)
    97     double  omega0;   //< Lon. of Asc. node at weekly epoch: (semi-circle)
    98     double  cis;      //< Sin-harmonic correction term, angle of Inclination:(radians)
    99     double  i0;       //< Inclination angle at Ref.time: (semi-circle)
    100     double  crc;      //< Cos-harmonic correction term, orbit radius:(meters)
    101     double  omega;    //< Argument of Perigee:(semi-circle)
    102     double  omegadot; //< Rate of right ascension: (semi-circle/sec)
    103     double  idot;     //< Rate of inclination angle: (semi-circle/sec)
    104     short   svaccu;   //< SV accuracy (0-15)
    105     short   fit;      //< Curve fit interval (0-1)
    106     short   cReserved1; //< Not used - yet
    107     short   health;     //< 0 if healthy, else unhealthy
    108     short   cReserved2; //< Not used - yet
    109     short   SVEnable;   //< Not used - yet
    110 } ;
    111 
    112 const double   lambda1 = 0.1902936727984; // [m]
    113 const double   lambda2 = 0.2442102134241; // [m]
    114 const unsigned glonass_svid = 45;
     7class Observation {
     8  public:
     9  Observation() {
     10    flags     = 0;
     11    StatID[0] = '\0';
     12    SVPRN     = 0;
     13    GPSWeek   = 0;
     14    GPSWeeks  = 0.0;
     15    C1        = 0.0;
     16    P1        = 0.0;
     17    P2        = 0.0;
     18    L1        = 0.0;
     19    L2        = 0.0;
     20    SNR1      = 0;
     21    SNR2      = 0;
     22  }
     23  int    flags;
     24  char   StatID[5+1]; // Station ID
     25  int    SVPRN;       // Satellite PRN
     26  int    GPSWeek;     // Week of GPS-Time
     27  double GPSWeeks;    // Second of Week (GPS-Time)
     28  double C1;          // CA-code pseudorange (meters)
     29  double P1;          // P1-code pseudorange (meters)
     30  double P2;          // P2-code pseudorange (meters)
     31  double L1;          // L1 carrier phase (cycles)
     32  double L2;          // L2 carrier phase (cycles)
     33  int    SNR1;        // L1 signal-to noise ratio (0.1 dB)
     34  int    SNR2;        // L2 signal-to noise ratio (0.1 dB)
     35};
    11536
    11637class GPSDecoder {
    117  public:
    118   int iPCode;  // pointer for CA or P code on L1
    119 
    120   virtual void Decode(char* _ptrBuffer=NULL, int _nBufLen=0) = 0;
    121   virtual ~GPSDecoder() {}
    122   typedef list<Observation*> ObsList_t;
    123   typedef list<Ephemeris*>   EphList_t;
    124 
    125   ObsList_t m_lObsList;
    126   EphList_t m_lEphList;
    127 
    128 } ;
     38  public:
     39    virtual void Decode(char* buffer, int bufLen) = 0;
     40    virtual ~GPSDecoder() {}
     41    std::list<Observation*> _obsList;
     42};
    12943
    13044#endif
  • trunk/BNC/RTCM/RTCM2.cpp

    r220 r222  
    10811081         
    10821082        for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) {
    1083           if (_ObsBlock.PRN[iSat] <= 32) {
    1084             Observation* obs = new Observation();
     1083          Observation* obs = new Observation();
    10851084       
    1086             obs->SVPRN          = _ObsBlock.PRN[iSat];
    1087             obs->GPSWeek        = epochWeek;
    1088             obs->GPSWeeks       = int(epochSecs);
    1089             obs->sec            = _ObsBlock.secs;
    1090             obs->pCodeIndicator = 0;
    1091             obs->C1 = _ObsBlock.rng_C1[iSat];
    1092             obs->P2 = _ObsBlock.rng_P2[iSat];
    1093             obs->L1 = _ObsBlock.resolvedPhase_L1(iSat);
    1094             obs->L2 = _ObsBlock.resolvedPhase_L2(iSat);
     1085          obs->SVPRN    = _ObsBlock.PRN[iSat];
     1086          obs->GPSWeek  = epochWeek;
     1087          obs->GPSWeeks = epochSecs;
     1088          obs->C1       = _ObsBlock.rng_C1[iSat];
     1089          obs->P1       = _ObsBlock.rng_P1[iSat];
     1090          obs->P2       = _ObsBlock.rng_P2[iSat];
     1091          obs->L1       = _ObsBlock.resolvedPhase_L1(iSat);
     1092          obs->L2       = _ObsBlock.resolvedPhase_L2(iSat);
    10951093       
    1096             m_lObsList.push_back(obs);
    1097           }
     1094          _obsList.push_back(obs);
    10981095        }
    10991096        _ObsBlock.clear();
  • trunk/BNC/RTCM/RTCM2.h

    r214 r222  
    333333    void Decode(char* buffer = 0, int bufLen = 0);
    334334  private:
    335     string _buffer;
     335    std::string        _buffer;
    336336    rtcm2::RTCM2_Obs   _ObsBlock;
    337337    rtcm2::RTCM2packet _PP;
Note: See TracChangeset for help on using the changeset viewer.