Changeset 11216 in ntrip for trunk/BNC/src/bncephuser.h


Ignore:
Timestamp:
Nov 20, 2026, 4:14:37 PM (less than one hour ago)
Author:
stuerze
Message:

Upload Ephemeris: majority vote approach improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncephuser.h

    r11215 r11216  
    4545  void slotNewBDSEph(t_ephBDS);
    4646
     47 private slots:
     48  void slotVoteTimer();
     49
    4750 public:
    4851  bncEphUser(bool connectSlots, unsigned maxQueueSize = 6);
    … …  
    5356  // Majority vote over the copies of a data set received from different streams
    5457  // (real-time input only, used for the ephemeris upload): the first copy is
    55   // accepted immediately; a copy with different content (RTCM3 encoding without
     58  // buffered immediately; a copy with different content (RTCM3 encoding without
    5659  // the GLONASS frame time tk and the system time offsets tau_c, tau_GPS) replaces it as soon as more streams deliver it
    5760  // than the current one, i.e. with at least three streams.
    58   void enableVoting() {_voting = true;}
     61  // A new data set is held back from the upload (ephUpload() returns the
     62  // previous one) until three streams deliver the same content or VOTE_HOLD
     63  // seconds (GPS time) have passed since its first copy; no hold if fewer than
     64  // three streams delivered the previous data set or there is none. The hold
     65  // is checked with each ephemeris received and in real time every second, so
     66  // that a held data set is also uploaded when no further ephemeris arrives.
     67  void enableVoting();
     68
     69  // data set to be uploaded: the latest one, or the previous one while the
     70  // latest is held back by the vote
     71  t_eph* ephUpload(const QString& prn);
    5972
    6073  // Real-time input restricted to the ephemerides of the streams given in the
    … …  
    110123    QMap<QString, int>   _station;  // stream -> variant of its latest copy
    111124    int                  _current = 0;  // variant in the buffer
     125    bncTime              _first;        // first copy received (GPS time)
     126    bool                 _released = true;  // may be uploaded
    112127  };
     128  static const double VOTE_HOLD;    // maximum hold of a new data set [s]
     129  static const int    VOTE_AGREE;   // streams releasing a new data set
     130  static bncTime currentTime();
     131  void   releaseHeld();
    113132  static t_eph*     clone(const t_eph* eph);
    114133  static QByteArray votingContent(const t_eph* eph);
Note: See TracChangeset for help on using the changeset viewer.