Changeset 2829 in ntrip
- Timestamp:
- Dec 25, 2010, 2:30:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/bnccaster.cpp ¶
r2828 r2829 50 50 #include "RTCM/GPSDecoder.h" 51 51 52 #define OLD_OBS_FORMAT 053 54 class t_oldObsInternal {55 public:56 57 t_oldObsInternal(const t_obs& obs) {58 strcpy(StatID, obs.StatID);59 flags = 0;60 satSys = obs.satSys;61 satNum = obs.satNum;62 slot = obs.slotNum;63 GPSWeek = obs.GPSWeek;64 GPSWeeks = obs.GPSWeeks;65 C1 = obs.C1;66 C2 = obs.C2;67 P1 = obs.P1;68 P2 = obs.P2;69 L1 = obs.L1();70 L2 = obs.L2();71 slip_cnt_L1 = obs.slip_cnt_L1;72 slip_cnt_L2 = obs.slip_cnt_L2;73 lock_timei_L1 = -1;74 lock_timei_L2 = -1;75 S1 = obs.S1();76 S2 = obs.S2();77 SNR1 = 0;78 SNR2 = 0;79 }80 int flags;81 char StatID[20+1]; // Station ID82 char satSys; // Satellite System ('G' or 'R')83 int satNum; // Satellite Number (PRN for GPS NAVSTAR)84 int slot; // Slot Number (for Glonass)85 int GPSWeek; // Week of GPS-Time86 double GPSWeeks; // Second of Week (GPS-Time)87 double C1; // CA-code pseudorange (meters)88 double C2; // CA-code pseudorange (meters)89 double P1; // P1-code pseudorange (meters)90 double P2; // P2-code pseudorange (meters)91 double L1; // L1 carrier phase (cycles)92 double L2; // L2 carrier phase (cycles)93 int slip_cnt_L1; // L1 cumulative loss of continuity indicator (negative$94 int slip_cnt_L2; // L2 cumulative loss of continuity indicator (negative$95 int lock_timei_L1; // L1 last lock time indicator (negative$96 int lock_timei_L2; // L2 last lock time indicator (negative$97 double S1; // L1 signal-to noise ratio98 double S2; // L2 signal-to noise ratio99 int SNR1; // L1 signal-to noise ratio (mapped to integer)100 int SNR2; // L2 signal-to noise ratio (mapped to integer)101 };102 103 52 // Constructor 104 53 //////////////////////////////////////////////////////////////////////////// … … 228 177 ok = false; 229 178 } 230 if (OLD_OBS_FORMAT) { 231 t_oldObsInternal oldObs(obs); 232 int numBytes = sizeof(oldObs); 233 if (myWrite(sock, (const char*)(&oldObs), numBytes) != numBytes) { 234 ok = false; 235 } 236 } 237 else { 238 int numBytes = sizeof(obs); 239 if (myWrite(sock, (const char*)(&obs), numBytes) != numBytes) { 240 ok = false; 241 } 179 int numBytes = sizeof(obs); 180 if (myWrite(sock, (const char*)(&obs), numBytes) != numBytes) { 181 ok = false; 242 182 } 243 183 if (!ok) { … … 421 361 } 422 362 } 423 if (OLD_OBS_FORMAT) { 424 t_oldObsInternal oldObs(obs); 425 int numBytes = sizeof(oldObs); 426 if (myWrite(sock, (const char*)(&oldObs), numBytes) != numBytes) { 427 ok = false; 428 } 429 } 430 else { 431 int numBytes = sizeof(obs); 432 if (myWrite(sock, (const char*)(&obs), numBytes) != numBytes) { 433 ok = false; 434 } 363 int numBytes = sizeof(obs); 364 if (myWrite(sock, (const char*)(&obs), numBytes) != numBytes) { 365 ok = false; 435 366 } 436 367 if (!it.hasNext()) {
Note:
See TracChangeset
for help on using the changeset viewer.