Changeset 9386 in ntrip for trunk/BNC/src/PPP/pppObsPool.h


Ignore:
Timestamp:
Mar 25, 2021, 3:17:35 PM (3 years ago)
Author:
stuerze
Message:

update regarding PPP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppObsPool.h

    r8956 r9386  
    55#include <deque>
    66#include <QMap>
     7#include <iostream>
    78#include "pppSatObs.h"
    89#include "bnctime.h"
     
    5758  }
    5859
    59   void initRefSatMapElement(char system) {
    60     _refSatMap[system] = new t_pppRefSat();
    61   }
     60  // RefSatMap of the current epoch
     61  // ==============================
     62  void initRefSatMapElement(char system) {_refSatMap[system] = new t_pppRefSat();}
    6263  void clearRefSatMap() {
    6364    QMapIterator<char, t_pppRefSat*> it(_refSatMap);
     
    6869    _refSatMap.clear();
    6970  }
    70   t_pppRefSat* getRefSatMapElement(char system) {
    71     return _refSatMap[system];
     71  QMap<char, t_pppRefSat*> getRefSatMap() {return _refSatMap;}
     72  t_pppRefSat* getRefSatMapElement(char sys) {return _refSatMap[sys];}
     73
     74
     75  // RefSatMap of the last epoch
     76  // ===========================
     77  QMap<char, t_prn> getRefSatMapLastEpoch() {return _refSatMapLastEpoch;}
     78  t_prn getRefSatMapElementLastEpoch(char sys) {return _refSatMapLastEpoch[sys];}
     79  void setRefSatMapElementLastEpoch(char sys, t_prn prn) {_refSatMapLastEpoch[sys] = prn;}
     80  void saveLastEpoRefSats() {
     81    QMapIterator<char, t_pppRefSat*> it(getRefSatMap());
     82    while (it.hasNext()) {
     83      it.next();
     84      t_prn prn = it.value()->prn();
     85      setRefSatMapElementLastEpoch(prn.system(), prn);
     86    };
    7287  }
    73   QMap<char, t_pppRefSat*> getRefSatMap() {return _refSatMap;}
    7488
    75   void setRefSatChangeRequired(bool refSatChangeRequired) {
    76     _refSatChangeRequired = refSatChangeRequired;
     89  // RefSat change required in current epoch
     90  // =======================================
     91  void setRefSatChangeRequired(char sys, bool refSatChangeRequired) {
     92    _refSatChangeRequiredMap[sys] = refSatChangeRequired;
    7793  }
    78   bool refSatChangeRequired() {return _refSatChangeRequired;}
     94  bool refSatChangeRequired() {
     95    QMapIterator<char, bool> it(_refSatChangeRequiredMap);
     96      while (it.hasNext()) {
     97        it.next();
     98        if (it.value() == true) {
     99          return true;
     100        }
     101      }
     102    return false;
     103  }
     104  bool refSatChangeRequired(char sys) {
     105    return _refSatChangeRequiredMap[sys];
     106  }
    79107
    80   void setHistoricalRefSatList(QList<t_prn>& historicalRefSats) {_historicalRefSats = historicalRefSats;}
    81 
    82   bool hasHistoricalRefSat(t_prn prn) {return _historicalRefSats.contains(prn);}
     108  // RefSat changed in current epoch (different from last epoch)
     109  // ===========================================================
     110  void setRefSatChanged(char sys, bool refSatChanged) {
     111    _refSatChangedMap[sys] = refSatChanged;
     112  }
     113  bool refSatChanged() {
     114    QMapIterator<char, bool> it(_refSatChangedMap);
     115      while (it.hasNext()) {
     116        it.next();
     117        if (it.value() == true) {
     118          return true;
     119        }
     120      }
     121    return false;
     122  }
     123  bool refSatChanged(char sys) {
     124    return _refSatChangedMap[sys];
     125  }
    83126
    84127 private:
     
    88131  std::deque<t_epoch*>     _epochs;
    89132  QMap<char, t_pppRefSat*> _refSatMap;
    90   bool                     _refSatChangeRequired;
    91   QList<t_prn>             _historicalRefSats;
     133  QMap<char, bool>         _refSatChangeRequiredMap;
     134  QMap<char, bool>         _refSatChangedMap;
     135  QMap<char, t_prn>        _refSatMapLastEpoch;
    92136};
    93137
Note: See TracChangeset for help on using the changeset viewer.