Changeset 1867 in ntrip


Ignore:
Timestamp:
Jul 13, 2009, 5:33:32 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r1838 r1867  
    256256  if (_casterEph) {
    257257    _casterEph->open();
    258     // TODO encode ephemerides into RTCM v3 format
    259     QByteArray buffer = "New Ephemeris " + ep->prn().toAscii() + "\n";
    260     _casterEph->write(buffer.data(), buffer.length());
    261     int len = buffer.length();
    262     if (len > 0) {
    263       emit(newOutEphBytes(len));
    264     }
     258    unsigned char Array[67];
     259    int size = ep->RTCM3(Array);
     260    if (size > 0) {
     261      _casterEph->write((char*) Array, size);
     262      emit(newOutEphBytes(size));
     263    }
     264    ////    QByteArray buffer = "New Ephemeris " + ep->prn().toAscii() + "\n";
     265    ////    _casterEph->write(buffer.data(), buffer.length());
     266    ////    int len = buffer.length();
     267    ////    if (len > 0) {
     268    ////      emit(newOutEphBytes(len));
     269    ////    }
    265270  }
    266271
  • trunk/BNS/bnseph.cpp

    r1866 r1867  
    230230    }
    231231  }
    232   unsigned char Array[67];
    233   int size = RTCM3GPS(Array);
    234   fwrite(Array,size, 1, stdout);
    235232}
    236233
     
    282279                             GPSADDBITS(a,i)};
    283280
    284 int t_ephGPS::RTCM3GPS(unsigned char *buffer)
     281int t_ephGPS::RTCM3(unsigned char *buffer)
    285282{
    286283
     
    340337  size += 3;
    341338  return size;
    342 } /* RTCM3GPS */
     339}
    343340
    344341// Compute GPS Satellite Position
     
    481478  _xv(5) = _y_velocity * 1.e3;
    482479  _xv(6) = _z_velocity * 1.e3;
    483   unsigned char Array[51];
    484   int size = RTCM3GLO(Array);
    485   fwrite(Array,size, 1, stdout);
    486480}
    487481
     
    511505                       GLONASSADDBITS(a-1,i)}
    512506
    513 int t_ephGlo::RTCM3GLO(unsigned char *buffer)
     507int t_ephGlo::RTCM3(unsigned char *buffer)
    514508{
    515509
     
    572566  size += 3;
    573567  return size;
    574 } /* RTCM3GLO */
     568}
    575569
    576570// Derivative of the state vector using a simple force model (static)
  • trunk/BNS/bnseph.h

    r1866 r1867  
    2121  virtual void read(const QStringList& lines) = 0;
    2222  virtual int  IOD() const = 0;
     23  virtual int  RTCM3(unsigned char *) = 0;
    2324 protected: 
    2425  QString _prn;
     
    3839                        ColumnVector& vv) const;
    3940  virtual int  IOD() const;
    40   virtual int  RTCM3GLO(unsigned char *);
     41  virtual int  RTCM3(unsigned char *);
    4142 private:
    4243  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv);
     
    7172                        ColumnVector& vv) const;
    7273  virtual int  IOD() const {return int(_IODE);}
    73   virtual int  RTCM3GPS(unsigned char *);
     74  virtual int  RTCM3(unsigned char *);
    7475 private:
    7576  double  _TOW;              //  [s]   
Note: See TracChangeset for help on using the changeset viewer.