Changeset 6061 in ntrip


Ignore:
Timestamp:
Sep 7, 2014, 9:30:48 AM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_free/bncmodel.cpp

    r6060 r6061  
    4545
    4646#include "bncmodel.h"
     47#include "pppClient.h"
    4748#include "bncpppclient.h"
    4849#include "bnccore.h"
     
    339340  if (_antex) {
    340341    bool found;
    341     phaseCenter = _antex->pco(_opt->antennaName, satData->eleSat, found);
     342    phaseCenter = _antex->pco(QString(_opt->_antNameRover.c_str()), satData->eleSat, found);
    342343    if (!found) {
    343       _pppClient->emitNewMessage("ANTEX: antenna >"
    344                       + _opt->antennaName.toAscii() + "< not found", true);
     344      LOG << "ANTEX: antenna >" << _opt->_antNameRover << "< not found\n";
    345345    }
    346346  }
    347347
    348348  double antennaOffset = 0.0;
    349   if (_opt->antEccSet()) {
    350     double cosa = cos(satData->azSat);
    351     double sina = sin(satData->azSat);
    352     double cose = cos(satData->eleSat);
    353     double sine = sin(satData->eleSat);
    354     antennaOffset = -_opt->antEccNEU[0] * cosa*cose
    355                     -_opt->antEccNEU[1] * sina*cose
    356                     -_opt->antEccNEU[2] * sine;
    357   }
     349  double cosa = cos(satData->azSat);
     350  double sina = sin(satData->azSat);
     351  double cose = cos(satData->eleSat);
     352  double sine = sin(satData->eleSat);
     353  antennaOffset = -_opt->_neuEccRover(1) * cosa*cose
     354                  -_opt->_neuEccRover(2) * sina*cose
     355                  -_opt->_neuEccRover(3) * sine;
    358356
    359357  return satData->rho + phaseCenter + antennaOffset + clk()
     
    410408  if (iPhase == 0) {
    411409
     410    const double maxSolGap = 0.0;
     411
    412412    bool firstCrd = false;
    413     if (!_lastTimeOK.valid() || (_opt->maxSolGap > 0 && _time - _lastTimeOK > _opt->maxSolGap)) {
     413    if (!_lastTimeOK.valid() || (maxSolGap > 0.0 && _time - _lastTimeOK > maxSolGap)) {
    414414      firstCrd = true;
    415415      _startTime = epoData->tt;
     
    419419    // Use different white noise for Quick-Start mode
    420420    // ----------------------------------------------
    421     double sigCrdP_used = _opt->sigCrdP;
    422     if ( _opt->quickStart > 0.0 && _opt->quickStart > (epoData->tt - _startTime) ) {
     421    double sigCrdP_used = _opt->_noiseCrd(1);
     422    if ( _opt->_seedingTime > 0.0 && _opt->_seedingTime > (epoData->tt - _startTime) ) {
    423423      sigCrdP_used   = 0.0;
    424424    }
     
    433433      if      (pp->type == bncParam::CRD_X) {
    434434        if (firstCrd) {
    435           if (_opt->refCrdSet()) {
    436             pp->xx = _opt->refCrd[0];
     435          if (_opt->xyzAprRoverSet()) {
     436            pp->xx = _opt->_xyzAprRover[0];
    437437          }
    438438          else {
     
    444444      else if (pp->type == bncParam::CRD_Y) {
    445445        if (firstCrd) {
    446           if (_opt->refCrdSet()) {
    447             pp->xx = _opt->refCrd[1];
     446          if (_opt->xyzAprRoverSet()) {
     447            pp->xx = _opt->_xyzAprRover[1];
    448448          }
    449449          else {
     
    455455      else if (pp->type == bncParam::CRD_Z) {
    456456        if (firstCrd) {
    457           if (_opt->refCrdSet()) {
    458             pp->xx = _opt->refCrd[2];
     457          if (_opt->xyzAprRoverSet()) {
     458            pp->xx = _opt->_xyzAprRover[2];
    459459          }
    460460          else {
     
    472472          _QQ(iPar, jj) = 0.0;
    473473        }
    474         _QQ(iPar,iPar) = _opt->sigClk0 * _opt->sigClk0;
     474        _QQ(iPar,iPar) = _opt->_noiseClk * _opt->_noiseClk;
    475475      }
    476476   
     
    478478      // ------------------
    479479      else if (pp->type == bncParam::TROPO) {
    480         _QQ(iPar,iPar) += _opt->sigTrpP * _opt->sigTrpP;
     480        _QQ(iPar,iPar) += _opt->_noiseTrp * _opt->_noiseTrp;
    481481      }
    482482   
     
    484484      // --------------
    485485      else if (pp->type == bncParam::GLONASS_OFFSET) {
    486         bool epoSpec = true;
    487         if (epoSpec) {
    488           pp->xx = 0.0;
    489           for (int jj = 1; jj <= _params.size(); jj++) {
    490             _QQ(iPar, jj) = 0.0;
    491           }
    492           _QQ(iPar,iPar) = _opt->sigGlonassOffset0 * _opt->sigGlonassOffset0;
    493         }
    494         else {
    495           _QQ(iPar,iPar) += _opt->sigGlonassOffsetP * _opt->sigGlonassOffsetP;
    496         }
     486        pp->xx = 0.0;
     487        for (int jj = 1; jj <= _params.size(); jj++) {
     488          _QQ(iPar, jj) = 0.0;
     489        }
     490        _QQ(iPar,iPar) = 1000.0 * 1000.0;
    497491      }
    498492
     
    500494      // --------------
    501495      else if (pp->type == bncParam::GALILEO_OFFSET) {
    502         _QQ(iPar,iPar) += _opt->sigGalileoOffsetP * _opt->sigGalileoOffsetP;
     496        _QQ(iPar,iPar) += 0.1 * 0.1;
    503497      }
    504498    }
Note: See TracChangeset for help on using the changeset viewer.