Changeset 4261 in ntrip


Ignore:
Timestamp:
Jun 22, 2012, 10:12:35 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/rinex
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/bncpostprocess.cpp

    r3999 r4261  
    102102}
    103103
     104// Set Observations from RINEX File
     105////////////////////////////////////////////////////////////////////////////
     106void t_postProcessing::setObsFromRnx(const t_rnxObsFile* rnxObsFile,
     107                                     const t_rnxObsFile::t_rnxEpo* epo,
     108                                     const t_rnxObsFile::t_rnxSat& rnxSat,
     109                                     t_obs& obs) {
     110
     111  strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(),
     112          sizeof(obs.StatID));
     113  obs.satSys   = rnxSat.satSys;
     114  obs.satNum   = rnxSat.satNum;
     115  obs.GPSWeek  = epo->tt.gpsw();
     116  obs.GPSWeeks = epo->tt.gpssec();
     117  //// TODO: check RINEX Version 3 types
     118  for (int iType = 0; iType < rnxObsFile->nTypes(obs.satSys); iType++) {
     119    QByteArray type = rnxObsFile->obsType(obs.satSys,iType).toAscii();
     120    if      (type.indexOf("C1") == 0 && obs.C1  == 0.0) {
     121      obs.C1 = rnxSat.obs[iType];
     122    }
     123    else if (type.indexOf("P1") == 0 && obs.P1  == 0.0) {
     124      obs.P1 = rnxSat.obs[iType];
     125    }
     126    else if (type.indexOf("L1") == 0 && obs.L1C == 0.0) {
     127      obs.L1C = rnxSat.obs[iType];
     128    }
     129    else if (type.indexOf("C2") == 0 && obs.C2  == 0.0) {
     130      obs.C2 = rnxSat.obs[iType];
     131    }
     132    else if (type.indexOf("P2") == 0 && obs.P2  == 0.0) {
     133      obs.P2 = rnxSat.obs[iType];
     134    }
     135    else if (type.indexOf("L2") == 0 && obs.L2C == 0.0) {
     136      obs.L2C = rnxSat.obs[iType];
     137    }
     138  }
     139}
     140
    104141// 
    105142////////////////////////////////////////////////////////////////////////////
     
    149186
    150187    for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) {
    151       bool obsOK = true;
     188
    152189      const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs];
     190   
    153191      t_obs obs;
    154       strncpy(obs.StatID, _rnxObsFile->markerName().toAscii().constData(),
    155               sizeof(obs.StatID));
    156       obs.satSys   = rnxSat.satSys;
    157       obs.satNum   = rnxSat.satNum;
    158       obs.GPSWeek  = epo->tt.gpsw();
    159       obs.GPSWeeks = epo->tt.gpssec();
    160       //// TODO: check RINEX Version 3 types
    161       for (int iType = 0; iType < _rnxObsFile->nTypes(obs.satSys); iType++) {
    162         QByteArray type = _rnxObsFile->obsType(obs.satSys,iType).toAscii();
    163         if      (type.indexOf("C1") == 0 && obs.C1  == 0.0) {
    164           obs.C1 = rnxSat.obs[iType];
    165         }
    166         else if (type.indexOf("P1") == 0 && obs.P1  == 0.0) {
    167           obs.P1 = rnxSat.obs[iType];
    168         }
    169         else if (type.indexOf("L1") == 0 && obs.L1C == 0.0) {
    170           obs.L1C = rnxSat.obs[iType];
    171         }
    172         else if (type.indexOf("C2") == 0 && obs.C2  == 0.0) {
    173           obs.C2 = rnxSat.obs[iType];
    174         }
    175         else if (type.indexOf("P2") == 0 && obs.P2  == 0.0) {
    176           obs.P2 = rnxSat.obs[iType];
    177         }
    178         else if (type.indexOf("L2") == 0 && obs.L2C == 0.0) {
    179           obs.L2C = rnxSat.obs[iType];
    180         }
    181       }
     192      t_postProcessing::setObsFromRnx(_rnxObsFile, epo, rnxSat, obs);
    182193
    183194      // Get Glonass Channel Number
    184195      // -------------------------
     196      bool obsOK = true;
    185197      if (obs.satSys == 'R') {
    186198        QString prn = QString("%1%2").arg(obs.satSys)
  • trunk/BNC/rinex/bncpostprocess.h

    r3721 r4261  
    2828#include <QtCore>
    2929#include "bncconst.h"
     30#include "rnxobsfile.h"
    3031extern "C" {
    3132#include "rtcm3torinex.h"
     
    3435class t_pppOpt;
    3536class bncPPPclient;
    36 class t_rnxObsFile;
    3737class t_rnxNavFile;
    3838class t_corrFile;
     39class t_obs;
    3940
    4041class t_postProcessing : public QThread {
     
    4344 public:
    4445  t_postProcessing(QObject* parent);
     46  static void setObsFromRnx(const t_rnxObsFile* rnxObsFile,
     47                            const t_rnxObsFile::t_rnxEpo* epo,
     48                            const t_rnxObsFile::t_rnxSat& rnxSat,
     49                            t_obs& obs);
    4550
    4651 protected:
Note: See TracChangeset for help on using the changeset viewer.