Changeset 5495 in ntrip


Ignore:
Timestamp:
Sep 23, 2013, 9:25:33 AM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/monitor/thriftclient.cpp

    r5486 r5495  
    1717
    1818using namespace GnssCenter;
     19
     20// Auxiliary Function
     21//////////////////////////////////////////////////////////////////////////////
     22string id2prn(ConstellationType::type constellation, int ID) {
     23  char ch;
     24  switch(constellation) {
     25    case (ConstellationType::GPS):     ch =  'G'; break;
     26    case (ConstellationType::GLONASS): ch =  'R'; break;
     27    case (ConstellationType::SBAS):    ch =  'S'; break;
     28    case (ConstellationType::GALILEO): ch =  'E'; break;
     29    case (ConstellationType::QZSS):    ch =  'J'; break;
     30    case (ConstellationType::COMPASS): ch =  'C'; break;
     31    default: return "";
     32  }
     33  char prn[3];
     34  sprintf(prn, "%c%2.2d", ch, ID);
     35  return string(prn);
     36}
    1937
    2038// Constructor
     
    84102    const SatelliteXYZ& sat = svXYZList[ii];
    85103    t_thriftSatellite* satellite = new t_thriftSatellite;
    86     char ch;
    87     switch(sat.constellation) {
    88       case (ConstellationType::GPS):     ch = 'G'; break;
    89       case (ConstellationType::GLONASS): ch = 'R'; break;
    90       case (ConstellationType::SBAS):    ch = 'S'; break;
    91       case (ConstellationType::GALILEO): ch = 'E'; break;
    92       case (ConstellationType::QZSS):    ch = 'J'; break;
    93       case (ConstellationType::COMPASS): ch = 'C'; break;
    94     }
    95     char prn[3];
    96     sprintf(prn, "%c%2.2d", ch, sat.ID);
    97     satellite->_prn = prn;
     104    satellite->_prn = id2prn(sat.constellation, sat.ID);
    98105    satellite->_x   = sat.xyz.x;
    99106    satellite->_y   = sat.xyz.y;
     
    123130  for (unsigned ii = 0; ii < epoch.stationResultList.size(); ii++) {
    124131    const StationResults& staRes = epoch.stationResultList[ii];
     132
     133    for (unsigned is = 0; is < staRes.svPosList.size(); is++) {
     134      const SatelliteEleAzi& sat = staRes.svPosList[is];
     135      string prn = id2prn(sat.constellation, sat.ID);
     136    }
     137
    125138    t_thriftResult* res = new t_thriftResult;
    126139    res->_name = staRes.stationName;
Note: See TracChangeset for help on using the changeset viewer.