Changeset 2244 in ntrip


Ignore:
Timestamp:
Jan 12, 2010, 4:59:28 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r2243 r2244  
    6565const double   sig_amb_0        = 1000.0;
    6666const double   sig_P3           =    1.0;
    67 const double   sig_L3           =    0.01;
     67const double   sig_L3_GPS       =    0.01;
     68const double   sig_L3_GLO       =    0.10;
    6869
    6970// Constructor
     
    102103  // ---------------
    103104  else if (type == RECCLK_GPS) {
    104     if (satData->prn[0] == 'G') {
    105       return 1.0;
    106     }
    107     else {
    108       return 0.0;
    109     }
     105    return 1.0;
    110106  }
    111107  else if (type == RECCLK_GLO) {
     
    394390void bncModel::predict(t_epoData* epoData) {
    395391
     392  bool firstCrd = x() == 0.0 && y() == 0.0 && z() == 0.0;
     393
     394  // Predict Parameter values, add white noise
     395  // -----------------------------------------
     396  for (int iPar = 1; iPar <= _params.size(); iPar++) {
     397    bncParam* pp = _params[iPar-1];
     398 
     399    // Coordinates
     400    // -----------
     401    if      (pp->type == bncParam::CRD_X) {
     402      if (firstCrd || !_static) {
     403        pp->xx = _xcBanc(1);
     404      }
     405      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
     406    }
     407    else if (pp->type == bncParam::CRD_Y) {
     408      if (firstCrd || !_static) {
     409        pp->xx = _xcBanc(2);
     410      }
     411      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
     412    }
     413    else if (pp->type == bncParam::CRD_Z) {
     414      if (firstCrd || !_static) {
     415        pp->xx = _xcBanc(3);
     416      }
     417      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
     418    }   
     419
     420    // Receiver Clocks
     421    // ---------------
     422    else if (pp->isClk()) {
     423      pp->xx = _xcBanc(4);
     424      for (int jj = 1; jj <= _params.size(); jj++) {
     425        _QQ(iPar, jj) = 0.0;
     426      }
     427      _QQ(iPar,iPar) = sig_clk_0 * sig_clk_0;
     428    }
     429
     430    // Tropospheric Delay
     431    // ------------------
     432    else if (pp->type == bncParam::TROPO) {
     433      _QQ(iPar,iPar) += sig_trp_p * sig_trp_p;
     434    }
     435  }
     436
     437  // Add New Ambiguities if necessary
     438  // --------------------------------
    396439  if (_usePhase) {
    397440
     
    432475      iGPS.next();
    433476      QString prn        = iGPS.key();
     477      t_satData* satData = iGPS.value();
    434478      bool    found = false;
    435479      for (int iPar = 1; iPar <= _params.size(); iPar++) {
     
    443487        bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn);
    444488        _params.push_back(par);
     489        par->xx = satData->L3 - cmpValue(satData);
    445490      }
    446491    }
     
    462507        bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn);
    463508        _params.push_back(par);
    464         ///        par->xx = satData->L3 - cmpValue(satData);
     509        par->xx = satData->L3 - cmpValue(satData);
    465510      }
    466511    }
     
    490535  }
    491536
    492   bool firstCrd = x() == 0.0 && y() == 0.0 && z() == 0.0;
    493 
    494   for (int iPar = 1; iPar <= _params.size(); iPar++) {
    495     bncParam* pp = _params[iPar-1];
    496  
    497     // Coordinates
    498     // -----------
    499     if      (pp->type == bncParam::CRD_X) {
    500       if (firstCrd || !_static) {
    501         pp->xx = _xcBanc(1);
    502       }
    503       _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
    504     }
    505     else if (pp->type == bncParam::CRD_Y) {
    506       if (firstCrd || !_static) {
    507         pp->xx = _xcBanc(2);
    508       }
    509       _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
    510     }
    511     else if (pp->type == bncParam::CRD_Z) {
    512       if (firstCrd || !_static) {
    513         pp->xx = _xcBanc(3);
    514       }
    515       _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
    516     }   
    517 
    518     // Receiver Clocks
    519     // ---------------
    520     else if (pp->isClk()) {
    521       pp->xx = _xcBanc(4);
    522       for (int jj = 1; jj <= _params.size(); jj++) {
    523         _QQ(iPar, jj) = 0.0;
    524       }
    525       _QQ(iPar,iPar) = sig_clk_0 * sig_clk_0;
    526     }
    527 
    528     // Tropospheric Delay
    529     // ------------------
    530     else if (pp->type == bncParam::TROPO) {
    531       _QQ(iPar,iPar) += sig_trp_p * sig_trp_p;
    532     }
    533   }
    534537}
    535538
     
    596599      double rhoCmp = cmpValue(satData);
    597600   
    598       double ellWgtCoeff = 1.0;
    599       ////  double eleD = satData->eleSat * 180.0 / M_PI;
    600       ////  if (eleD < 25.0) {
    601       ////    ellWgtCoeff = 2.5 - (eleD - 10.0) * 0.1;
    602       ////    ellWgtCoeff *= ellWgtCoeff;
    603       ////  }
    604 
    605601      ll(iObs)      = satData->P3 - rhoCmp;
    606       PP(iObs,iObs) = 1.0 / (sig_P3 * sig_P3) / ellWgtCoeff;
     602      PP(iObs,iObs) = 1.0 / (sig_P3 * sig_P3);
    607603      for (int iPar = 1; iPar <= _params.size(); iPar++) {
    608604        AA(iObs, iPar) = _params[iPar-1]->partial(satData, false);
     
    612608        ++iObs;
    613609        ll(iObs)      = satData->L3 - rhoCmp;
    614         PP(iObs,iObs) = 1.0 / (sig_L3 * sig_L3) / ellWgtCoeff;
     610        PP(iObs,iObs) = 1.0 / (sig_L3_GPS * sig_L3_GPS);
    615611        for (int iPar = 1; iPar <= _params.size(); iPar++) {
    616612          if (_params[iPar-1]->type == bncParam::AMB_L3 &&
     
    635631        double rhoCmp = cmpValue(satData);
    636632       
    637         double ellWgtCoeff = 1.0;
    638         ////  double eleD = satData->eleSat * 180.0 / M_PI;
    639         ////  if (eleD < 25.0) {
    640         ////    ellWgtCoeff = 2.5 - (eleD - 10.0) * 0.1;
    641         ////    ellWgtCoeff *= ellWgtCoeff;
    642         ////  }
    643 
    644633        ll(iObs)      = satData->L3 - rhoCmp;
    645634
     
    650639             << setprecision(3) << satData->L3 << endl;
    651640
    652         PP(iObs,iObs) = 1.0 / (sig_L3 * sig_L3) / ellWgtCoeff;
     641        PP(iObs,iObs) = 1.0 / (sig_L3_GLO * sig_L3_GLO);
    653642        for (int iPar = 1; iPar <= _params.size(); iPar++) {
    654643          if (_params[iPar-1]->type == bncParam::AMB_L3 &&
     
    683672    dx    = _QQ * ATP * ll;
    684673    vv    = ll - AA * dx;
     674    cout << "vv = " << endl;
     675    cout << vv.t() << endl;
    685676
    686677  } while (outlierDetection(QQsav, vv, epoData->satDataGPS,
  • trunk/BNC/bncpppclient.cpp

    r2241 r2244  
    332332    ee->position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
    333333
    334     if (CORR_REQUIRED) {
     334    if (prn[0] == 'G' && CORR_REQUIRED) {
    335335      if (_corr.contains(prn)) {
    336336        t_corr* cc = _corr.value(prn);
Note: See TracChangeset for help on using the changeset viewer.