110 std::optional<double>
CN0)
123 std::optional<double>
CN0;
149 [[nodiscard]]
static std::string
type()
162 std::vector<ObservationData>
data;
169 auto iter = std::find_if(_satData.begin(), _satData.end(), [&satId](
const SatelliteData& sat) {
170 return sat.satId == satId;
172 if (iter != _satData.end())
177 _satData.emplace_back();
178 _satData.back().satId = satId;
179 return _satData.back();
185 [[nodiscard]] std::optional<std::reference_wrapper<const SatelliteData>>
satData(
const SatId& satId)
const
187 auto iter = std::find_if(_satData.begin(), _satData.end(), [&satId](
const SatelliteData& sat) {
188 return sat.satId == satId;
190 if (iter != _satData.end())
203 return idData.satSigId == satSigId;
205 return iter !=
data.end();
214 return idData.satSigId == satSigId;
216 if (iter !=
data.end())
221 data.emplace_back(satSigId);
228 [[nodiscard]] std::optional<std::reference_wrapper<const ObservationData>>
operator()(
const SatSigId& satSigId)
const
231 return idData.satSigId == satSigId;
234 if (iter !=
data.end())
242 [[nodiscard]]
const std::vector<SatelliteData>&
getSatData()
const {
return _satData; }
247 std::vector<std::string> descriptors;
248 descriptors.reserve(
data.size() * 7);
250 for (
const auto& obsData :
data)
252 descriptors.push_back(fmt::format(
"{} Pseudorange [m]", obsData.satSigId));
253 descriptors.push_back(fmt::format(
"{} Pseudorange SSI", obsData.satSigId));
255 descriptors.push_back(fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId));
256 descriptors.push_back(fmt::format(
"{} Carrier-phase SSI", obsData.satSigId));
257 descriptors.push_back(fmt::format(
"{} Carrier-phase LLI", obsData.satSigId));
259 descriptors.push_back(fmt::format(
"{} Doppler [Hz]", obsData.satSigId));
260 descriptors.push_back(fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId));
268 [[nodiscard]] std::optional<double>
getDynamicDataAt(
const std::string& descriptor)
const override
270 for (
const auto& obsData :
data)
272 if (descriptor == fmt::format(
"{} Pseudorange [m]", obsData.satSigId) && obsData.pseudorange)
274 return obsData.pseudorange->value;
276 if (descriptor == fmt::format(
"{} Pseudorange SSI", obsData.satSigId) && obsData.pseudorange)
278 return obsData.pseudorange->SSI;
280 if (descriptor == fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId) && obsData.carrierPhase)
282 return obsData.carrierPhase->value;
284 if (descriptor == fmt::format(
"{} Carrier-phase SSI", obsData.satSigId) && obsData.carrierPhase)
286 return obsData.carrierPhase->SSI;
288 if (descriptor == fmt::format(
"{} Carrier-phase LLI", obsData.satSigId) && obsData.carrierPhase)
290 return obsData.carrierPhase->LLI;
292 if (descriptor == fmt::format(
"{} Doppler [Hz]", obsData.satSigId) && obsData.doppler)
294 return obsData.doppler.value();
296 if (descriptor == fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId) && obsData.CN0)
298 return obsData.CN0.value();
305 [[nodiscard]] std::vector<std::pair<std::string, double>>
getDynamicData()
const override
307 std::vector<std::pair<std::string, double>> dynData;
308 dynData.reserve(
data.size() * 7);
309 for (
const auto& obsData :
data)
311 if (obsData.pseudorange) { dynData.emplace_back(fmt::format(
"{} Pseudorange [m]", obsData.satSigId), obsData.pseudorange->value); }
312 if (obsData.pseudorange) { dynData.emplace_back(fmt::format(
"{} Pseudorange SSI", obsData.satSigId), obsData.pseudorange->SSI); }
314 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId), obsData.carrierPhase->value); }
315 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase SSI", obsData.satSigId), obsData.carrierPhase->SSI); }
316 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase LLI", obsData.satSigId), obsData.carrierPhase->LLI); }
318 if (obsData.doppler) { dynData.emplace_back(fmt::format(
"{} Doppler [Hz]", obsData.satSigId), obsData.doppler.value()); }
320 if (obsData.CN0) { dynData.emplace_back(fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId), obsData.CN0.value()); }
346 std::vector<SatelliteData> _satData;
357 return "Pseudorange";
370#ifndef DOXYGEN_IGNORE
373struct fmt::formatter<NAV::GnssObs::ObservationType> : fmt::formatter<const char*>
379 template<
typename FormatContext>
382 return fmt::formatter<const char*>::format(
to_string(obsType), ctx);
@ Freq_None
None.
Definition Frequency.hpp:27
std::ostream & operator<<(std::ostream &os, const NAV::GnssObs::ObservationType &obj)
Stream insertion operator overload.
Structs identifying a unique satellite.
void move(std::vector< T > &v, size_t sourceIdx, size_t targetIdx)
Moves an element within a vector to a new position.
Definition Vector.hpp:26
@ None
None.
Definition Code.hpp:93
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
GNSS Observation message information.
Definition GnssObs.hpp:32
ObservationType
Observation types.
Definition GnssObs.hpp:36
@ Doppler
Doppler (Pseudorange rate)
Definition GnssObs.hpp:39
@ ObservationType_COUNT
Count.
Definition GnssObs.hpp:40
@ Carrier
Carrier-Phase.
Definition GnssObs.hpp:38
@ Pseudorange
Pseudorange.
Definition GnssObs.hpp:37
std::vector< std::string > dynamicDataDescriptors() const override
Returns a vector of data descriptors for the dynamic data.
Definition GnssObs.hpp:245
std::vector< std::pair< std::string, double > > getDynamicData() const override
Returns a vector of data descriptors and values for the dynamic data.
Definition GnssObs.hpp:305
std::optional< double > getDynamicDataAt(const std::string &descriptor) const override
Get the value for the descriptor.
Definition GnssObs.hpp:268
static std::string type()
Returns the type of the data class.
Definition GnssObs.hpp:149
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition GnssObs.hpp:156
std::optional< std::reference_wrapper< const SatelliteData > > satData(const SatId &satId) const
Access the satellite data.
Definition GnssObs.hpp:185
bool contains(const SatSigId &satSigId) const
Checks if an element with the identifier exists.
Definition GnssObs.hpp:200
std::optional< std::reference_wrapper< ReceiverInfo > > receiverInfo
Optional Receiver Information, e.g. from RINEX header.
Definition GnssObs.hpp:342
SatelliteData & satData(const SatId &satId)
Access or insert the satellite data.
Definition GnssObs.hpp:167
ObservationData & operator()(const SatSigId &satSigId)
Return the element with the identifier or a newly constructed one if it did not exist.
Definition GnssObs.hpp:211
const std::vector< SatelliteData > & getSatData() const
Useful information of the satellites.
Definition GnssObs.hpp:242
std::vector< ObservationData > data
Satellite observations.
Definition GnssObs.hpp:162
std::optional< std::reference_wrapper< const ObservationData > > operator()(const SatSigId &satSigId) const
Return the element with the identifier.
Definition GnssObs.hpp:228
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Parent class for all data transmitted over Flow pins.
Definition NodeData.hpp:27
static std::string type()
Returns the type of the data class.
Definition NodeData.hpp:44
InsTime insTime
Time at which the message was received.
Definition NodeData.hpp:89
Carrier phase.
Definition GnssObs.hpp:71
uint8_t LLI
Loss of Lock Indicator [0...6] (only associated with the phase observation)
Definition GnssObs.hpp:92
double value
Carrier phase measurement [cycles].
Definition GnssObs.hpp:73
uint8_t SSI
Signal Strength Indicator (SSI) projected into interval 1-9.
Definition GnssObs.hpp:89
Pseudorange.
Definition GnssObs.hpp:48
uint8_t SSI
Signal Strength Indicator (SSI) projected into interval 1-9.
Definition GnssObs.hpp:66
double value
Pseudorange measurement [m].
Definition GnssObs.hpp:50
Stores the satellites observations.
Definition GnssObs.hpp:45
std::optional< Pseudorange > pseudorange
Pseudorange measurement [m].
Definition GnssObs.hpp:120
std::optional< CarrierPhase > carrierPhase
Carrier phase measurement [cycles].
Definition GnssObs.hpp:121
ObservationData(const SatSigId &satSigId)
Constructor.
Definition GnssObs.hpp:97
std::optional< double > CN0
Carrier-to-Noise density [dBHz].
Definition GnssObs.hpp:123
SatSigId satSigId
SignalId and satellite number.
Definition GnssObs.hpp:119
std::optional< double > doppler
Doppler measurement [Hz].
Definition GnssObs.hpp:122
Receiver Information, e.g. from RINEX header.
Definition GnssObs.hpp:327
Eigen::Vector3d antennaDeltaNEU
Antenna Delta (North, East, Up) in [m].
Definition GnssObs.hpp:338
std::optional< Eigen::Vector3d > e_approxPos
< Approximate receiver position in [m], e.g. from RINEX header
Definition GnssObs.hpp:329
std::string antennaType
Antenna Type. Empty if unknown.
Definition GnssObs.hpp:332
Useful information of the satellites.
Definition GnssObs.hpp:128
Frequency frequencies
Frequencies transmitted by this satellite.
Definition GnssObs.hpp:130
SatId satId
Satellite identifier.
Definition GnssObs.hpp:129
Identifies a satellite (satellite system and number)
Definition SatelliteIdentifier.hpp:32
Identifies a satellite signal (satellite frequency and number)
Definition SatelliteIdentifier.hpp:62