Changeset 5853 in ntrip


Ignore:
Timestamp:
Aug 7, 2014, 1:10:57 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/ephEncoder.cpp

    r5852 r5853  
    174174
    175175  GLONASSADDBITS(12, 1020)
    176   GLONASSADDBITS(6, _prn.number())
    177   GLONASSADDBITS(5, 7+_frequency_number)
     176  GLONASSADDBITS(6, eph._prn.number())
     177  GLONASSADDBITS(5, 7+eph._frequency_number)
    178178  GLONASSADDBITS(1, 0)
    179179  GLONASSADDBITS(1, 0)
    180180  GLONASSADDBITS(2, 0)
    181   _tki=_tki+3*60*60;
    182   GLONASSADDBITS(5, static_cast<int>(_tki)/(60*60))
    183   GLONASSADDBITS(6, (static_cast<int>(_tki)/60)%60)
    184   GLONASSADDBITS(1, (static_cast<int>(_tki)/30)%30)
    185   GLONASSADDBITS(1, _health)
     181  eph._tki=eph._tki+3*60*60;
     182  GLONASSADDBITS(5, static_cast<int>(eph._tki)/(60*60))
     183  GLONASSADDBITS(6, (static_cast<int>(eph._tki)/60)%60)
     184  GLONASSADDBITS(1, (static_cast<int>(eph._tki)/30)%30)
     185  GLONASSADDBITS(1, eph._health)
    186186  GLONASSADDBITS(1, 0)
    187   unsigned long long timeofday = (static_cast<int>(_tt.gpssec()+3*60*60-_gps_utc)%86400);
     187  unsigned long long timeofday = (static_cast<int>(eph._tt.gpssec()+3*60*60-eph._gps_utc)%86400);
    188188  GLONASSADDBITS(7, timeofday/60/15)
    189   GLONASSADDBITSFLOATM(24, _x_velocity*1000, 1000.0/static_cast<double>(1<<20))
    190   GLONASSADDBITSFLOATM(27, _x_pos*1000, 1000.0/static_cast<double>(1<<11))
    191   GLONASSADDBITSFLOATM(5, _x_acceleration*1000, 1000.0/static_cast<double>(1<<30))
    192   GLONASSADDBITSFLOATM(24, _y_velocity*1000, 1000.0/static_cast<double>(1<<20))
    193   GLONASSADDBITSFLOATM(27, _y_pos*1000, 1000.0/static_cast<double>(1<<11))
    194   GLONASSADDBITSFLOATM(5, _y_acceleration*1000, 1000.0/static_cast<double>(1<<30))
    195   GLONASSADDBITSFLOATM(24, _z_velocity*1000, 1000.0/static_cast<double>(1<<20))
    196   GLONASSADDBITSFLOATM(27,_z_pos*1000, 1000.0/static_cast<double>(1<<11))
    197   GLONASSADDBITSFLOATM(5, _z_acceleration*1000, 1000.0/static_cast<double>(1<<30))
     189  GLONASSADDBITSFLOATM(24, eph._x_velocity*1000, 1000.0/static_cast<double>(1<<20))
     190  GLONASSADDBITSFLOATM(27, eph._x_pos*1000, 1000.0/static_cast<double>(1<<11))
     191  GLONASSADDBITSFLOATM(5, eph._x_acceleration*1000, 1000.0/static_cast<double>(1<<30))
     192  GLONASSADDBITSFLOATM(24, eph._y_velocity*1000, 1000.0/static_cast<double>(1<<20))
     193  GLONASSADDBITSFLOATM(27, eph._y_pos*1000, 1000.0/static_cast<double>(1<<11))
     194  GLONASSADDBITSFLOATM(5, eph._y_acceleration*1000, 1000.0/static_cast<double>(1<<30))
     195  GLONASSADDBITSFLOATM(24, eph._z_velocity*1000, 1000.0/static_cast<double>(1<<20))
     196  GLONASSADDBITSFLOATM(27,eph._z_pos*1000, 1000.0/static_cast<double>(1<<11))
     197  GLONASSADDBITSFLOATM(5, eph._z_acceleration*1000, 1000.0/static_cast<double>(1<<30))
    198198  GLONASSADDBITS(1, 0)
    199   GLONASSADDBITSFLOATM(11, _gamma, 1.0/static_cast<double>(1<<30)
     199  GLONASSADDBITSFLOATM(11, eph._gamma, 1.0/static_cast<double>(1<<30)
    200200  /static_cast<double>(1<<10))
    201201  GLONASSADDBITS(2, 0) /* GLONASS-M P */
    202202  GLONASSADDBITS(1, 0) /* GLONASS-M ln(3) */
    203   GLONASSADDBITSFLOATM(22, _tau, 1.0/static_cast<double>(1<<30))
     203  GLONASSADDBITSFLOATM(22, eph._tau, 1.0/static_cast<double>(1<<30))
    204204  GLONASSADDBITS(5, 0) /* GLONASS-M delta tau */
    205   GLONASSADDBITS(5, _E)
     205  GLONASSADDBITS(5, eph._E)
    206206  GLONASSADDBITS(1, 0) /* GLONASS-M P4 */
    207207  GLONASSADDBITS(4, 0) /* GLONASS-M FT */
     
    246246  buffer= buffer+3;
    247247
    248   bool inav = ( (_flags & GALEPHF_INAV) == GALEPHF_INAV );
     248  bool inav = ( (eph._flags & GALEPHF_INAV) == GALEPHF_INAV );
    249249
    250250  GALILEOADDBITS(12, inav ? 1046 : 1045)
    251   GALILEOADDBITS(6, _prn.number())
    252   GALILEOADDBITS(12, _TOC.gpsw())
    253   GALILEOADDBITS(10, _IODnav)
    254   GALILEOADDBITS(8, _SISA)
    255   GALILEOADDBITSFLOAT(14, _IDOT, M_PI/static_cast<double>(1<<30)
    256   /static_cast<double>(1<<13))
    257   GALILEOADDBITS(14, _TOC.gpssec()/60)
    258   GALILEOADDBITSFLOAT(6, _clock_driftrate, 1.0/static_cast<double>(1<<30)
     251  GALILEOADDBITS(6, eph._prn.number())
     252  GALILEOADDBITS(12, eph._TOC.gpsw())
     253  GALILEOADDBITS(10, eph._IODnav)
     254  GALILEOADDBITS(8, eph._SISA)
     255  GALILEOADDBITSFLOAT(14, eph._IDOT, M_PI/static_cast<double>(1<<30)
     256  /static_cast<double>(1<<13))
     257  GALILEOADDBITS(14, eph._TOC.gpssec()/60)
     258  GALILEOADDBITSFLOAT(6, eph._clock_driftrate, 1.0/static_cast<double>(1<<30)
    259259  /static_cast<double>(1<<29))
    260   GALILEOADDBITSFLOAT(21, _clock_drift, 1.0/static_cast<double>(1<<30)
     260  GALILEOADDBITSFLOAT(21, eph._clock_drift, 1.0/static_cast<double>(1<<30)
    261261  /static_cast<double>(1<<16))
    262   GALILEOADDBITSFLOAT(31, _clock_bias, 1.0/static_cast<double>(1<<30)
     262  GALILEOADDBITSFLOAT(31, eph._clock_bias, 1.0/static_cast<double>(1<<30)
    263263  /static_cast<double>(1<<4))
    264   GALILEOADDBITSFLOAT(16, _Crs, 1.0/static_cast<double>(1<<5))
    265   GALILEOADDBITSFLOAT(16, _Delta_n, M_PI/static_cast<double>(1<<30)
    266   /static_cast<double>(1<<13))
    267   GALILEOADDBITSFLOAT(32, _M0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    268   GALILEOADDBITSFLOAT(16, _Cuc, 1.0/static_cast<double>(1<<29))
    269   GALILEOADDBITSFLOAT(32, _e, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3))
    270   GALILEOADDBITSFLOAT(16, _Cus, 1.0/static_cast<double>(1<<29))
    271   GALILEOADDBITSFLOAT(32, _sqrt_A, 1.0/static_cast<double>(1<<19))
    272   GALILEOADDBITS(14, _TOEsec/60)
    273   GALILEOADDBITSFLOAT(16, _Cic, 1.0/static_cast<double>(1<<29))
    274   GALILEOADDBITSFLOAT(32, _OMEGA0, M_PI/static_cast<double>(1<<30)
    275   /static_cast<double>(1<<1))
    276   GALILEOADDBITSFLOAT(16, _Cis, 1.0/static_cast<double>(1<<29))
    277   GALILEOADDBITSFLOAT(32, _i0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    278   GALILEOADDBITSFLOAT(16, _Crc, 1.0/static_cast<double>(1<<5))
    279   GALILEOADDBITSFLOAT(32, _omega, M_PI/static_cast<double>(1<<30)
    280   /static_cast<double>(1<<1))
    281   GALILEOADDBITSFLOAT(24, _OMEGADOT, M_PI/static_cast<double>(1<<30)
    282   /static_cast<double>(1<<13))
    283   GALILEOADDBITSFLOAT(10, _BGD_1_5A, 1.0/static_cast<double>(1<<30)
     264  GALILEOADDBITSFLOAT(16, eph._Crs, 1.0/static_cast<double>(1<<5))
     265  GALILEOADDBITSFLOAT(16, eph._Delta_n, M_PI/static_cast<double>(1<<30)
     266  /static_cast<double>(1<<13))
     267  GALILEOADDBITSFLOAT(32, eph._M0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
     268  GALILEOADDBITSFLOAT(16, eph._Cuc, 1.0/static_cast<double>(1<<29))
     269  GALILEOADDBITSFLOAT(32, eph._e, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3))
     270  GALILEOADDBITSFLOAT(16, eph._Cus, 1.0/static_cast<double>(1<<29))
     271  GALILEOADDBITSFLOAT(32, eph._sqrt_A, 1.0/static_cast<double>(1<<19))
     272  GALILEOADDBITS(14, eph._TOEsec/60)
     273  GALILEOADDBITSFLOAT(16, eph._Cic, 1.0/static_cast<double>(1<<29))
     274  GALILEOADDBITSFLOAT(32, eph._OMEGA0, M_PI/static_cast<double>(1<<30)
     275  /static_cast<double>(1<<1))
     276  GALILEOADDBITSFLOAT(16, eph._Cis, 1.0/static_cast<double>(1<<29))
     277  GALILEOADDBITSFLOAT(32, eph._i0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
     278  GALILEOADDBITSFLOAT(16, eph._Crc, 1.0/static_cast<double>(1<<5))
     279  GALILEOADDBITSFLOAT(32, eph._omega, M_PI/static_cast<double>(1<<30)
     280  /static_cast<double>(1<<1))
     281  GALILEOADDBITSFLOAT(24, eph._OMEGADOT, M_PI/static_cast<double>(1<<30)
     282  /static_cast<double>(1<<13))
     283  GALILEOADDBITSFLOAT(10, eph._BGD_1_5A, 1.0/static_cast<double>(1<<30)
    284284  /static_cast<double>(1<<2))
    285285  if(inav)
    286286  {
    287     GALILEOADDBITSFLOAT(10, _BGD_1_5B, 1.0/static_cast<double>(1<<30)
     287    GALILEOADDBITSFLOAT(10, eph._BGD_1_5B, 1.0/static_cast<double>(1<<30)
    288288    /static_cast<double>(1<<2))
    289     GALILEOADDBITS(2, static_cast<int>(_E5bHS))
    290     GALILEOADDBITS(1, _flags & GALEPHF_E5BDINVALID)
     289    GALILEOADDBITS(2, static_cast<int>(eph._E5bHS))
     290    GALILEOADDBITS(1, eph._flags & GALEPHF_E5BDINVALID)
    291291  }
    292292  else
    293293  {
    294     GALILEOADDBITS(2, static_cast<int>(_E5aHS))
    295     GALILEOADDBITS(1, _flags & GALEPHF_E5ADINVALID)
    296   }
    297   _TOEsec = 0.9999E9;
    298   GALILEOADDBITS(20, _TOEsec)
     294    GALILEOADDBITS(2, static_cast<int>(eph._E5aHS))
     295    GALILEOADDBITS(1, eph._flags & GALEPHF_E5ADINVALID)
     296  }
     297  ////  eph._TOEsec = 0.9999E9;
     298  GALILEOADDBITS(20, eph._TOEsec)
    299299
    300300  GALILEOADDBITS(inav ? 1 : 3, 0)
  • trunk/BNC/src/ephemeris.h

    r5852 r5853  
    138138
    139139class t_ephGlo : public t_eph {
     140 friend class t_ephEncoder;
    140141 public:
    141142  t_ephGlo() { _xv.ReSize(6); }
     
    168169  double  _tau;              // [s]     
    169170  double  _gamma;            //         
    170   double  _tki;              // message frame time
     171  mutable double  _tki;      // message frame time
    171172
    172173  double  _x_pos;            // [km]     
     
    187188
    188189class t_ephGal : public t_eph {
     190 friend class t_ephEncoder;
    189191 public:
    190192  t_ephGal() { }
Note: See TracChangeset for help on using the changeset viewer.