Changeset 5398 in ntrip


Ignore:
Timestamp:
Sep 10, 2013, 1:57:41 PM (8 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/thrift/test_rtnet/rtnetThriftClient.cpp

    r5397 r5398  
    2121using namespace boost;
    2222
     23class t_stationCrd {
     24 public:
     25  double _x;
     26  double _y;
     27  double _z;
     28};
     29
     30map<string, t_stationCrd> _stationCrd;
     31
    2332// Handler Class Definition
    2433//////////////////////////////////////////////////////////////////////////////
     
    3342  void handleDDAmbresBaselines(const vector<DDAmbresBaseline>& ambList) {}
    3443  void handleSatelliteXYZ(const vector< SatelliteXYZ>& svXYZList);
    35   void handleStationInfo(const vector<StationInfo>& stationList) {}
     44  void handleStationInfo(const vector<StationInfo>& stationList);
    3645  void handleStationAuxInfo(const vector<StationAuxInfo>& stationAuxList) {}
    3746  void handleDGPSCorr(const vector<DGPSCorr>& dgpsList) {}
     
    119128}
    120129
     130// Handle Station Info
     131//////////////////////////////////////////////////////////////////////////////
     132void RtnetClientHandler::
     133handleStationInfo(const vector<StationInfo>& stationList) {
     134  for (unsigned ii = 0; ii < stationList.size(); ii++) {
     135    const StationInfo& staInfo = stationList[ii];
     136    if (_stationCrd.find(staInfo.ID) == _stationCrd.end()) {
     137      _stationCrd[staInfo.ID]._x = staInfo.xyz.x;
     138      _stationCrd[staInfo.ID]._y = staInfo.xyz.y;
     139      _stationCrd[staInfo.ID]._z = staInfo.xyz.z;
     140    }
     141  }
     142}
     143
    121144// Handle Eoch Results
    122145//////////////////////////////////////////////////////////////////////////////
     
    126149    const StationResults& staRes = epoch.stationResultList[ii];
    127150    cout << staRes.stationName << ' '
    128          << (int) staRes.nsv_gps_used << ' ' << (int) staRes.nsv_glonass_used << endl;
     151         << (int) staRes.nsv_gps_used << ' ' << (int) staRes.nsv_glonass_used << ' ';
     152    if (_stationCrd.find(staRes.stationName) != _stationCrd.end()) {
     153      cout << _stationCrd[staRes.stationName]._x << ' '
     154           << _stationCrd[staRes.stationName]._y << ' '
     155           << _stationCrd[staRes.stationName]._z;
     156    }
     157    cout << endl;
    129158  }
    130159}
Note: See TracChangeset for help on using the changeset viewer.