Changeset 3308 in ntrip
- Timestamp:
- Jun 21, 2011, 6:10:42 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r3307 r3308 919 919 // Outlier Detection 920 920 //////////////////////////////////////////////////////////////////////////// 921 int bncModel::outlierDetection( const SymmetricMatrix& QQsav,921 int bncModel::outlierDetection(int phase, const SymmetricMatrix& QQsav, 922 922 const ColumnVector& vv, 923 923 QMap<QString, t_satData*>& satDataGPS, … … 935 935 int irc = 0; 936 936 937 // Check GPS Code 938 // -------------- 939 if (irc == 0) { 940 findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase); 941 if (maxResCode > MAXRES_CODE_GPS) { 942 satDataGPS.remove(prnCode); 943 prnRemoved = prnCode; 944 maxRes = maxResCode; 945 irc = 1; 946 } 947 } 948 949 // Check Galileo Code 950 // ------------------ 951 if (irc == 0) { 952 findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase); 953 if (maxResCode > MAXRES_CODE_GAL) { 954 satDataGal.remove(prnCode); 955 prnRemoved = prnCode; 956 maxRes = maxResCode; 957 irc = 1; 958 } 959 } 960 961 // Check Glonass Phase 962 // ------------------- 963 if (irc == 0) { 964 findMaxRes(vv,satDataGlo, prnCode, maxResCode, prnPhase, maxResPhase); 965 if (maxResPhase > MAXRES_PHASE_GLO) { 966 satDataGlo.remove(prnPhase); 967 prnRemoved = prnPhase; 968 maxRes = maxResPhase; 969 irc = 1; 970 } 971 } 972 973 // Check Galileo Phase 974 // ------------------- 975 if (irc == 0) { 976 findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase); 977 if (maxResPhase > MAXRES_PHASE_GAL) { 978 satDataGal.remove(prnPhase); 979 prnRemoved = prnPhase; 980 maxRes = maxResPhase; 981 irc = 1; 982 } 983 } 984 985 // Check GPS Phase 986 // --------------- 987 if (irc == 0) { 988 findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase); 989 if (maxResPhase > MAXRES_PHASE_GPS) { 990 satDataGPS.remove(prnPhase); 991 prnRemoved = prnPhase; 992 maxRes = maxResPhase; 993 irc = 1; 937 if (phase == 0) { 938 939 // Check GPS Code 940 // -------------- 941 if (irc == 0) { 942 findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase); 943 if (maxResCode > MAXRES_CODE_GPS) { 944 satDataGPS.remove(prnCode); 945 prnRemoved = prnCode; 946 maxRes = maxResCode; 947 irc = 1; 948 } 949 } 950 951 // Check Galileo Code 952 // ------------------ 953 if (irc == 0) { 954 findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase); 955 if (maxResCode > MAXRES_CODE_GAL) { 956 satDataGal.remove(prnCode); 957 prnRemoved = prnCode; 958 maxRes = maxResCode; 959 irc = 1; 960 } 961 } 962 } 963 964 else { 965 // Check Glonass Phase 966 // ------------------- 967 if (irc == 0) { 968 findMaxRes(vv,satDataGlo, prnCode, maxResCode, prnPhase, maxResPhase); 969 if (maxResPhase > MAXRES_PHASE_GLO) { 970 satDataGlo.remove(prnPhase); 971 prnRemoved = prnPhase; 972 maxRes = maxResPhase; 973 irc = 1; 974 } 975 } 976 977 // Check Galileo Phase 978 // ------------------- 979 if (irc == 0) { 980 findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase); 981 if (maxResPhase > MAXRES_PHASE_GAL) { 982 satDataGal.remove(prnPhase); 983 prnRemoved = prnPhase; 984 maxRes = maxResPhase; 985 irc = 1; 986 } 987 } 988 989 // Check GPS Phase 990 // --------------- 991 if (irc == 0) { 992 findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase); 993 if (maxResPhase > MAXRES_PHASE_GPS) { 994 satDataGPS.remove(prnPhase); 995 prnRemoved = prnPhase; 996 maxRes = maxResPhase; 997 irc = 1; 998 } 994 999 } 995 1000 } … … 1212 1217 // 1213 1218 /////////////////////////////////////////////////////////////////////////// 1214 void bncModel::printRes( const ColumnVector& vv,1219 void bncModel::printRes(int phase, const ColumnVector& vv, 1215 1220 ostringstream& str, t_satData* satData) { 1216 if ( satData->indexPhase) {1221 if (phase) { 1217 1222 str << _time.timestr(1) 1218 1223 << " RES " << satData->prn.toAscii().data() << " L3 " 1219 1224 << setw(9) << setprecision(4) << vv(satData->indexPhase) << endl; 1220 1225 } 1221 if (satData->indexCode){1226 else { 1222 1227 str << _time.timestr(1) 1223 1228 << " RES " << satData->prn.toAscii().data() << " P3 " … … 1261 1266 ColumnVector vv; 1262 1267 1263 for (int iPhase = 0; iPhase <= 1; iPhase++) {1268 for (int iPhase = 0; iPhase <= (_usePhase ? 1 : 0); iPhase++) { 1264 1269 1265 1270 do { … … 1273 1278 return failure; 1274 1279 } 1280 } 1275 1281 1276 // Status Prediction 1277 // ----------------- 1278 predict(epoData); 1279 } 1282 // Status Prediction 1283 // ----------------- 1284 predict(epoData); 1280 1285 1281 1286 // Create First-Design Matrix … … 1283 1288 unsigned nPar = _params.size(); 1284 1289 unsigned nObs = 0; 1285 nObs = epoData->sizeGPS() + epoData->sizeGal(); // Glonass code not used 1290 if (iPhase == 0) { 1291 nObs = epoData->sizeGPS() + epoData->sizeGal(); // Glonass code not used 1292 } 1293 else { 1294 nObs = epoData->sizeGPS() + epoData->sizeGal() + epoData->sizeGlo(); 1295 } 1286 1296 1287 1297 Matrix AA(nObs, nPar); // first design matrix … … 1300 1310 } 1301 1311 1312 // Glonass 1313 // ------- 1314 if (iPhase == 1) { 1315 QMapIterator<QString, t_satData*> itGlo(epoData->satDataGlo); 1316 while (itGlo.hasNext()) { 1317 itGlo.next(); 1318 t_satData* satData = itGlo.value(); 1319 addObs(iPhase, iObs, satData, AA, ll, PP); 1320 } 1321 } 1322 1302 1323 // Galileo 1303 1324 // ------- … … 1316 1337 1317 1338 vv = ll - AA * dx; 1318 1339 1319 1340 // Print Residuals 1320 1341 // --------------- … … 1327 1348 itGPS.next(); 1328 1349 t_satData* satData = itGPS.value(); 1329 printRes(vv, str, satData); 1330 } 1331 QMapIterator<QString, t_satData*> itGlo(epoData->satDataGlo); 1332 while (itGlo.hasNext()) { 1333 itGlo.next(); 1334 t_satData* satData = itGlo.value(); 1335 printRes(vv, str, satData); 1350 printRes(iPhase, vv, str, satData); 1351 } 1352 if (iPhase == 1) { 1353 QMapIterator<QString, t_satData*> itGlo(epoData->satDataGlo); 1354 while (itGlo.hasNext()) { 1355 itGlo.next(); 1356 t_satData* satData = itGlo.value(); 1357 printRes(iPhase, vv, str, satData); 1358 } 1336 1359 } 1337 1360 QMapIterator<QString, t_satData*> itGal(epoData->satDataGal); … … 1339 1362 itGal.next(); 1340 1363 t_satData* satData = itGal.value(); 1341 printRes( vv, str, satData);1364 printRes(iPhase, vv, str, satData); 1342 1365 } 1343 1366 _log += str.str().c_str(); 1344 1367 } 1345 1368 1346 } while (outlierDetection( QQsav, vv, epoData->satDataGPS,1369 } while (outlierDetection(iPhase, QQsav, vv, epoData->satDataGPS, 1347 1370 epoData->satDataGlo, epoData->satDataGal) != 0); 1348 1371 } -
trunk/BNC/bncmodel.h
r3307 r3308 98 98 void addObs(int phase, unsigned& iObs, t_satData* satData, 99 99 Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP); 100 void printRes( const ColumnVector& vv,100 void printRes(int phase, const ColumnVector& vv, 101 101 std::ostringstream& str, t_satData* satData); 102 102 void findMaxRes(const ColumnVector& vv, … … 108 108 void predict(t_epoData* epoData); 109 109 t_irc update_p(t_epoData* epoData, ColumnVector& dx); 110 int outlierDetection( const SymmetricMatrix& QQsav,110 int outlierDetection(int phase, const SymmetricMatrix& QQsav, 111 111 const ColumnVector& vv, 112 112 QMap<QString, t_satData*>& satDataGPS, -
trunk/BNC/ppp.gpt
r3139 r3308 25 25 26 26 set ylabel "meters" 27 set yrange [- 0.5:0.5]27 set yrange [-1.0:1.0] 28 28 29 29 set ytics nomirror
Note:
See TracChangeset
for help on using the changeset viewer.