Changeset 9635 in ntrip for trunk/BNC/src/combination/bnccomb.h


Ignore:
Timestamp:
Feb 24, 2022, 5:08:42 PM (2 years ago)
Author:
stuerze
Message:

consideration of incoming Code Biases during clock combination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.h

    r9530 r9635  
    44
    55#include <fstream>
     6#include <map>
    67#include <newmat.h>
    78#include "bncephuser.h"
    89#include "satObs.h"
     10#include "bncconst.h"
    911#include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
    1012#include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
     
    8082      _iod        = 0;
    8183      _dClkResult = 0.0;
     84      _codeBiasIF   = 0.0;
    8285    }
    8386    ~cmbCorr() {}
     
    9093    t_satCodeBias _satCodeBias;
    9194    QString       _acName;
     95    double        _codeBiasIF;
    9296    double        _dClkResult;
    9397    ColumnVector  _diffRao;
     
    106110    QVector<cmbCorr*> corrs;
    107111  };
     112
     113  class t_lcRefSig {
     114   public:
     115    enum type {dummy = 0, c1, c2, cIF};
     116
     117    static t_frequency::type toFreq(char sys, type tt) {
     118      switch (tt) {
     119      case c1:
     120        if      (sys == 'G') return t_frequency::G1;
     121        else if (sys == 'R') return t_frequency::R1;
     122        else if (sys == 'E') return t_frequency::E1;
     123        else if (sys == 'C') return t_frequency::C2;
     124        else if (sys == 'J') return t_frequency::J1;
     125        else if (sys == 'S') return t_frequency::S1;
     126        else                 return t_frequency::dummy;
     127      case c2:
     128        if      (sys == 'G') return t_frequency::G2;
     129        else if (sys == 'R') return t_frequency::R2;
     130        else if (sys == 'E') return t_frequency::E5;
     131        else if (sys == 'C') return t_frequency::C6;
     132        else if (sys == 'J') return t_frequency::J2;
     133        else if (sys == 'S') return t_frequency::S5;
     134        else                 return t_frequency::dummy;
     135      case dummy:
     136      case cIF:
     137        return t_frequency::dummy;
     138      }
     139      return t_frequency::dummy;
     140    }
     141
     142    static char toAttrib(char sys, type LC) {
     143      switch (LC) {
     144        case c1:
     145          if      (sys == 'G') return 'W';
     146          else if (sys == 'R') return 'P';
     147          else if (sys == 'E') return 'C';
     148          else if (sys == 'C') return 'I';
     149          else if (sys == 'J') return 'C';
     150          else if (sys == 'S') return 'C';
     151          break;
     152        case c2:
     153          if      (sys == 'G') return 'W';
     154          else if (sys == 'R') return 'P';
     155          else if (sys == 'E') return 'Q';
     156          else if (sys == 'C') return 'I';
     157          else if (sys == 'J') return 'L';
     158          else if (sys == 'S') return 'Q';
     159          break;
     160      case dummy:
     161      case cIF:
     162        return '_';
     163        break;
     164      }
     165      return '_';
     166    }
     167
     168      static void coeff(char sys, type tLC, double channel, std::map<t_frequency::type, double>& codeCoeff)  {
     169      codeCoeff.clear();
     170      t_frequency::type fType1 = toFreq(sys, c1);
     171      t_frequency::type fType2 = toFreq(sys, c2);
     172      double f1 = t_CST::freq(fType1, channel);
     173      double f2 = t_CST::freq(fType2, channel);
     174      switch (tLC) {
     175        case c1:
     176          codeCoeff[fType1] = 1.0;
     177          return;
     178        case c2:
     179          codeCoeff[fType2] = 1.0;
     180          return;
     181        case cIF:
     182          codeCoeff[fType1] =  f1 * f1 / (f1 * f1 - f2 * f2);
     183          codeCoeff[fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
     184          return;
     185        case t_lcRefSig::dummy:
     186          return;
     187      }
     188      return;
     189    }
     190  };
     191
    108192
    109193  void  processEpoch(char sys);
     
    134218  e_method                                   _method;
    135219  int                                        _cmbSampl;
     220  QString                                    _cmbRefAttributes;
    136221  QMap<QString, QMap<t_prn, t_orbCorr> >     _orbCorrections;
    137222  QMap<QString, QMap<t_prn, t_satCodeBias> > _satCodeBiases;
Note: See TracChangeset for help on using the changeset viewer.