Changeset 771 in ntrip for trunk/BNS


Ignore:
Timestamp:
Apr 6, 2008, 10:04:19 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnseph.cpp

    r761 r771  
    5555    while (true) {
    5656      if (_socket->canReadLine()) {
    57         QByteArray line = _socket->readLine();
    58         cout << line.data();
     57        readEph();
    5958      }
    6059      else {
     
    6564}
    6665
     66// Read One Ephemeris
     67////////////////////////////////////////////////////////////////////////////
     68void t_bnseph::readEph() {
     69
     70  gpsephemeris* ep = new gpsephemeris;
     71
     72  QByteArray line = _socket->readLine();
     73  QTextStream in1(line);
     74
     75  QString prn;
     76  int     year, month, day, hour, minute, second;
     77
     78  in1 >> prn >> year >> month >> day >> hour >> minute >> second
     79      >> ep->clock_bias >> ep->clock_drift >> ep->clock_driftrate;
     80
     81  line = _socket->readLine();
     82  QTextStream in2(line);
     83  in2 >> ep->IODE >> ep->Crs >> ep->Delta_n >> ep->M0;
     84
     85  line = _socket->readLine();
     86  QTextStream in3(line);
     87  in3 >> ep->Cuc >> ep->e >> ep->Cus >> ep->sqrt_A;
     88
     89  line = _socket->readLine();
     90  QTextStream in4(line);
     91  in4 >> ep->TOE >> ep->Cic >> ep->OMEGA0 >> ep->Cis;
     92
     93  line = _socket->readLine();
     94  QTextStream in5(line);
     95  in5 >> ep->i0 >> ep->Crc >> ep->omega >> ep->OMEGADOT;
     96
     97  line = _socket->readLine();
     98  QTextStream in6(line);
     99
     100  double dd;
     101  int    ii;
     102  in6 >>  ep->IDOT >> dd >> ep->GPSweek >> ii;
     103
     104  line = _socket->readLine();
     105  QTextStream in7(line);
     106
     107  double hlp;
     108  in7 >>  hlp >> ep->SVhealth >> ep->TGD >> ep->IODC;
     109
     110  line = _socket->readLine();
     111  QTextStream in8(line);
     112  in8 >> ep->TOW;
     113}
  • trunk/BNS/bnseph.h

    r760 r771  
    44#include <QThread>
    55#include <QtNetwork>
     6
     7struct gpsephemeris {
     8  int    flags;            /* GPSEPHF_xxx */
     9  int    satellite;        /*  SV ID   ICD-GPS data position */
     10  int    IODE;             /*          [s2w3b01-08]              */
     11  int    URAindex;         /*  [1..15] [s1w3b13-16]              */
     12  int    SVhealth;         /*          [s1w3b17-22]              */
     13  int    GPSweek;          /*          [s1w3b01-10]              */
     14  int    IODC;             /*          [s1w3b23-32,w8b01-08]     */
     15  int    TOW;              /*  [s]     [s1w2b01-17]              */
     16  int    TOC;              /*  [s]     [s1w8b09-24]              */
     17  int    TOE;              /*  [s]     [s2w10b1-16]              */
     18  double clock_bias;       /*  [s]     [s1w10b1-22, af0]         */
     19  double clock_drift;      /*  [s/s]   [s1w9b09-24, af1]         */
     20  double clock_driftrate;  /*  [s/s^2] [s1w9b01-08, af2]         */
     21  double Crs;              /*  [m]     [s2w3b09-24]              */
     22  double Delta_n;          /*  [rad/s] [s2w4b01-16 * Pi]         */
     23  double M0;               /*  [rad]   [s2w4b17-24,w5b01-24 * Pi]*/
     24  double Cuc;              /*  [rad]   [s2w6b01-16]              */
     25  double e;                /*          [s2w6b17-24,w6b01-24]     */
     26  double Cus;              /*  [rad]   [s2w8b01-16]              */
     27  double sqrt_A;           /*  [m^0.5] [s2w8b16-24,w9b01-24]     */
     28  double Cic;              /*  [rad]   [s3w3b01-16]              */
     29  double OMEGA0;           /*  [rad]   [s3w3b17-24,w4b01-24 * Pi]*/
     30  double Cis;              /*  [rad]   [s3w5b01-16]              */
     31  double i0;               /*  [rad]   [s3w5b17-24,w6b01-24 * Pi]*/
     32  double Crc;              /*  [m]     [s3w701-16]               */
     33  double omega;            /*  [rad]   [s3w7b17-24,w8b01-24 * Pi]*/
     34  double OMEGADOT;         /*  [rad/s] [s3w9b01-24 * Pi]         */
     35  double IDOT;             /*  [rad/s] [s3w10b9-22 * Pi]         */
     36  double TGD;              /*  [s]     [s1w7b17-24]              */
     37};
    638
    739class t_bnseph : public QThread {
     
    1749 
    1850 private:
     51  void readEph();
    1952  QTcpSocket* _socket;
    2053};
Note: See TracChangeset for help on using the changeset viewer.