Changeset 5772 in ntrip


Ignore:
Timestamp:
Aug 4, 2014, 9:52:05 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
3 edited

Legend:

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

    r5769 r5772  
    108108//
    109109//////////////////////////////////////////////////////////////////////////////
    110 void t_pppClient::putGPSEphemeris(const t_ephGPS* eph) {
    111   _ephPool->putEphemeris(new t_ephGPS(*eph));
    112 }
    113 
    114 //
    115 //////////////////////////////////////////////////////////////////////////////
    116 void t_pppClient::putGloEphemeris(const t_ephGlo* eph) {
    117   _ephPool->putEphemeris(new t_ephGlo(*eph));
    118 }
    119 
    120 //
    121 //////////////////////////////////////////////////////////////////////////////
    122 void t_pppClient::putGalEphemeris(const t_ephGal* eph) {
    123   _ephPool->putEphemeris(new t_ephGal(*eph));
    124 }
    125 
    126 //
    127 //////////////////////////////////////////////////////////////////////////////
    128 void t_pppClient::putOrbCorrections(int numCorr, const t_orbCorr* corr) {
    129   for (int ii = 0; ii < numCorr; ii++) {
     110void t_pppClient::putEphemeris(const t_eph* eph) {
     111  const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph);
     112  const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph);
     113  const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
     114  if      (ephGPS) {
     115    _ephPool->putEphemeris(new t_ephGPS(*ephGPS));
     116  }
     117  else if (ephGlo) {
     118    _ephPool->putEphemeris(new t_ephGlo(*ephGlo));
     119  }
     120  else if (ephGal) {
     121    _ephPool->putEphemeris(new t_ephGal(*ephGal));
     122  }
     123}
     124
     125//
     126//////////////////////////////////////////////////////////////////////////////
     127void t_pppClient::putOrbCorrections(const vector<t_orbCorr>& corr) {
     128  for (unsigned ii = 0; ii < corr.size(); ii++) {
    130129    _ephPool->putOrbCorrection(new t_orbCorr(corr[ii]));
    131130  }
     
    134133//
    135134//////////////////////////////////////////////////////////////////////////////
    136 void t_pppClient::putClkCorrections(int numCorr, const t_clkCorr* corr) {
    137   for (int ii = 0; ii < numCorr; ii++) {
     135void t_pppClient::putClkCorrections(const vector<t_clkCorr>& corr) {
     136  for (unsigned ii = 0; ii < corr.size(); ii++) {
    138137    _ephPool->putClkCorrection(new t_clkCorr(corr[ii]));
    139138  }
     
    142141//
    143142//////////////////////////////////////////////////////////////////////////////
    144 void t_pppClient::putBiases(int numBiases, const t_satBiases* biases) {
    145   for (int ii = 0; ii < numBiases; ii++) {
     143void t_pppClient::putBiases(const vector<t_satBiases>& biases) {
     144  for (unsigned ii = 0; ii < biases.size(); ii++) {
    146145    _obsPool->putBiases(new t_satBias(biases[ii]));
    147146  }
     
    150149//
    151150//////////////////////////////////////////////////////////////////////////////
    152 t_irc t_pppClient::prepareObs(int numSat, const t_pppSatObs* satObs,
    153                                  vector<t_satObs*>& obsVector, bncTime& epoTime) {
     151t_irc t_pppClient::prepareObs(const vector<t_pppSatObs>& pppSatObs,
     152                              vector<t_satObs*>& obsVector, bncTime& epoTime) {
    154153  // Default
    155154  // -------
     
    159158  // -----------------------------------
    160159  int numValidGPS = 0;
    161   for (int ii = 0; ii < numSat; ii++) {
    162     char system = satObs[ii]._prn.system();
     160  for (unsigned ii = 0; ii < pppSatObs.size(); ii++) {
     161    char system = pppSatObs[ii]._prn.system();
    163162    if (system == 'G' || (system == 'R' && OPT->useGlonass())) {
    164       t_satObs* satObs = new t_satObs(satObs[ii]);
     163      t_satObs* satObs = new t_satObs(pppSatObs[ii]);
    165164      if (satObs->isValid()) {
    166165        obsVector.push_back(satObs);
     
    401400//
    402401//////////////////////////////////////////////////////////////////////////////
    403 void t_pppClient::processEpoch(int numSatRover, const t_pppSatObs* satObsRover,
    404                              t_output* output) {
     402void t_pppClient::processEpoch(const vector<t_pppSatObs>& pppSatObs, t_output* output) {
    405403
    406404  try {
     
    409407    // Prepare Observations of the Rover
    410408    // ---------------------------------   
    411     if (prepareObs(numSatRover, satObsRover, _obsRover,
    412                     _epoTimeRover) != success) {
     409    if (prepareObs(pppSatObs, _obsRover, _epoTimeRover) != success) {
    413410      return finish(failure);
    414411    }
  • trunk/BNC/src/PPP/pppClient.h

    r5769 r5772  
    2323  ~t_pppClient();                                                     
    2424
    25   void putGPSEphemeris(const t_ephGPS* eph);                 
    26   void putGloEphemeris(const t_ephGlo* eph);                 
    27   void putGalEphemeris(const t_ephGal* eph);                 
    28   void putOrbCorrections(int numCorr, const t_orbCorr* corr);
    29   void putClkCorrections(int numCorr, const t_clkCorr* corr);
    30   void putBiases(int numBiases, const t_satBiases* biases);   
    31   void processEpoch(int numSatRover, const t_pppSatObs* satObsRover,
    32                     t_output* output);                       
     25  void putEphemeris(const t_eph* eph);                 
     26  void putOrbCorrections(const std::vector<t_orbCorr>& corr);
     27  void putClkCorrections(const std::vector<t_clkCorr>& corr);
     28  void putBiases(const std::vector<t_satBiases>& biases);   
     29  void processEpoch(const std::vector<t_pppSatObs>& pppSatObs, t_output* output);
    3330
    3431  const t_ephPool* ephPool() const {return _ephPool;}
     
    4946  void finish(t_irc irc);
    5047  void clearObs();
    51   t_irc prepareObs(int numSat, const t_pppSatObs* satObs,
    52                         std::vector<t_satObs*>& obsVector, bncTime& epoTime);
     48  t_irc prepareObs(const std::vector<t_pppSatObs>& pppSatObs,
     49                   std::vector<t_satObs*>& obsVector, bncTime& epoTime);
    5350  t_irc cmpModel(t_station* station, const ColumnVector& xyzc,
    54                       std::vector<t_satObs*>& obsVector);
    55   t_irc cmpBancroft(const bncTime& epoTime,
    56                          std::vector<t_satObs*>& obsVector,
    57                          ColumnVector& xyzc, bool print);
     51                 std::vector<t_satObs*>& obsVector);
     52  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_satObs*>& obsVector,
     53                    ColumnVector& xyzc, bool print);
    5854  double cmpOffGG(std::vector<t_satObs*>& obsVector);
    5955
  • trunk/BNC/src/PPP/pppThread.cpp

    r5771 r5772  
    118118  t_ephGPS eph;
    119119  eph.set(&gpseph);
    120   _pppClient->putGPSEphemeris(&eph);
     120  _pppClient->putEphemeris(&eph);
    121121}
    122122
     
    127127  t_ephGlo eph;
    128128  eph.set(&gloeph);
    129   _pppClient->putGloEphemeris(&eph);
     129  _pppClient->putEphemeris(&eph);
    130130}
    131131 
     
    136136  t_ephGal eph;
    137137  eph.set(&galeph);
    138   _pppClient->putGalEphemeris(&eph);
     138  _pppClient->putEphemeris(&eph);
    139139}
    140140
     
    148148  }
    149149
    150   // _pppClient->putOrbCorrections(int numCorr, const t_orbCorr* corr);
    151   // _pppClient->putClkCorrections(int numCorr, const t_clkCorr* corr);
    152   // _pppClient->putBiases(int numBiases, const t_satBiases* biases);   
     150  // _pppClient->putOrbCorrections(const std::vector<t_orbCorr>& corr);
     151  // _pppClient->putClkCorrections(const std::vector<t_clkCorr>& corr);
     152  // _pppClient->putBiases(const std::vector<t_satBiases>& biases);   
    153153}
    154154//
     
    157157  QMutexLocker locker(&_mutex);
    158158
    159   QByteArray msg = "slotNewObs";
    160   emit newMessage(msg, true);
     159
     160  vector<t_pppSatObs> satObs;
     161  t_output            output;
     162
     163  _pppClient->processEpoch(satObs, &output);
     164
     165  emit newMessage(QByteArray(output._log.c_str()), true);
    161166}
    162167   
Note: See TracChangeset for help on using the changeset viewer.