47 [[nodiscard]] std::string
type()
const override;
64 constexpr static size_t INPUT_PORT_INDEX_GNSS_OBS = 0;
65 constexpr static size_t OUTPUT_PORT_INDEX_GNSS_COMBINATION = 0;
78 Unit unit = Unit::Meters;
96 std::vector<Term> terms{
Term() };
101 double polynomialCycleSlipDetectorThresholdPercentage = 0.5;
103 bool polynomialCycleSlipDetectorOutputWhenWindowSizeNotReached =
false;
105 bool polynomialCycleSlipDetectorOutputPolynomials =
false;
107 std::vector<std::pair<InsTime, Polynomial<double>>> polynomials;
110 [[nodiscard]] std::string description()
const
113 for (
const auto& term : terms)
115 if (!desc.empty()) { desc +=
" "; }
116 desc += term.sign == 1 ?
"+" :
"-";
118 switch (term.obsType)
121 desc += unit == Unit::Cycles ?
"P" :
"p";
124 desc += unit == Unit::Cycles ?
"Φ" :
"φ";
127 desc += fmt::format(
"({})", term.satSigId);
129 if (unit == Unit::Cycles) { desc +=
" [cycles]"; }
130 else { desc +=
" [m]"; }
136 [[nodiscard]]
double calcCombinationFrequency()
const
138 double combinedFreq = 0.0;
139 for (
const auto& term : terms)
141 double freq = term.satSigId.freq().getFrequency(term.freqNum);
142 combinedFreq +=
static_cast<double>(term.sign) * freq;
144 return combinedFreq == 0 ? terms.front().satSigId.freq().getFrequency(terms.front().freqNum) : combinedFreq;
149 std::vector<Combination> _combinations{ Combination() };
152 bool initialize()
override;
155 void deinitialize()
override;
Combination of different cycle-slip detection algorithms.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Structs identifying a unique satellite.
@ G1C
GPS L1 - C/A-code.
Definition Code.hpp:95
Allows creation of GNSS measurement combinations.
Definition GnssAnalyzer.hpp:28
static std::string category()
String representation of the Class Category.
friend void from_json(const json &j, Combination::Term &data)
Read info from a json object.
static std::string typeStatic()
String representation of the Class Type.
friend void to_json(json &j, const Combination::Term &data)
Write info to a json object.
~GnssAnalyzer() override
Destructor.
GnssAnalyzer(GnssAnalyzer &&)=delete
Move constructor.
void guiConfig() override
ImGui config window which is shown on double click.
void restore(const json &j) override
Restores the node from a json object.
friend void from_json(const json &j, Combination &data)
Read info from a json object.
std::string type() const override
String representation of the Class Type.
GnssAnalyzer()
Default constructor.
GnssAnalyzer(const GnssAnalyzer &)=delete
Copy constructor.
GnssAnalyzer & operator=(const GnssAnalyzer &)=delete
Copy assignment operator.
json save() const override
Saves the node into a json object.
friend void to_json(json &j, const Combination &data)
Write info to a json object.
GnssAnalyzer & operator=(GnssAnalyzer &&)=delete
Move assignment operator.
Abstract parent class for all nodes.
Definition Node.hpp:86
Cycle-slip detection.
Definition PolynomialCycleSlipDetector.hpp:49
Term of a combination equation.
Definition GnssAnalyzer.hpp:82
int8_t freqNum
Frequency number. Only used for GLONASS G1 and G2 // TODO: Set this somewhere.
Definition GnssAnalyzer.hpp:92
SatSigId satSigId
SignalId and satellite number.
Definition GnssAnalyzer.hpp:91
ObservationType obsType
Observation Type.
Definition GnssAnalyzer.hpp:93
int sign
+1 or -1
Definition GnssAnalyzer.hpp:90
ObservationType
Observation types.
Definition GnssAnalyzer.hpp:85
@ Pseudorange
Pseudorange.
bool receivedDuringRun
Flag weather the signal was received.
Definition GnssAnalyzer.hpp:94
Identifies a satellite signal (satellite frequency and number)
Definition SatelliteIdentifier.hpp:62