Changeset 5776 in ntrip


Ignore:
Timestamp:
Aug 4, 2014, 11:34:04 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/ephpool.cpp

    r5749 r5776  
    134134    t_irc irc = eph->getCrd(tt, xc, vv);
    135135    if (irc == success) {
    136       if (eph->system() == 'R') {
     136      if (eph->prn().system() == 'R') {
    137137        double age = tt - eph->TOC();
    138138        if (fabs(age) > 3600.0) {
  • trunk/BNC/src/bncephuser.cpp

    r5576 r5776  
    7979  t_ephGPS* eNew = new t_ephGPS(); eNew->set(&gpseph);
    8080
    81   const QString& prn = eNew->prn();
     81  QString prn(eNew->prn().toString().c_str());
    8282
    8383  if (_eph.contains(prn)) {
     
    106106  t_ephGlo* eNew = new t_ephGlo(); eNew->set(&gloeph);
    107107
    108   const QString& prn = eNew->prn();
     108  QString prn(eNew->prn().toString().c_str());
    109109
    110110  if (_eph.contains(prn)) {
     
    161161  }
    162162
    163   QString prn = newEph->prn();
     163  QString prn(newEph->prn().toString().c_str());
    164164
    165165  t_irc irc = failure;
  • trunk/BNC/src/ephemeris.cpp

    r5749 r5776  
    7575  _receptDateTime = currentDateAndTimeGPS();
    7676
    77   _prn = QString("G%1").arg(ee->satellite, 2, 10, QChar('0'));
     77  _prn.set('G', ee->satellite);
    7878
    7979  _TOC.set(ee->GPSweek, ee->TOC);
     
    276276
    277277  GPSADDBITS(12, 1019)
    278   GPSADDBITS(6,_prn.right((_prn.length()-1)).toInt())
     278  GPSADDBITS(6,_prn.number())
    279279  GPSADDBITS(10, _TOC.gpsw())
    280280  GPSADDBITS(4, _ura)
     
    416416  _receptDateTime = currentDateAndTimeGPS();
    417417
    418   _prn = QString("R%1").arg(ee->almanac_number, 2, 10, QChar('0'));
     418  _prn.set('R', ee->almanac_number);
    419419
    420420  int ww  = ee->GPSWeek;
     
    541541
    542542  GLONASSADDBITS(12, 1020)
    543   GLONASSADDBITS(6, _prn.right((_prn.length()-1)).toInt())
     543  GLONASSADDBITS(6, _prn.number())
    544544  GLONASSADDBITS(5, 7+_frequency_number)
    545545  GLONASSADDBITS(1, 0)
     
    600600  _receptDateTime = currentDateAndTimeGPS();
    601601
    602   _prn = QString("E%1").arg(ee->satellite, 2, 10, QChar('0'));
     602  _prn.set('E', ee->satellite);
    603603
    604604  _TOC.set(ee->Week, ee->TOC);
     
    749749
    750750  GALILEOADDBITS(12, inav ? 1046 : 1045)
    751   GALILEOADDBITS(6, _prn.right((_prn.length()-1)).toInt())
     751  GALILEOADDBITS(6, _prn.number())
    752752  GALILEOADDBITS(12, _TOC.gpsw())
    753753  GALILEOADDBITS(10, _IODnav)
     
    844844      double sec;
    845845     
    846       in >> _prn >> year >> month >> day >> hour >> min >> sec;
    847 
    848       if (_prn.at(0) != 'G') {
    849         _prn = QString("G%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0'));
    850       }
    851    
     846      QString prnStr;
     847      in >> prnStr >> year >> month >> day >> hour >> min >> sec;
     848      if (prnStr.at(0) == 'G') {
     849        _prn.set('G', prnStr.mid(1).toInt());
     850      }
     851      else {
     852        _prn.set('G', prnStr.toInt());
     853      }
     854
    852855      if      (year <  80) {
    853856        year += 2000;
     
    964967      double sec;
    965968     
    966       in >> _prn >> year >> month >> day >> hour >> min >> sec;
    967 
    968       if (_prn.at(0) != 'R') {
    969         _prn = QString("R%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0'));
    970       }
    971    
     969      QString prnStr;
     970      in >> prnStr >> year >> month >> day >> hour >> min >> sec;
     971      if (prnStr.at(0) == 'R') {
     972        _prn.set('R', prnStr.mid(1).toInt());
     973      }
     974      else {
     975        _prn.set('R', prnStr.toInt());
     976      }
     977
    972978      if      (year <  80) {
    973979        year += 2000;
     
    10661072      double sec;
    10671073     
    1068       in >> _prn >> year >> month >> day >> hour >> min >> sec;
    1069 
    1070       if (_prn.at(0) != 'E') {
    1071         _prn = QString("E%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0'));
    1072       }
    1073    
     1074      QString prnStr;
     1075      in >> prnStr >> year >> month >> day >> hour >> min >> sec;
     1076      if (prnStr.at(0) == 'E') {
     1077        _prn.set('E', prnStr.mid(1).toInt());
     1078      }
     1079      else {
     1080        _prn.set('E', prnStr.toInt());
     1081      }
     1082
    10741083      if      (year <  80) {
    10751084        year += 2000;
     
    11521161//
    11531162//////////////////////////////////////////////////////////////////////////////
    1154 QString t_eph::rinexDateStr(const bncTime& tt, const QString& prn,
    1155                             double version) {
     1163QString t_eph::rinexDateStr(const bncTime& tt, const t_prn& prn, double version) {
     1164  QString prnStr(prn.toString().c_str());
     1165  return rinexDateStr(tt, prnStr, version);
     1166}
     1167
     1168//
     1169//////////////////////////////////////////////////////////////////////////////
     1170QString t_eph::rinexDateStr(const bncTime& tt, const QString& prnStr, double version) {
    11561171
    11571172  QString datStr;
     
    11651180
    11661181  if (version < 3.0) {
    1167     QString prnHlp = prn.mid(1,2); if (prnHlp[0] == '0') prnHlp[0] = ' ';
     1182    QString prnHlp = prnStr.mid(1,2); if (prnHlp[0] == '0') prnHlp[0] = ' ';
    11681183    out << prnHlp << QString(" %1 %2 %3 %4 %5%6")
    11691184      .arg(year % 100, 2, 10, QChar('0'))
     
    11751190  }
    11761191  else {
    1177     out << prn << QString(" %1 %2 %3 %4 %5 %6")
     1192    out << prnStr << QString(" %1 %2 %3 %4 %5 %6")
    11781193      .arg(year,     4)
    11791194      .arg(month,    2, 10, QChar('0'))
  • trunk/BNC/src/ephemeris.h

    r5749 r5776  
    88#include "bnctime.h"
    99#include "bncconst.h"
     10#include "t_prn.h"
    1011extern "C" {
    1112#include "rtcm3torinex.h"
     
    4142    return earlierTime(eph, this);
    4243  }
    43   QString prn() const {return _prn;}
    44   char system() const {return _prn[0].toAscii();}
     44  t_prn prn() const {return _prn;}
    4545  const QDateTime& receptDateTime() const {return _receptDateTime;}
    4646
     
    6363  virtual int slotNum() const {return 0;}
    6464
    65   static QString rinexDateStr(const bncTime& tt, const QString& prn,
     65  static QString rinexDateStr(const bncTime& tt, const t_prn& prn,
    6666                              double version);
    6767
     68  static QString rinexDateStr(const bncTime& tt, const QString& prnStr,
     69                              double version);
     70
    6871 protected: 
    69   QString         _prn;
     72  t_prn           _prn;
    7073  bncTime         _TOC;
    7174  QDateTime       _receptDateTime;
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r5368 r5776  
    247247        if (obs.satSys == 'R') {
    248248          for (int ie = 0; ie < _ephs.size(); ie++) {
    249             if (_ephs[ie]->prn() == prn) {
     249            if (QString(_ephs[ie]->prn().toString().c_str()) == prn) {
    250250              ephGlo = dynamic_cast<t_ephGlo*>(_ephs[ie]);
    251251              break;
     
    536536          t_eph* eph = 0;
    537537          for (int ie = 0; ie < _ephs.size(); ie++) {
    538             if (_ephs[ie]->prn() == prn) {
     538            if (QString(_ephs[ie]->prn().toString().c_str()) == prn) {
    539539              eph = _ephs[ie];
    540540              break;
     
    746746    t_eph* eph = 0;
    747747    for (int ie = 0; ie < _ephs.size(); ie++) {
    748       if (_ephs[ie]->prn() == prn) {
     748      if (QString(_ephs[ie]->prn().toString().c_str()) == prn) {
    749749        eph = _ephs[ie];
    750750        break;
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r5738 r5776  
    208208        t_eph* eph = *it;
    209209        double dt = eph->TOC() - tt;
    210         if (dt < 8*3600.0 && eph->prn() == prn && eph->IOD() == iod) {
     210        if (dt < 8*3600.0 && QString(eph->prn().toString().c_str()) == prn && eph->IOD() == iod) {
    211211          it = _ephs.erase(it);
    212212          return eph;
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r5672 r5776  
    690690
    691691  outLine.sprintf("%d %.1f %s  %3d  %10.3f  %8.3f %8.3f %8.3f\n",
    692                   GPSweek, GPSweeks, eph->prn().toAscii().data(),
     692                  GPSweek, GPSweeks, eph->prn().toString().c_str(),
    693693                  eph->IOD(), dClk, rsw(1), rsw(2), rsw(3));
    694694
Note: See TracChangeset for help on using the changeset viewer.