Changeset 2058 in ntrip for trunk/BNC/bncpppclient.cpp


Ignore:
Timestamp:
Dec 1, 2009, 11:49:03 AM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpppclient.cpp

    r2055 r2058  
    4646#include "bncutils.h"
    4747#include "bncconst.h"
    48 #include "bancroft.h"
     48#include "bncmodel.h"
    4949
    5050extern "C" {
     
    5959  _staID   = staID;
    6060  _epoData = 0;
     61  _model   = new bncModel();
    6162}
    6263
     
    6465////////////////////////////////////////////////////////////////////////////
    6566bncPPPclient::~bncPPPclient() {
     67  delete _model;
    6668  delete _epoData;
    6769  QMapIterator<QString, t_eph*> it(_eph);
     
    288290void bncPPPclient::processEpoch() {
    289291
    290   const unsigned MINOBS = 4;
    291 
    292292  // Data Pre-Processing
    293293  // -------------------
     
    305305  }
    306306
    307   if (_epoData->size() < MINOBS) {
    308     return;
    309   }
    310 
    311307  // Bancroft Solution
    312308  // -----------------
    313   Matrix BB(_epoData->size(), 4);
    314 
    315   QMapIterator<QString, t_satData*> it(_epoData->satData);
    316   int iObs = 0;
    317   while (it.hasNext()) {
    318     it.next();
    319     QString    prn     = it.key();
    320     t_satData* satData = it.value();
    321     ++iObs;
    322     BB(iObs, 1) = satData->xx(1);
    323     BB(iObs, 2) = satData->xx(2);
    324     BB(iObs, 3) = satData->xx(3);
    325     BB(iObs, 4) = satData->P3 + satData->clk;
    326   }
    327 
    328   ColumnVector pos(4);
    329   bancroft(BB, pos);
     309  if (_model->cmpBancroft(_epoData) != success) {
     310    return;
     311  }
    330312
    331313  ostringstream str;
    332314  str.setf(ios::fixed);
    333   str << "    PPP "
     315  str << "    PPP " << _staID.data() << " "
    334316      << _epoData->tt.timestr(1) << " " << _epoData->size() << " "
    335       << setw(14) << setprecision(3) << pos(1)              << "  "
    336       << setw(14) << setprecision(3) << pos(2)              << "  "
    337       << setw(14) << setprecision(3) << pos(3);
     317      << setw(14) << setprecision(3) << _model->xcBanc()(1) << "  "
     318      << setw(14) << setprecision(3) << _model->xcBanc()(2) << "  "
     319      << setw(14) << setprecision(3) << _model->xcBanc()(3);
    338320
    339321  emit newMessage(QString(str.str().c_str()).toAscii(), true);
Note: See TracChangeset for help on using the changeset viewer.