112 std::optional<double>
CN0)
125 std::optional<double>
CN0;
151 [[nodiscard]]
static std::string
type()
158 [[nodiscard]] std::string
getType()
const override {
return type(); }
168 std::vector<ObservationData>
data;
176 return sat.
satId == satId;
191 [[nodiscard]] std::optional<std::reference_wrapper<const SatelliteData>>
satData(
const SatId& satId)
const
194 return sat.
satId == satId;
211 return iter !=
data.end();
222 if (iter !=
data.end())
227 data.emplace_back(satSigId);
234 [[nodiscard]] std::optional<std::reference_wrapper<const ObservationData>>
operator()(
const SatSigId& satSigId)
const
240 if (iter !=
data.end())
253 std::vector<std::string> descriptors;
254 descriptors.reserve(
data.size() * 7);
256 for (
const auto& obsData :
data)
258 descriptors.push_back(fmt::format(
"{} Pseudorange [m]", obsData.satSigId));
259 descriptors.push_back(fmt::format(
"{} Pseudorange SSI", obsData.satSigId));
261 descriptors.push_back(fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId));
262 descriptors.push_back(fmt::format(
"{} Carrier-phase [m]", obsData.satSigId));
263 descriptors.push_back(fmt::format(
"{} Carrier-phase SSI", obsData.satSigId));
264 descriptors.push_back(fmt::format(
"{} Carrier-phase LLI", obsData.satSigId));
266 descriptors.push_back(fmt::format(
"{} Doppler [Hz]", obsData.satSigId));
267 descriptors.push_back(fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId));
275 [[nodiscard]] std::optional<double>
getDynamicDataAt(
const std::string& descriptor)
const override
277 for (
const auto& obsData :
data)
279 if (descriptor == fmt::format(
"{} Pseudorange [m]", obsData.satSigId) && obsData.pseudorange)
281 return obsData.pseudorange->value;
283 if (descriptor == fmt::format(
"{} Pseudorange SSI", obsData.satSigId) && obsData.pseudorange)
285 return obsData.pseudorange->SSI;
287 if (descriptor == fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId) && obsData.carrierPhase)
289 return obsData.carrierPhase->value;
291 if (descriptor == fmt::format(
"{} Carrier-phase [m]", obsData.satSigId) && obsData.carrierPhase)
293 auto wavelength =
InsConst::C / obsData.satSigId.freq().getFrequency(0);
294 return obsData.carrierPhase->value * wavelength;
296 if (descriptor == fmt::format(
"{} Carrier-phase SSI", obsData.satSigId) && obsData.carrierPhase)
298 return obsData.carrierPhase->SSI;
300 if (descriptor == fmt::format(
"{} Carrier-phase LLI", obsData.satSigId) && obsData.carrierPhase)
302 return obsData.carrierPhase->LLI;
304 if (descriptor == fmt::format(
"{} Doppler [Hz]", obsData.satSigId))
306 return obsData.doppler;
308 if (descriptor == fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId))
317 [[nodiscard]] std::vector<std::pair<std::string, double>>
getDynamicData()
const override
319 std::vector<std::pair<std::string, double>> dynData;
320 dynData.reserve(
data.size() * 7);
321 for (
const auto& obsData :
data)
323 if (obsData.pseudorange) { dynData.emplace_back(fmt::format(
"{} Pseudorange [m]", obsData.satSigId), obsData.pseudorange->value); }
324 if (obsData.pseudorange) { dynData.emplace_back(fmt::format(
"{} Pseudorange SSI", obsData.satSigId), obsData.pseudorange->SSI); }
326 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase [cycles]", obsData.satSigId), obsData.carrierPhase->value); }
327 if (obsData.carrierPhase)
329 auto wavelength =
InsConst::C / obsData.satSigId.freq().getFrequency(0);
330 dynData.emplace_back(fmt::format(
"{} Carrier-phase [m]", obsData.satSigId), obsData.carrierPhase->value * wavelength);
332 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase SSI", obsData.satSigId), obsData.carrierPhase->SSI); }
333 if (obsData.carrierPhase) { dynData.emplace_back(fmt::format(
"{} Carrier-phase LLI", obsData.satSigId), obsData.carrierPhase->LLI); }
335 if (obsData.doppler) { dynData.emplace_back(fmt::format(
"{} Doppler [Hz]", obsData.satSigId), obsData.doppler.value()); }
337 if (obsData.CN0) { dynData.emplace_back(fmt::format(
"{} Carrier-to-Noise density [dBHz]", obsData.satSigId), obsData.CN0.value()); }
374 return "Pseudorange";
387#ifndef DOXYGEN_IGNORE
390struct fmt::formatter<
NAV::GnssObs::ObservationType> : fmt::formatter<const char*>
396 template<
typename FormatContext>
399 return fmt::formatter<const char*>::format(
to_string(obsType), ctx);
std::ostream & operator<<(std::ostream &os, const NAV::GnssObs::ObservationType &obj)
Stream insertion operator overload.
Structs identifying a unique satellite.
Frequency definition for different satellite systems.
GNSS Observation message information.
ObservationType
Observation types.
@ Doppler
Doppler (Pseudorange rate)
@ ObservationType_COUNT
Count.
@ Pseudorange
Pseudorange.
std::vector< std::string > dynamicDataDescriptors() const override
Returns a vector of data descriptors for the dynamic data.
std::string getType() const override
Returns the type of the data class.
std::vector< std::pair< std::string, double > > getDynamicData() const override
Returns a vector of data descriptors and values for the dynamic data.
std::optional< double > getDynamicDataAt(const std::string &descriptor) const override
Get the value for the descriptor.
static std::string type()
Returns the type of the data class.
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
std::optional< std::reference_wrapper< const SatelliteData > > satData(const SatId &satId) const
Access the satellite data.
bool contains(const SatSigId &satSigId) const
Checks if an element with the identifier exists.
std::optional< std::reference_wrapper< ReceiverInfo > > receiverInfo
Optional Receiver Information, e.g. from RINEX header.
SatelliteData & satData(const SatId &satId)
Access or insert the satellite data.
ObservationData & operator()(const SatSigId &satSigId)
Return the element with the identifier or a newly constructed one if it did not exist.
std::vector< SatelliteData > _satData
Useful information of the satellites.
const std::vector< SatelliteData > & getSatData() const
Useful information of the satellites.
std::vector< ObservationData > data
Satellite observations.
std::optional< std::reference_wrapper< const ObservationData > > operator()(const SatSigId &satSigId) const
Return the element with the identifier.
static constexpr double C
Speed of light [m/s].
The class is responsible for all time-related tasks.
NodeData()=default
Default constructor.
static std::string type()
Returns the type of the data class.
InsTime insTime
Time at which the message was received.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
void move(std::vector< T > &v, size_t sourceIdx, size_t targetIdx)
Moves an element within a vector to a new position.
uint8_t LLI
Loss of Lock Indicator [0...6] (only associated with the phase observation)
double value
Carrier phase measurement [cycles].
uint8_t SSI
Signal Strength Indicator (SSI) projected into interval 1-9.
uint8_t SSI
Signal Strength Indicator (SSI) projected into interval 1-9.
double value
Pseudorange measurement [m].
Stores the satellites observations.
std::optional< Pseudorange > pseudorange
Pseudorange measurement [m].
std::optional< CarrierPhase > carrierPhase
Carrier phase measurement [cycles].
ObservationData(const SatSigId &satSigId)
Constructor.
std::optional< double > CN0
Carrier-to-Noise density [dBHz].
SatSigId satSigId
SignalId and satellite number.
std::optional< double > doppler
Doppler measurement [Hz].
Receiver Information, e.g. from RINEX header.
Eigen::Vector3d antennaDeltaNEU
Antenna Delta (North, East, Up) in [m].
std::optional< Eigen::Vector3d > e_approxPos
< Approximate receiver position in [m], e.g. from RINEX header
std::string antennaType
Antenna Type. Empty if unknown.
Useful information of the satellites.
Frequency frequencies
Frequencies transmitted by this satellite.
SatId satId
Satellite identifier.
Identifies a satellite (satellite system and number)
Identifies a satellite signal (satellite frequency and number)