47 [[nodiscard]] std::string
type()
const override;
50 [[nodiscard]]
static std::string
category();
57 [[nodiscard]]
json save()
const override;
113 for (
const auto& term :
terms)
115 if (!desc.empty()) { desc +=
" "; }
116 desc += term.sign == 1 ?
"+" :
"-";
118 switch (term.obsType)
127 desc += fmt::format(
"({})", term.satSigId);
130 else { desc +=
" [m]"; }
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;
165 friend void to_json(
json& j,
const Combination& data);
173 friend void to_json(
json& j,
const Combination::Term& data);
177 friend void from_json(
const json& j, Combination::Term& data);
Combination of different cycle-slip detection algorithms.
nlohmann::json json
json namespace
Structs identifying a unique satellite.
static std::string typeStatic()
String representation of the Class Type.
static std::string category()
String representation of the Class Category.
~GnssAnalyzer() override
Destructor.
std::vector< Combination > _combinations
Combinations to calculate.
GnssAnalyzer(GnssAnalyzer &&)=delete
Move constructor.
void receiveGnssObs(InputPin::NodeDataQueue &queue, size_t pinIdx)
Receive Gnss observation.
void deinitialize() override
Deinitialize the node.
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.
static constexpr size_t OUTPUT_PORT_INDEX_GNSS_COMBINATION
Flow (GnssCombination)
static constexpr size_t INPUT_PORT_INDEX_GNSS_OBS
Flow (GnssObs)
std::string type() const override
String representation of the Class Type.
GnssAnalyzer()
Default constructor.
friend void from_json(const json &j, Combination &data)
Read info from a json object.
GnssAnalyzer(const GnssAnalyzer &)=delete
Copy constructor.
GnssAnalyzer & operator=(const GnssAnalyzer &)=delete
Copy assignment operator.
bool initialize() override
Initialize the node.
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.
Node(std::string name)
Constructor.
Term of a combination equation.
int8_t freqNum
Frequency number. Only used for GLONASS G1 and G2 // TODO: Set this somewhere.
ObservationType
Observation types.
@ Pseudorange
Pseudorange.
SatSigId satSigId
SignalId and satellite number.
ObservationType obsType
Observation Type.
bool receivedDuringRun
Flag weather the signal was received.
Combination of GNSS measurements.
PolynomialCycleSlipDetector< std::string > polynomialCycleSlipDetector
Cycle-slip detector.
std::string description() const
Get a string description of the combination.
double calcCombinationFrequency() const
Calculates the combined frequency of all terms.
Unit unit
Unit to calculate the combination in.
std::vector< Term > terms
List of terms making up the combination.
bool polynomialCycleSlipDetectorOutputPolynomials
Whether the polynomials should be outputted.
bool polynomialCycleSlipDetectorOutputWhenWindowSizeNotReached
Whether to output the prediction even when the window size is not reached.
std::vector< std::pair< InsTime, Polynomial< double > > > polynomials
Polynomial collection.
double polynomialCycleSlipDetectorThresholdPercentage
Threshold to categorize a measurement as cycle slip [% of smallest wavelength].
Unit
Possible units to calculate the combination in.
Identifies a satellite signal (satellite frequency and number)