61 const string gdc::GDCVersion = string(
"9.0 5/20/17");
66 const unsigned gdc::OK = 0;
67 const unsigned gdc::BAD = 1;
68 const unsigned gdc::WLOUTLIER = 2;
69 const unsigned gdc::GFOUTLIER = 3;
70 const unsigned gdc::WLSHORT = 4;
71 const unsigned gdc::GFSHORT = 5;
72 const unsigned gdc::ISOLATED =
76 const unsigned Arc::BEG = 1;
77 const unsigned Arc::WLSLIP = 2;
78 const unsigned Arc::GFSLIP = 4;
79 const unsigned Arc::WLFIX = 8;
80 const unsigned Arc::GFFIX = 16;
81 const unsigned Arc::WLMARK = 32;
82 const unsigned Arc::GFMARK = 64;
83 const unsigned Arc::REJ = 128;
87 const unsigned gdc::WL = 0;
88 const unsigned gdc::GF = 1;
89 const vector<unsigned> gdc::SLIP = gdc::create_vector_SLIP();
90 const vector<unsigned> gdc::FIX = gdc::create_vector_FIX();
91 const vector<string> gdc::LAB = gdc::create_vector_LAB();
94 const map<unsigned, string> Arc::markStr = Arc::create_mark_string_map();
97 #define cfg(a) cfg_func(#a) // #a 'string-izes' a "a"
145 std::vector<std::string>& cmds,
int GLOn)
150 isGLO = (sat.system == SatelliteSystem::Glonass);
153 if (isGLO && GLOchan == -99)
158 " Error - unable to compute GLO channel - fail: " + retMsg;
161 LOG(
VERBOSE) <<
"# Compute GLO channel = " << GLOchan <<
" "
167 string L1(
"L1"),
L2(
"L2"),
P1(
"P1"),
P2(
"P2");
182 vector<double> L1_in, L2_in, P1_in, P2_in, dt_in;
183 vector<int> flags_in;
186 for (
unsigned int i = 0; i < SP.
size(); i++)
190 dt_in.push_back(SP.
time(i) - beg);
194 if (!(SP.
spdvector[i].flag & SatPass::OK) ||
198 flags_in.push_back(0);
199 L1_in.push_back(0.0);
200 L2_in.push_back(0.0);
201 P1_in.push_back(0.0);
202 P2_in.push_back(0.0);
207 flags_in.push_back(1);
208 L1_in.push_back(SP.
data(i,
L1));
209 L2_in.push_back(SP.
data(i,
L2));
210 P1_in.push_back(SP.
data(i,
P1));
211 P2_in.push_back(SP.
data(i,
P2));
217 oss <<
"GDC " << setw(3) << unique + 1 <<
" SPS " << SP;
222 P1_in, P2_in, dt_in, flags_in,
223 retMsg, cmds, GLOchan, outfmt);
232 applyFixesToSatPass(SP);
247 const RinexSatID& sat_in,
const double& nominalDT,
const Epoch& beginTime,
248 std::vector<double> dataL1, std::vector<double> dataL2,
249 std::vector<double> dataP1, std::vector<double> dataP2,
250 std::vector<double> dt_in, std::vector<int> flags_in, std::string& retMsg,
251 std::vector<std::string>& cmds,
int GLOn, std::string outfmt_in)
266 isGLO = (sat.system == SatelliteSystem::Glonass);
268 if (isGLO && GLOchan == -99)
284 Arc arc(0, 0, 0, Arc::BEG);
294 for (i = 0; i < dt_in.size(); i++)
297 xdata.push_back(dt_in[i]);
301 if (!(flags_in[i] & SatPass::OK) || dataL1[i] == 0.0 ||
302 dataL2[i] == 0.0 || dataP1[i] == 0.0 || dataP2[i] == 0.0)
304 flags.push_back(BAD);
305 dataWL.push_back(0.0);
306 dataGF.push_back(0.0);
317 (
beta * dataP1[i] + dataP2[i]) / (
beta + 1.0)) /
323 dataWL.push_back(d - WLbias);
326 d = (
wl1 * dataL1[i] -
wl2 * dataL2[i]) / wlGF;
331 dataGF.push_back(d - GFbias);
336 N1bias =
static_cast<long long>(dataP1[i] /
wl1 - dataL1[i]);
337 N2bias =
static_cast<long long>(dataP2[i] /
wl2 - dataL2[i]);
344 arc.
npts = xdata.size();
345 Arcs[arc.
index] = arc;
351 oss <<
"GDC " << setw(3) << unique;
358 oss << tag <<
" SPS " << setw(4) << arc.
npts
359 <<
" " << sat <<
" " << setw(4) << arc.
ngood
362 <<
" " << setprecision(1) << fixed << dt <<
" L1 L2 P1 P2";
371 dumpData(
LOGstrm, tag +
" RAW");
375 if (flags.size() < 2 *
cfg(width))
377 for (i = 0; i < flags.size(); i++)
385 <<
" Pass is too short to analyze: " << flags.size()
386 <<
" < 2 * window width = " << 2 *
cfg(width);
392 iret = ProcessOneCombo(WL);
399 iret = ProcessOneCombo(GF);
418 retMsg = returnMessage();
419 if (cfg_func(
"verbose"))
421 DumpArcs(
"#" + tag +
" FIN",
"");
444 int gdc::ProcessOneCombo(
const unsigned which)
453 iret = GrossProcessing(which);
463 iret = FineProcessing(which);
483 int gdc::GrossProcessing(
const unsigned which)
487 int i, nslips(0), iret;
490 vector<FilterHit<double>> filterResults;
494 label = LAB[which] +
"1";
495 limit = cfg_func(LAB[which] +
"grossStep");
496 iret = filterFirstDiff(which, label, limit, filterResults);
504 if (cfg_func(
"debug") > -1)
506 DumpHits(filterResults,
"#" + tag, label, 2);
511 i = mergeFilterResultsIntoArcs(filterResults, which);
521 DumpArcs(
"#" + tag, label, 2);
534 label = LAB[which] +
"G";
537 dumpData(
LOGstrm, tag +
" " + label);
552 int gdc::FineProcessing(
const unsigned which)
556 int i, nslips(0), iret;
559 vector<FilterHit<double>> filterResults;
561 label = LAB[which] +
"W";
562 limit = cfg_func(LAB[which] +
"fineStep");
563 iret = filterWindow(which, label, limit, filterResults);
573 if (cfg_func(
"debug") > -1)
575 DumpHits(filterResults,
"#" + tag, label, 2);
579 i = mergeFilterResultsIntoArcs(filterResults, which);
596 DumpArcs(
"#" + tag, label, 2);
600 label = LAB[which] +
"F";
603 dumpData(
LOGstrm, tag +
" " + label);
621 int gdc::filterFirstDiff(
const unsigned which,
const string label,
644 for (
int i = 0; i < fdf.
results.size(); i++)
673 int gdc::filterWindow(
const unsigned which,
const string label,
693 LOG(
ERROR) <<
" Call to GF window filter without time data!";
695 Exception(
"Call to GF window filter without time data"));
697 else if (iret == -1 || iret == -3)
706 for (
int i = 0; i < wf.
results.size(); i++)
737 catch (std::exception& e)
739 LOG(
ERROR) <<
"std exception " << e.what();
756 const unsigned which)
761 if (Arcs.size() == 0)
765 if (hits.size() == 0)
772 unsigned int minpts(
cfg(MinPts));
773 double lostslip(0.0);
776 for (i = 0; i < hits.size(); i++)
778 LOG(
DEBUG) <<
"#" << tag <<
" merge " << LAB[which]
779 <<
" hit into Arc[" << hits[i].index <<
"] "
780 << hits[i].asString();
790 unsigned int flag = (which == WL ? WLOUTLIER : GFOUTLIER);
792 flagBadData(hits[i], flag);
804 if (hits[i].ngood < minpts)
807 flagBadData(hits[i], (which == WL ? WLSHORT : GFSHORT));
811 lostslip += hits[i].step;
817 map<int, Arc>::iterator ait = Arcs.begin();
818 findArc(hits[i].index, ait);
821 if (hits[i].index == ait->second.index)
824 if (ait->second.mark & SLIP[which])
826 if (ait->second.mark & FIX[which])
830 ait->second.mark ^= FIX[which];
836 "Already marked but unfixed should not happen"));
841 ait->second.mark |= SLIP[which];
850 if (addArc(hits[i].index, SLIP[which]))
859 (which == WL ? Arcs[hits[i].index].WLinfo.step
860 : Arcs[hits[i].index].GFinfo.step) =
861 lostslip + hits[i].step;
862 (which == WL ? Arcs[hits[i].index].WLinfo.sigma
863 : Arcs[hits[i].index].GFinfo.sigma) =
864 lostslip + hits[i].sigma;
900 flags[i] = flagvalue;
913 bool gdc::addArc(
const int index,
const unsigned mark)
916 map<int, Arc>::iterator ait = Arcs.begin();
923 B.
npts = ait->second.npts - (index - ait->second.index);
931 ait->second.
npts = index - ait->second.index;
932 ait->second.ngood = 0;
946 void gdc::fixUpArcs()
950 map<int, Arc>::iterator ait;
957 map<int, Arc> oldArcs(Arcs);
959 for (ait = oldArcs.begin(); ait != oldArcs.end(); ++ait)
960 Arcs[ait->second.index] = ait->second;
971 void gdc::recomputeArcs()
975 map<int, Arc>::iterator ait, cit;
978 cit = ait = Arcs.begin();
979 while (++cit != Arcs.end())
981 ait->second.npts = cit->second.index - ait->second.index;
984 ait->second.npts = xdata.size() - ait->second.index;
987 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
989 computeNgood(ait->second);
1006 void gdc::getArcStats(map<int, Arc>::iterator& ait,
const unsigned which)
1011 bool isWL(which == WL);
1013 map<int, Arc>::iterator cit(ait);
1023 i = index = cit->second.index;
1024 npts = cit->second.npts;
1027 while (cit != Arcs.end() && i < xdata.size())
1031 if (flags[i] ==
OK || cit->second.mark == Arc::REJ)
1033 ptrStats->
Add(xdata[i], (isWL ? dataWL[i] : dataGF[i]));
1036 if (i == index + npts)
1039 if (cit == Arcs.end())
1043 if (!(cit->second.mark & SLIP[which]))
1047 if (!(cit->second.mark & FIX[which]))
1051 index = cit->second.index;
1052 npts = cit->second.npts;
1057 (isWL ? ait->second.WLinfo : ait->second.GFinfo).n = ptrStats->
N();
1058 (isWL ? ait->second.WLinfo : ait->second.GFinfo).ave =
1060 (isWL ? ait->second.WLinfo : ait->second.GFinfo).sig =
1075 void gdc::findLargeGaps()
1079 int limit(
cfg(MaxGap));
1080 map<int, int> allgaps, gaps;
1081 map<int, int>::const_iterator git;
1082 map<int, Arc>::iterator ait;
1085 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1088 gaps = findGaps(ait->second);
1089 if (gaps.size() == 0)
1094 allgaps.insert(gaps.begin(), gaps.end());
1101 for (git = gaps.begin(); git != gaps.end(); ++git)
1103 if (git->second <= limit)
1110 findArc(git->first, ait);
1112 if (git->first == ait->second.index)
1116 if (git->first + git->second ==
1117 ait->second.index + ait->second.npts)
1123 addArc(git->first + git->second, Arc::BEG);
1127 findArc(git->first + git->second, ait);
1128 computeNgood(ait->second);
1146 map<int, int> gdc::findGaps(
const Arc& arc)
1150 unsigned int i, count,
1159 gaps[index] = count;
1174 gaps[index] = count;
1193 int gdc::fixSlips(
const unsigned which)
1200 static const double GFfactor(
wl2 / wlGF);
1201 static const double IFfactor(
1202 isGLO ? 3.5 : 3.52941176470588);
1205 map<int, Arc>::iterator ait;
1206 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1208 if ((ait->second.mark & SLIP[which]) == 0)
1212 if ((ait->second.mark & FIX[which]) != 0)
1217 LOG(
DEBUG) <<
"#" << tag <<
" fix slip for Arc[" << ait->first
1218 <<
"] " << ait->second.asString();
1221 step = (which == WL ? ait->second.WLinfo.step
1222 : ait->second.GFinfo.step);
1225 N = long(step + (step > 0.0 ? 0.5 : -0.5));
1226 istep =
static_cast<double>(N);
1231 (which == WL ? ait->second.WLinfo.Nslip
1232 : ait->second.GFinfo.Nslip) += N;
1235 ait->second.mark |= FIX[which];
1244 for (i = ait->second.index; i < xdata.size(); i++)
1247 dataGF[i] -= GFfactor * istep;
1252 for (i = ait->second.index; i < xdata.size(); i++)
1273 int gdc::FinalCheck()
1279 int iret(0), j, currstate, ngood, nbad;
1283 currstate = ngood = nbad = 0;
1284 for (i = 0; i < xdata.size(); i++)
1288 if (currstate == -1)
1290 gbs.push_back(-nbad);
1300 gbs.push_back(ngood);
1314 int gap =
cfg(MaxGap);
1324 for (k = 0, i = 0; i < gbs.size(); i++)
1326 if (gbs[i] > 0 && gbs[i] <
min)
1333 bool next1(i == gbs.size() - 2);
1335 bool prevbb(i == 0 || -gbs[i - 1] > gap);
1337 bool nextbb(i == gbs.size() - 1 || -gbs[i + 1] > gap);
1339 bool prev23((i == 2 && gbs[0] < gap) ||
1340 (i == 3 && gbs[1] < gap));
1342 bool next23((i == gbs.size() - 1 && -gbs[i - 1] < gap) ||
1343 (i == gbs.size() - 2 && -gbs[i + 1] < gap) ||
1344 (i == gbs.size() - 3 && -gbs[i + 1] < gap));
1345 bool ibeg(i == 0 && -gbs[1] > gap);
1346 bool iend(i == gbs.size() - 1 && -gbs[i - 1] > gap);
1348 if ((prevbb && nextbb) || prev1 || next1 || prev23 ||
1349 next23 || ibeg || iend)
1353 for (j = 0; j < gbs[i]; j++)
1355 flags[k + j] = ISOLATED;
1371 if (cfg_func(
"FIN"))
1373 dumpData(
LOGstrm, tag +
" FIN");
1387 void gdc::dumpData(ostream& os,
const string msg)
1390 map<int, Arc>::const_iterator kt = Arcs.begin();
1392 for (k = 0, i = 0; i < xdata.size(); i++)
1395 if (kt != Arcs.end() && kt->second.index == i)
1397 arcmsg = string(
" ") + kt->second.asString();
1401 os << msg <<
" " << sat <<
" " <<
printTime(xtime(i), outfmt) << fixed
1402 << setprecision(3) <<
" " << setw(9)
1403 << (xtime(i) - beginT)
1404 <<
" " << setw(2) << flags[i] << fixed << setprecision(4) <<
" "
1405 << setw(9) << dataWL[i] * wlWL <<
" " << setw(9) << dataGF[i] * wlGF
1412 const string& tag,
const string& label,
int prec)
1418 for (
int i = 0; i < filterResults.size(); i++)
1420 LOG(
INFO) << tag <<
" " << label <<
" Hit" << i + 1 <<
"["
1421 << filterResults[i].index <<
"] "
1422 << filterResults[i].asStatsString(prec);
1427 void gdc::DumpArcs(
const string& tag,
const string& label,
int prec)
1434 map<int, Arc>::const_iterator ait;
1435 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1437 LOG(
INFO) << tag << (label.size() ?
" " + label :
"") <<
" Arc" << i++
1438 <<
"[" << ait->first <<
"] " << ait->second.asString(prec);
1444 string gdc::returnMessage(
int prec,
int wid)
1446 int minpts(
cfg(MinPts));
1448 ostringstream oss, oss2;
1449 map<int, Arc>::iterator ait;
1459 oss << fixed << setprecision(prec);
1460 oss2 << fixed << setprecision(prec);
1464 map<int, Arc> newArcs;
1465 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1467 int n, i, ib(ait->second.index),
1468 ie(ait->second.index + ait->second.npts);
1471 for (n = 0, i = ib; i < ie; i++)
1484 if (n == ait->second.npts)
1486 ait->second.mark = Arc::REJ;
1498 newArcs[A.
index] = A;
1499 ait->second.
index = ib + n;
1503 for (n = 0, i = ie - 1; i >= ib; i--)
1521 newArcs[A.
index] = A;
1529 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1531 newArcs[ait->second.index] = ait->second;
1535 for (ait = newArcs.begin(); ait != newArcs.end(); ++ait)
1537 Arcs[ait->second.index] = ait->second;
1548 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1550 const Arc A(ait->second);
1551 const unsigned mark(A.
mark);
1555 if (mark & Arc::BEG)
1559 else if ((mark & Arc::WLSLIP) || (mark & Arc::GFSLIP))
1564 else if (mark & Arc::REJ)
1573 oss <<
" " << setw(4) << A.
index <<
" "
1575 <<
" " << setw(4) << A.
ngood;
1578 oss <<
" WL " << setw(4) << A.
WLinfo.
n <<
" " << setw(wid)
1583 oss <<
" GF " << setw(4) << A.
GFinfo.
n <<
" " << setw(wid)
1588 retmsg += oss.str() +
"\n";
1605 long long nGF, nWL, nL1, nL2;
1606 Epoch ttag, tbeg, tend;
1607 map<int, Arc>::iterator ait;
1610 const string L1(
"L1"),
L2(
"L2");
1614 for (i = 0; i < SP.
size(); i++)
1616 if (ait != Arcs.end() && i == ait->first)
1618 Arc &arc(ait->second);
1620 LOG(
DEBUG) <<
"#" << tag <<
" applyFix with Arc[" << ait->first
1621 <<
"] " << ait->second.asString();
1623 if ((arc.
mark & (Arc::WLSLIP | Arc::GFSLIP)) ||
1624 (arc.
mark & Arc::REJ))
1632 dL1 =
static_cast<double>(nL1);
1633 dL2 =
static_cast<double>(nL2);
1641 if (arc.
mark & Arc::REJ)
1644 for (j = 0; j < arc.
npts; j++)
1646 SP.
setFlag(i + j, SatPass::BAD);
1654 if (arc.
mark & Arc::BEG)
1658 LOG(
WARNING) <<
" Warning - GDC breaks pass at index " << i
1659 <<
" sat " << sat <<
" time "
1668 if (flags[i] == BAD)
1706 void gdc::generateCmds(vector<string>& cmds)
1710 unsigned int i, j, k;
1711 long long nGF, nWL, nL1, nL2;
1712 Epoch ttag, tbeg, tend;
1713 map<int, Arc>::iterator ait;
1714 static const string L1(
cfg(doRINEX3) ?
"L1C" :
"L1"),
1715 L2(
cfg(doRINEX3) ?
"L2W" :
"L2");
1719 oss <<
"--BD+ " << sat <<
"," <<
L1 <<
","
1720 <<
printTime(beginT,
"%Y,%m,%d,%H,%M,%S,") << N1bias
1721 <<
printTime(beginT,
" # initial L1 bias at %F,%.3g");
1722 cmds.push_back(oss.str());
1724 oss <<
"--BD+ " << sat <<
"," <<
L2 <<
","
1725 <<
printTime(beginT,
"%Y,%m,%d,%H,%M,%S,") << N2bias
1726 <<
printTime(beginT,
" # initial L2 bias at %F,%.3g");
1727 cmds.push_back(oss.str());
1730 for (ait = Arcs.begin(); ait != Arcs.end(); ++ait)
1732 Arc &arc(ait->second);
1735 if ((arc.
mark & (Arc::WLSLIP | Arc::GFSLIP)) ||
1736 (arc.
mark & Arc::REJ))
1743 ttag = xtime(arc.
index);
1746 oss <<
"--BD+ " << sat <<
"," <<
L1 <<
","
1747 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S,") << -nL1
1748 <<
printTime(ttag,
" # L1 slip at %F,%.3g");
1749 cmds.push_back(oss.str());
1754 oss <<
"--BD+ " << sat <<
"," <<
L2 <<
","
1755 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S,") << -nL2
1756 <<
printTime(ttag,
" # L2 slip at %F,%.3g");
1757 cmds.push_back(oss.str());
1763 if (arc.
mark & Arc::REJ)
1765 tbeg = xtime(arc.
index);
1770 oss <<
"--DD " << sat <<
"," <<
L1 <<
","
1773 "%Y,%m,%d,%H,%M,%S # delete outlier at %F,%.3g");
1774 cmds.push_back(oss.str());
1776 oss <<
"--DD " << sat <<
"," <<
L2 <<
","
1779 "%Y,%m,%d,%H,%M,%S # delete outlier at %F,%.3g");
1780 cmds.push_back(oss.str());
1785 oss <<
"--DD+ " << sat <<
"," <<
L1 <<
","
1786 <<
printTime(tbeg,
"%Y,%m,%d,%H,%M,%S # from %F,%.3g")
1787 <<
" - delete entire segment = " << arc.
npts <<
" epochs";
1788 cmds.push_back(oss.str());
1790 oss <<
"--DD- " << sat <<
"," <<
L1 <<
","
1791 <<
printTime(tend,
"%Y,%m,%d,%H,%M,%S # to %F,%.3g");
1792 cmds.push_back(oss.str());
1794 oss <<
"--DD+ " << sat <<
"," <<
L2 <<
","
1795 <<
printTime(tbeg,
"%Y,%m,%d,%H,%M,%S # from %F,%.3g");
1796 cmds.push_back(oss.str());
1798 oss <<
"--DD- " << sat <<
"," <<
L2 <<
","
1799 <<
printTime(tend,
"%Y,%m,%d,%H,%M,%S # to %F,%.3g");
1800 cmds.push_back(oss.str());
1817 for (i = arc.
index; i < k; i++)
1829 if (bad && (flags[i] ==
OK || i == k - 1))
1831 if ((flags[i] ==
OK && i == j + 1) || (i == k - 1 && i == j))
1835 oss <<
"--DD " << sat <<
"," <<
L1 <<
","
1838 "%Y,%m,%d,%H,%M,%S # delete outlier at %F,%.3g");
1839 cmds.push_back(oss.str());
1841 oss <<
"--DD " << sat <<
"," <<
L2 <<
","
1844 "%Y,%m,%d,%H,%M,%S # delete outlier at %F,%.3g");
1845 cmds.push_back(oss.str());
1851 oss <<
"--DD+ " << sat <<
"," <<
L1 <<
","
1852 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S # delete "
1853 "outliers starting at %F,%.3g");
1854 cmds.push_back(oss.str());
1856 oss <<
"--DD+ " << sat <<
"," <<
L2 <<
","
1857 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S # delete "
1858 "outliers starting at %F,%.3g");
1859 cmds.push_back(oss.str());
1862 ttag = xtime(i == k - 1 ? i : i - 1);
1864 oss <<
"--DD- " << sat <<
"," <<
L1 <<
","
1865 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S # end deleting "
1866 "outliers at %F,%.3g");
1867 cmds.push_back(oss.str());
1869 oss <<
"--DD- " << sat <<
"," <<
L2 <<
","
1870 <<
printTime(ttag,
"%Y,%m,%d,%H,%M,%S # end deleting "
1871 "outliers at %F,%.3g");
1872 cmds.push_back(oss.str());
1894 bool gdc::setParameter(std::string cmd)
1903 while (cmd[0] ==
'-')
1905 if (cmd.substr(0, 2) ==
"DC")
1910 string label, value;
1911 string::size_type
pos = cmd.find_first_of(
",=:");
1912 if (
pos == string::npos)
1918 label = cmd.substr(0,
pos);
1920 value.erase(0,
pos + 1);
1934 bool gdc::setParameter(std::string label,
double value)
1936 if (CFG.find(label) == CFG.end())
1945 if (CFG[
"debug"] > -1)
1947 LOG(
DEBUG) <<
"Set GDC " << label <<
" to " << value;
1952 if (label ==
string(
"debug"))
1955 CFG[
"RAW"] = CFG[
"WLF"] = CFG[
"GFF"] = CFG[
"WL1"] = CFG[
"WLG"] =
1956 CFG[
"WLW"] = CFG[
"WLF"] = CFG[
"GF1"] = CFG[
"GFG"] = CFG[
"GFW"] =
1957 CFG[
"GFF"] = CFG[
"FIN"] = 0;
1964 LOG(
INFO) <<
"GDC:debug sets GDC to output fixed data WLF GFF";
1965 if (CFG[
"debug"] > 0)
1968 LOG(
INFO) <<
"GDC:debug sets GDC to output RAW data";
1970 if (CFG[
"debug"] > 1)
1977 <<
"GDC:debug sets GDC to output 1st diff fixes WL1, GF1";
1978 LOG(
INFO) <<
"GDC:debug sets GDC to output gross fixes WLG, GFG";
1980 if (CFG[
"debug"] > 2)
1985 <<
"GDC:debug sets GDC to output window filters WLW, GFW";
1989 if (label ==
string(
"verbose"))
2007 void gdc::DisplayParameterUsage(ostream& os,
string tag,
bool advanced)
2011 static const unsigned name_val_width(18), adv_name_val_width(18);
2012 os << tag <<
"GNSSTk Discontinuity Corrector (GDC) v." << GDCVersion
2013 <<
" configuration:" << endl;
2017 map<int, string>::const_iterator it;
2018 for (it = CFGlist.begin(); it != CFGlist.end(); it++)
2021 if (CFGdesc[name][0] ==
'*')
2027 <<
"=" << CFG[name];
2035 os << tag <<
" Advanced options :\n";
2036 for (it = CFGlist.begin(); it != CFGlist.end(); it++)
2039 if (CFGdesc[name][0] !=
'*')
2045 <<
"=" << CFG[name];
2048 <<
" : " << CFGdesc[name].substr(2)
2063 #define setcfg(a, b, c) \
2067 CFGlist[CFGindex] = #a; \
2085 setcfg(MaxGap, 10,
"maximum allowed gap within a segment (points)");
2087 "minimum number of good points in phase segment (points)");
2088 setcfg(width, 20,
"* sliding window width (points)");
2090 setcfg(WLgrossStep, 6.0,
"WL gross slip detection threshold (WLwl)");
2091 setcfg(WLfineStep, 0.7,
"WL fine slip detection threshold (WLwl)");
2093 setcfg(GFgrossStep, 6.0,
"GF gross slip detection threshold (GFwl)");
2094 setcfg(GFfineStep, 0.7,
"GF fine slip detection threshold (GFwl)");
2096 setcfg(oswidth, 7,
"output stream width (chars)");
2097 setcfg(osprec, 3,
"output stream precision (chars)");
2099 "level of diagnostic output, from -1(none) to 3(all)");
2100 setcfg(verbose, 0,
"output analysis message in window filter");
2104 "* output data (WL,GF) before any processing (m) [0=don't]");
2107 "* output results of 1st diff filter on WL (wl) [0=don't]");
2108 setcfg(WLG, 0,
"* output WL after fixing gross slips (m) [0=don't]");
2110 "* output results of window filter on WL (wl) [0=don't]");
2111 setcfg(WLF, 0,
"* output WL after fixing (m) [0=don't]");
2114 "* output results of 1st diff filter on GF (wl) [0=don't]");
2115 setcfg(GFG, 0,
"* output GF after fixing gross slips (m) [0=don't]");
2117 "* output results of window filter on GF (wl) [0=don't]");
2118 setcfg(GFF, 0,
"* output GF after fixing (m) [0=don't]");
2119 setcfg(FIN, 0,
"* output WL/GF after final check [0=don't]");
2122 setcfg(doFix, 0,
"apply fixes to input L1 and L2 SatPass arrays");
2123 setcfg(doCmds, 0,
"generate editing commands");
2124 setcfg(doRINEX3, 1,
"* editing commands use L1C L2W instead of L1 L2");
2127 setcfg(UserFlag, 0,
"* call SatPass::setUserFlag(value) for rejects");