Changeset 2830 in ntrip
- Timestamp:
- Dec 25, 2010, 4:45:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/test_bnc_qt.cpp ¶
r2713 r2830 46 46 using namespace std; 47 47 48 class t_obsOld { 49 public: 50 int flags; 51 char StatID[20+1]; // Station ID 52 char satSys; // Satellite System ('G' or 'R') 53 int satNum; // Satellite Number (PRN for GPS NAVSTAR) 54 int slot; // Slot (Channel) Number (for Glonass) 55 int GPSWeek; // Week of GPS-Time 56 double GPSWeeks; // Second of Week (GPS-Time) 57 double C1; // CA-code pseudorange (meters) 58 double C2; // CA-code pseudorange (meters) 59 double P1; // P1-code pseudorange (meters) 60 double P2; // P2-code pseudorange (meters) 61 double L1; // L1 carrier phase (cycles) 62 double L2; // L2 carrier phase (cycles) 63 int slip_cnt_L1; // L1 cumulative loss of continuity indicator (negative value = undefined) 64 int slip_cnt_L2; // L2 cumulative loss of continuity indicator (negative value = undefined) 65 int lock_timei_L1; // L1 last lock time indicator (negative value = undefined) 66 int lock_timei_L2; // L2 last lock time indicator (negative value = undefined) 67 double S1; // L1 signal-to noise ratio 68 double S2; // L2 signal-to noise ratio 69 int SNR1; // L1 signal-to noise ratio (mapped to integer) 70 int SNR2; // L2 signal-to noise ratio (mapped to integer) 48 class t_obs { 49 public: 50 double L1() const {return (L1P != 0.0 ? L1P : L1C);} 51 double L2() const {return (L2P != 0.0 ? L2P : L2C);} 52 double S1() const {return (L1P != 0.0 ? S1P : S1C);} 53 double S2() const {return (L2P != 0.0 ? S2P : S2C);} 54 55 char StatID[20+1]; // Station ID 56 char satSys; // Satellite System ('G' or 'R') 57 int satNum; // Satellite Number (PRN for GPS NAVSTAR) 58 int slotNum; // Slot Number (for Glonass) 59 int GPSWeek; // Week of GPS-Time 60 double GPSWeeks; // Second of Week (GPS-Time) 61 62 double C1; // CA-code pseudorange (meters) 63 double P1; // P1-code pseudorange (meters) 64 double L1C; // L1 carrier phase (cycles) 65 double D1C; // Doppler L1 66 double S1C; // raw L1 signal strength 67 double L1P; // L1 carrier phase (cycles) 68 double D1P; // Doppler L1 69 double S1P; // raw L1 signal strength 70 71 double C2; // CA-code pseudorange (meters) 72 double P2; // P2-code pseudorange (meters) 73 double L2C; // L2 carrier phase (cycles) 74 double D2C; // Doppler L2 75 double S2C; // raw L2 signal strength 76 double L2P; // L2 carrier phase (cycles) 77 double D2P; // Doppler L2 78 double S2P; // raw L2 signal strength 79 80 double C5; // Pseudorange (meters) 81 double L5; // L5 carrier phase (cycles) 82 double D5; // Doppler L5 83 double S5; // raw L5 signal strength 84 85 int slip_cnt_L1; // L1 cumulative loss of continuity indicator (negative value = undefined) 86 int slip_cnt_L2; // L2 cumulative loss of continuity indicator (negative value = undefined) 87 int slip_cnt_L5; // L5 cumulative loss of continuity indicator (negative value = undefined) 71 88 }; 72 89 … … 143 160 // Interpret a portion of buffer as observation 144 161 // -------------------------------------------- 145 t_obs Old* obs;146 const int obsSize = sizeof(t_obs Old);162 t_obs* obs; 163 const int obsSize = sizeof(t_obs); 147 164 148 165 149 166 while (buffer.size() >= obsSize) { 150 167 151 obs = (t_obs Old*) (buffer.left(obsSize).data());168 obs = (t_obs*) (buffer.left(obsSize).data()); 152 169 153 170 cout << obs->StatID << " " … … 159 176 << setprecision(4) << obs->P1 << " " 160 177 << setprecision(4) << obs->P2 << " " 161 << setprecision(4) << obs->L1 178 << setprecision(4) << obs->L1() << " " 162 179 << obs->slip_cnt_L1 << " " 163 << setprecision(4) << obs->L2 180 << setprecision(4) << obs->L2() << " " 164 181 << obs->slip_cnt_L2 << " " 165 << setprecision(4) << obs->S1 166 << setprecision(4) << obs->S2 182 << setprecision(4) << obs->S1() << " " 183 << setprecision(4) << obs->S2() << endl; 167 184 168 185 buffer.remove(0,obsSize);
Note:
See TracChangeset
for help on using the changeset viewer.