Changeset 11019 in ntrip for trunk/BNC/src/pppCrdFile.cpp


Ignore:
Timestamp:
Sep 10, 2026, 3:45:13 PM (2 hours ago)
Author:
stuerze
Message:

added epoch/velocity fields to PPP coordinates file to allow BNC to propagate the reference coordinates related to a dedicated reference epoch to the current epoch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/pppCrdFile.cpp

    r7850 r11019  
    4040 * -----------------------------------------------------------------------*/
    4141
     42#include <cstdlib>
    4243#include <fstream>
    4344#include <sstream>
     
    8283    in >> staInfo._xyz(1) >> staInfo._xyz(2) >> staInfo._xyz(3);
    8384
     85    // Optional 'EPOCH:<decimalYear>' and 'VEL:<vx>,<vy>,<vz>' keyword tokens
     86    // (ITRF reference epoch and velocity in m/year of the coordinate above),
     87    // may appear in any order before the antenna eccentricity / name fields.
     88    while (!in.eof()) {
     89      streampos posBeforeToken = in.tellg();
     90      string token;
     91      if (!(in >> token)) {
     92        break;
     93      }
     94      if (token.compare(0, 6, "EPOCH:") == 0) {
     95        staInfo._epoch = atof(token.substr(6).c_str());
     96      }
     97      else if (token.compare(0, 4, "VEL:") == 0) {
     98        string velStr = token.substr(4);
     99        for (string::iterator it = velStr.begin(); it != velStr.end(); ++it) {
     100          if (*it == ',') *it = ' ';
     101        }
     102        istringstream velIn(velStr);
     103        velIn >> staInfo._velocity(1) >> staInfo._velocity(2) >> staInfo._velocity(3);
     104      }
     105      else {
     106        in.seekg(posBeforeToken);
     107        break;
     108      }
     109    }
     110
    84111    if (!in.eof()) {
    85112      in >> staInfo._neuAnt(1) >> staInfo._neuAnt(2) >> staInfo._neuAnt(3);
Note: See TracChangeset for help on using the changeset viewer.