Changeset 2113 in ntrip


Ignore:
Timestamp:
Dec 15, 2009, 10:02:11 AM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r2054 r2113  
    288288  if (settings.value("pppMount").toString() == _staID) {
    289289    _PPPclient = new bncPPPclient(_staID);
    290     connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
    291             _PPPclient, SLOT(slotNewEphGPS(gpsephemeris)));
    292     connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
    293             _PPPclient, SLOT(slotNewCorrections(QList<QString>)));
    294     connect(_PPPclient, SIGNAL(newMessage(QByteArray,bool)),
    295             ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
    296290  }
    297291
  • trunk/BNC/bncmodel.cpp

    r2112 r2113  
    4242#include <cmath>
    4343#include <newmatio.h>
     44#include <sstream>
    4445
    4546#include "bncmodel.h"
     47#include "bncapp.h"
    4648#include "bncpppclient.h"
    4749#include "bancroft.h"
     
    5153using namespace std;
    5254
    53 const unsigned MINOBS =    4;
    54 const double   MINELE = 10.0 * M_PI / 180.0;
    55 const double   sig_crd_0 =  100.0;
    56 const double   sig_crd_p =  100.0;
    57 const double   sig_clk_0 = 1000.0;
    58 const double   sig_trp_0 =    0.01;
    59 const double   sig_trp_p =    1e-6;
    60 const double   sig_amb_0 =  100.0;
    61 const double   sig_P3    =    1.0;
    62 const double   sig_L3    =    0.01;
     55const unsigned MINOBS       =    4;
     56const double   MINELE       = 10.0 * M_PI / 180.0;
     57const double   MAXRES_CODE  = 10.0;
     58const double   MAXRES_PHASE = 0.10;
     59const double   sig_crd_0    =  100.0;
     60const double   sig_crd_p    =  100.0;
     61const double   sig_clk_0    = 1000.0;
     62const double   sig_trp_0    =    0.01;
     63const double   sig_trp_p    =    1e-6;
     64const double   sig_amb_0    =  100.0;
     65const double   sig_P3       =    1.0;
     66const double   sig_L3       =    0.01;
    6367
    6468// Constructor
     
    109113// Constructor
    110114////////////////////////////////////////////////////////////////////////////
    111 bncModel::bncModel() {
     115bncModel::bncModel(QByteArray staID) {
     116
     117  _staID   = staID;
     118
     119  connect(this, SIGNAL(newMessage(QByteArray,bool)),
     120          ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
    112121
    113122  bncSettings settings;
     
    394403  ColumnVector    vv;
    395404
     405  // Loop over all outliers
     406  // ----------------------
    396407  do {
    397 
    398     if (epoData->size() < MINOBS) {
    399       return failure;
    400     }
    401408   
    402409    // Bancroft Solution
     
    470477  }
    471478
     479  // Message (both log file and screen)
     480  // ----------------------------------
     481  ostringstream str;
     482  str.setf(ios::fixed);
     483  str << "    PPP " << _staID.data() << " "
     484      << epoData->tt.timestr(1) << " " << epoData->size() << " "
     485      << setw(14) << setprecision(3) << x()   << "  "
     486      << setw(14) << setprecision(3) << y()   << "  "
     487      << setw(14) << setprecision(3) << z();
     488
     489  emit newMessage(QString(str.str().c_str()).toAscii(), true);
     490
    472491  return success;
    473492}
     
    478497                               const ColumnVector& vv,
    479498                               QMap<QString, t_satData*>& satData) {
    480 
    481   const static double MAXRES_CODE  = 10.0;
    482   const static double MAXRES_PHASE = 0.10;
    483499
    484500  double vvMaxCode  = 0.0;
  • trunk/BNC/bncmodel.h

    r2112 r2113  
    5050};
    5151
    52 class bncModel {
     52class bncModel : public QObject {
     53 Q_OBJECT
    5354 public:
    54   bncModel();
     55  bncModel(QByteArray staID);
    5556  ~bncModel();
    5657  t_irc cmpBancroft(t_epoData* epoData);
     
    6263  double trp() const {return _estTropo ? _params[4]->xx : 0.0;}
    6364 
     65 signals:
     66  void newMessage(QByteArray msg, bool showOnScreen);
     67
    6468 private:
    6569  double cmpValue(t_satData* satData);
     
    7074                          QMap<QString, t_satData*>& satData);
    7175
     76  QByteArray         _staID;
    7277  QVector<bncParam*> _params;
    7378  SymmetricMatrix    _QQ;
  • trunk/BNC/bncpppclient.cpp

    r2108 r2113  
    3939 * -----------------------------------------------------------------------*/
    4040
    41 #include <iomanip>
    42 #include <newmatio.h>
    43 #include <sstream>
    44 
    4541#include "bncpppclient.h"
     42#include "bncapp.h"
    4643#include "bncutils.h"
    4744#include "bncconst.h"
     
    5754////////////////////////////////////////////////////////////////////////////
    5855bncPPPclient::bncPPPclient(QByteArray staID) {
     56
     57  connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
     58          this, SLOT(slotNewEphGPS(gpsephemeris)));
     59  connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
     60          this, SLOT(slotNewCorrections(QList<QString>)));
     61
    5962  _staID   = staID;
    6063  _epoData = 0;
    61   _model   = new bncModel();
     64  _model   = new bncModel(staID);
    6265}
    6366
     
    333336    return;
    334337  }
    335 
    336   ostringstream str;
    337   str.setf(ios::fixed);
    338   str << "    PPP " << _staID.data() << " "
    339       << _epoData->tt.timestr(1) << " " << _epoData->size() << " "
    340       << setw(14) << setprecision(3) << _model->x()   << "  "
    341       << setw(14) << setprecision(3) << _model->y()   << "  "
    342       << setw(14) << setprecision(3) << _model->z()   << "  "
    343       << setw(8)  << setprecision(3) << _model->clk() << "  "
    344       << setw(8)  << setprecision(3) << _model->trp();
    345 
    346   emit newMessage(QString(str.str().c_str()).toAscii(), true);
    347 }
    348 
     338}
     339
  • trunk/BNC/bncpppclient.h

    r2065 r2113  
    8888  void putNewObs(p_obs pp);
    8989
    90  signals:
    91   void newMessage(QByteArray msg, bool showOnScreen);
    92 
    9390 public slots:
    9491  void slotNewEphGPS(gpsephemeris gpseph);
Note: See TracChangeset for help on using the changeset viewer.