Changeset 6137 in ntrip for trunk/BNC/src/rinex/rnxobsfile.cpp
- Timestamp:
- Sep 13, 2014, 12:19:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxobsfile.cpp
r6130 r6137 1038 1038 // Set Observations from RINEX File 1039 1039 //////////////////////////////////////////////////////////////////////////// 1040 void t_rnxObsFile::setObsFromRnx(const t_rnxObsFile* rnxObsFile, 1041 const t_rnxObsFile::t_rnxEpo* epo, 1042 const t_rnxObsFile::t_rnxSat& rnxSat, 1043 t_obs& obs) { 1044 1045 strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(), sizeof(obs.StatID)); 1046 1047 obs.satSys = rnxSat.prn.system(); 1048 obs.satNum = rnxSat.prn.number(); 1049 obs.GPSWeek = epo->tt.gpsw(); 1050 obs.GPSWeeks = epo->tt.gpssec(); 1051 1052 for (int iType = 0; iType < rnxObsFile->nTypes(obs.satSys); iType++) { 1053 QString type = rnxObsFile->obsType(obs.satSys, iType); 1040 void t_rnxObsFile::setObsFromRnx(const t_rnxObsFile* rnxObsFile, const t_rnxObsFile::t_rnxEpo* epo, 1041 const t_rnxObsFile::t_rnxSat& rnxSat, t_satObs& obs) { 1042 1043 obs._staID = rnxObsFile->markerName().toAscii().constData(); 1044 obs._prn = rnxSat.prn; 1045 obs._time = epo->tt; 1046 1047 char sys = rnxSat.prn.system(); 1048 1049 for (int iType = 0; iType < rnxObsFile->nTypes(sys); iType++) { 1050 QString type = rnxObsFile->obsType(sys, iType); 1054 1051 if (rnxSat.obs.contains(type)) { 1055 1052 const t_rnxObs& rnxObs = rnxSat.obs[type]; 1056 obs.setMeasdata(type, rnxObsFile->version(), rnxObs.value); 1057 if (type.indexOf("L1") == 0) { 1058 obs.snrL1 = rnxObs.snr; 1059 obs.slipL1 = (rnxObs.lli & 1); 1060 } 1061 else if (type.indexOf("L2") == 0) { 1062 obs.snrL2 = rnxObs.snr; 1063 obs.slipL2 = (rnxObs.lli & 1); 1064 } 1065 else if (type.indexOf("L5") == 0) { 1066 obs.snrL5 = rnxObs.snr; 1067 obs.slipL5 = (rnxObs.lli & 1); 1068 } 1069 } 1070 } 1071 } 1072 1053 string type2ch(type.mid(1).toAscii().data()); 1054 1055 1056 t_frqObs* frqObs = 0; 1057 for (unsigned iFrq = 0; iFrq < obs._obs.size(); iFrq++) { 1058 if (obs._obs[iFrq]->_rnxType2ch == type2ch) { 1059 frqObs = obs._obs[iFrq]; 1060 break; 1061 } 1062 } 1063 if (frqObs == 0) { 1064 frqObs = new t_frqObs; 1065 frqObs->_rnxType2ch = type2ch; 1066 obs._obs.push_back(frqObs); 1067 } 1068 1069 switch( type.toAscii().data()[0] ) { 1070 case 'C': 1071 frqObs->_codeValid = true; 1072 frqObs->_code = rnxObs.value; 1073 break; 1074 case 'L': 1075 frqObs->_phaseValid = true; 1076 frqObs->_phase = rnxObs.value; 1077 frqObs->_slip = (rnxObs.lli & 1); 1078 break; 1079 case 'D': 1080 frqObs->_dopplerValid = true; 1081 frqObs->_doppler = rnxObs.value; 1082 break; 1083 case 'S': 1084 frqObs->_snrValid = true; 1085 frqObs->_snr = rnxObs.value; 1086 break; 1087 } 1088 } 1089 } 1090 } 1091
Note:
See TracChangeset
for help on using the changeset viewer.