21#include <unordered_map>
26#include <application.h>
27#include <imgui_stdlib.h>
46#include <Eigen/src/Core/MatrixBase.h>
48#include <fmt/format.h>
49#include <fmt/ranges.h>
63 for (
size_t i = 0; i < receiverCount; i++)
83 template<
typename ReceiverType>
86 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
87 [[maybe_unused]]
const std::string& nameId,
90 LOG_DATA(
"{}: Calculating all observation estimates:", nameId);
91 for (
auto& [satSigId, observation] : observations.
signals)
104 template<
typename ReceiverType>
108 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
109 [[maybe_unused]]
const std::string& nameId,
112 LOG_DATA(
"{}: Calculating observation estimates for [{}]", nameId, satSigId);
116 auto& recvObs = observation.
recvObs.at(receiver.
type);
124 double elevation = recvObs->satElevation(e_recvPosAPC, lla_recvPosAPC);
125 double azimuth = recvObs->satAzimuth(e_recvPosAPC, lla_recvPosAPC);
126 Eigen::Vector3d e_pLOS = recvObs->e_pLOS(e_recvPosAPC);
129 double rho_r_s = (recvObs->e_satPos() - e_recvPosAPC).norm();
130 recvObs->terms.rho_r_s = rho_r_s;
134 recvObs->terms.tropoZenithDelay = tropo_r_s;
136 double dpsr_T_r_s = tropo_r_s.ZHD * tropo_r_s.zhdMappingFactor + tropo_r_s.ZWD * tropo_r_s.zwdMappingFactor;
137 recvObs->terms.dpsr_T_r_s = dpsr_T_r_s;
140 freq, observation.
freqNum(), lla_recvPosAPC, elevation, azimuth,
142 recvObs->terms.dpsr_I_r_s = dpsr_I_r_s;
145 recvObs->terms.dpsr_ie_r_s = dpsr_ie_r_s;
152 double cn0 = recvObs->gnssObsData().CN0.value_or(1.0);
156 for (
auto& [obsType, obsData] : recvObs->obs)
158 LOG_DATA(
"{}: [{}][{:11}][{:5}] Observation estimate", nameId, satSigId, obsType, receiver.
type);
162 obsData.estimate = rho_r_s
172 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Geometrical range", nameId, satSigId, obsType, receiver.
type, rho_r_s);
173 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Sagnac correction", nameId, satSigId, obsType, receiver.
type, dpsr_ie_r_s);
174 if (dpsr_T_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Tropospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_T_r_s); }
175 if (dpsr_I_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Ionospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_I_r_s); }
177 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Satellite clock bias", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().bias);
180 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m] Pseudorange estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
181 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Pseudorange measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
182 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
185 obsData.estimate = rho_r_s
195 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Geometrical range", nameId, satSigId, obsType, receiver.
type, rho_r_s);
196 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Sagnac correction", nameId, satSigId, obsType, receiver.
type, dpsr_ie_r_s);
197 if (dpsr_T_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Tropospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_T_r_s); }
198 if (dpsr_I_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Ionospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_I_r_s); }
200 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Satellite clock bias", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().bias);
202 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m] Carrier-phase estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
203 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Carrier-phase measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
204 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
207 obsData.estimate = e_pLOS.dot(recvObs->e_satVel() - receiver.
e_vel)
211 - recvObs->satClock().drift);
213 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m/s] ", nameId, satSigId, obsType, receiver.
type, e_pLOS.dot(recvObs->e_satVel() - receiver.
e_vel));
214 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m/s] Sagnac rate correction", nameId, satSigId, obsType, receiver.
type,
calcSagnacRateCorrection(e_recvPosAPC, recvObs->e_satPos(), receiver.
e_vel, recvObs->e_satVel()));
216 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m/s] Satellite clock drift", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().drift);
217 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m/s] Doppler estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
218 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m/s] Doppler measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
219 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m/s] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
224 LOG_DATA(
"{}: [{}][{:11}][{:5}] Observation error variance", nameId, satSigId, obsType, receiver.
type);
225 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4g} [{}] Measurement error variance", nameId, satSigId, obsType, receiver.
type, obsData.measVar,
232 obsData.measVar += observation.
navData()->calcSatellitePositionVariance()
235 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m^2] Satellite position variance", nameId, satSigId, obsType, receiver.
type, observation.
navData()->calcSatellitePositionVariance());
236 if (dpsr_I_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m^2] Ionosphere variance", nameId, satSigId, obsType, receiver.
type,
ionoErrorVar(dpsr_I_r_s, freq, observation.
freqNum())); }
237 if (dpsr_T_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m^2] Troposphere variance", nameId, satSigId, obsType, receiver.
type,
tropoErrorVar(dpsr_T_r_s, elevation)); }
245 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4g} [{}] Observation error variance", nameId, satSigId, obsType, receiver.
type, obsData.measVar,
280 template<
typename Derived>
283 const Eigen::MatrixBase<Derived>& e_recvPosAPC,
284 const auto& recvClockBias,
285 const auto& interFreqBias,
286 const auto& dpsr_T_r_s,
287 const auto& dpsr_I_r_s,
288 const std::shared_ptr<const SatelliteInfo>& satInfo,
289 const auto& elevation,
290 const std::shared_ptr<const GnssObs>& gnssObs,
291 [[maybe_unused]]
const std::string& nameId)
const
294 auto rho_r_s = (satInfo->e_satPos - e_recvPosAPC).norm();
304 auto pcv =
calcPCV(freq, gnssObs->insTime, elevation, std::nullopt, receiverType, gnssObs, nameId);
310 +
InsConst::C * (recvClockBias - satInfo->satClockBias + interFreqBias)
325 template<
typename Derived>
326 std::pair<double, Eigen::Vector3d>
330 const Eigen::MatrixBase<Derived>& e_recvPosMarker,
331 double recvClockBias,
332 const std::shared_ptr<const SatelliteInfo>& satInfo,
333 const std::shared_ptr<const GnssObs>& gnssObs,
334 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
335 [[maybe_unused]]
const std::string& nameId)
const
337 Eigen::Vector3d e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
341 Eigen::Vector3d n_lineOfSightUnitVector =
trafo::n_Quat_e(lla_recvPosAPC(0), lla_recvPosAPC(1)) * e_pLOS;
346 double rho_r_s = (satInfo->e_satPos - e_recvPosAPC).norm();
350 double dpsr_I_r_s =
calculateIonosphericDelay(freq, freqNum, lla_recvPosAPC, gnssObs, ionosphericCorrections, elevation, azimuth);
359 auto pcv =
calcPCV(freq, gnssObs->insTime, elevation, std::nullopt, receiverType, gnssObs, nameId);
361 double estimate = rho_r_s
365 +
InsConst::C * (recvClockBias - satInfo->satClockBias )
368 return { estimate, e_pLOS };
381 template<
typename DerivedPos,
typename DerivedVel>
384 const Eigen::MatrixBase<DerivedPos>& e_recvPosMarker,
385 const Eigen::MatrixBase<DerivedVel>& e_recvVel,
386 const auto& recvClockDrift,
387 const std::shared_ptr<const SatelliteInfo>& satInfo,
388 const std::shared_ptr<const GnssObs>& gnssObs,
389 [[maybe_unused]]
const std::string& nameId)
const
391 auto e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
395 return e_pLOS.dot(satInfo->e_satVel - e_recvVel)
397 +
InsConst::C * (recvClockDrift - satInfo->satClockDrift);
418 const Eigen::Vector3d& e_recvPosMarker,
419 const Eigen::Vector3d& e_satPos,
421 const std::shared_ptr<const GnssObs>& gnssObs,
422 const std::shared_ptr<const SatNavData>& navData,
423 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
424 [[maybe_unused]]
const std::string& nameId,
429 Eigen::Vector3d e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
433 Eigen::Vector3d n_lineOfSightUnitVector =
trafo::n_Quat_e(lla_recvPosAPC(0), lla_recvPosAPC(1)) * e_pLOS;
440 double dpsr_I_r_s =
calculateIonosphericDelay(freq, freqNum, lla_recvPosAPC, gnssObs, ionosphericCorrections, elevation, azimuth);
442 double variance = 0.0;
463 variance += navData->calcSatellitePositionVariance()
482 template<
typename Derived>
485 const Eigen::MatrixBase<Derived>& e_recvPosMarker,
486 const std::shared_ptr<const GnssObs>& gnssObs,
487 [[maybe_unused]]
const std::string& nameId)
const
496 std::string antennaType;
499 antennaType = gnssObs->receiverInfo->get().antennaType;
503 antennaType = antenna.
name;
524 std::optional<double> azimuth,
526 const std::shared_ptr<const GnssObs>& gnssObs,
527 [[maybe_unused]]
const std::string& nameId)
const
529 if (std::isnan(elevation)
530 || (azimuth.has_value() && std::isnan(*azimuth))) {
return T(0.0); }
534 std::string antennaType;
537 antennaType = gnssObs->receiverInfo->get().antennaType;
541 antennaType = antenna.
name;
566 const Eigen::Vector3d& lla_recvPosAPC,
567 const std::shared_ptr<const GnssObs>& gnssObs,
568 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
570 double azimuth)
const
573 freq, freqNum, lla_recvPosAPC,
586 const std::shared_ptr<const GnssObs>& gnssObs,
589 [[maybe_unused]]
const std::string& nameId)
const
594 return tropo_r_s.ZHD * tropo_r_s.zhdMappingFactor + tropo_r_s.ZWD * tropo_r_s.zwdMappingFactor;
600 template<
typename ReceiverType>
603 bool changed =
false;
605 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
606 if (ImGui::TreeNode(fmt::format(
"Compensation models##{}",
id).c_str()))
608 ImGui::SetNextItemWidth(itemWidth - ImGui::GetStyle().IndentSpacing);
621 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
622 if (ImGui::TreeNode(fmt::format(
"GNSS Measurement Error##{}",
id).c_str()))
626 LOG_DEBUG(
"{}: GNSS Measurement Error Model changed.",
id);
632 if (ImGui::TreeNode(fmt::format(
"Antenna settings##{}",
id).c_str()))
638 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
639 if (!ImGui::TreeNode(fmt::format(
"{}",
static_cast<ReceiverType
>(i)).c_str())) {
continue; }
642 if (ImGui::Checkbox(fmt::format(
"Correct Phase-center offset##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).correctPCO))
648 if (ImGui::Checkbox(fmt::format(
"Correct Phase-center variation##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).correctPCV))
654 if (!
_antenna.at(i).correctPCO && !
_antenna.at(i).correctPCV) { ImGui::BeginDisabled(); }
655 if (ImGui::Checkbox(fmt::format(
"Auto determine##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).autoDetermine))
661 if (
_antenna.at(i).autoDetermine) { ImGui::BeginDisabled(); }
662 ImGui::SetNextItemWidth(itemWidth - (1.0F +
static_cast<float>(
_receiverCount > 1)) * ImGui::GetStyle().IndentSpacing);
664 if (ImGui::BeginCombo(fmt::format(
"Type##Combo {} {}",
id, i).c_str(),
_antenna.at(i).name.c_str()))
666 ImGui::PushFont(Application::MonoFont());
667 if (ImGui::Selectable(fmt::format(
"##Selectable {} {}",
id, i).c_str(),
_antenna.at(i).name.empty()))
674 const bool is_selected = (
_antenna.at(i).name == iter);
675 if (ImGui::Selectable(iter.c_str(), is_selected))
679 if (is_selected) { ImGui::SetItemDefaultFocus(); }
684 if (
_antenna.at(i).autoDetermine) { ImGui::EndDisabled(); }
685 if (!
_antenna.at(i).correctPCO && !
_antenna.at(i).correctPCV) { ImGui::EndDisabled(); }
689 ImGui::SetNextItemWidth(itemWidth - (1.0F +
static_cast<float>(
_receiverCount > 1)) * ImGui::GetStyle().IndentSpacing);
692 LOG_DEBUG(
"{}: Antenna {} delta: {}",
id, i,
_antenna.at(i).hen_delta.transpose());
697 "- Horizontal eccentricity of ARP relative to the marker (east/north)");
742 {
"name", obj.
name },
751 if (j.contains(
"correctPCO")) { j.at(
"correctPCO").get_to(obj.
correctPCO); }
752 if (j.contains(
"correctPCV")) { j.at(
"correctPCV").get_to(obj.
correctPCV); }
753 if (j.contains(
"autoDetermine")) { j.at(
"autoDetermine").get_to(obj.
autoDetermine); }
754 if (j.contains(
"name")) { j.at(
"name").get_to(obj.
name); }
755 if (j.contains(
"hen_delta")) { j.at(
"hen_delta").get_to(obj.
hen_delta); }
775 if (j.contains(
"ionosphereModel")) { j.at(
"ionosphereModel").get_to(obj.
_ionosphereModel); }
776 if (j.contains(
"troposphereModels")) { j.at(
"troposphereModels").get_to(obj.
_troposphereModels); }
778 if (j.contains(
"antenna")) { j.at(
"antenna").get_to(obj.
_antenna); }
GNSS Antenna related transformations.
Transformation collection.
nlohmann::json json
json namespace
Frequency definition for different satellite systems.
Galileo Ephemeris information.
GNSS Observation messages.
Text Help Marker (?) with Tooltip.
Defines how to save certain datatypes to json.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
Errors concerning GNSS observations.
Observation data used for calculations.
Structs identifying a unique satellite.
Values with an uncertainty (Standard Deviation)
std::optional< T > getAntennaPhaseCenterVariation(const std::string &antennaType, Frequency_ freq, const InsTime &insTime, const T &elevation, std::optional< double > azimuth, const std::string &nameId) const
Gets the phase center variation for given elevation and azimuth.
static AntexReader & Get()
Get the static Instance of the reader.
Frequency definition for different satellite systems.
SatelliteSystem getSatSys() const
Get the satellite system for which this frequency is defined.
Errors concerning GNSS observations.
ObservationType
Observation types.
@ Doppler
Doppler (Pseudorange rate)
@ ObservationType_COUNT
Count.
@ Pseudorange
Pseudorange.
static constexpr double C
Speed of light [m/s].
The class is responsible for all time-related tasks.
friend void to_json(json &j, const ObservationEstimator::Antenna &obj)
Converts the provided object into json.
const IonosphereModel & getIonosphereModel() const
Get the Ionosphere Model selected.
TroposphereModelSelection _troposphereModels
Troposphere Models used for the calculation.
friend void from_json(const json &j, ObservationEstimator &obj)
Converts the provided json object into a node object.
ObservationDifference
How the observation gets used. Influenced the measurement variance.
@ NoDifference
Estimation is not differenced.
@ DoubleDifference
Double Difference.
@ SingleDifference
Single Difference.
ObservationEstimator(size_t receiverCount)
Constructor.
GnssMeasurementErrorModel _gnssMeasurementErrorModel
GNSS measurement error model to use.
Eigen::Vector3< typename Derived::Scalar > e_calcRecvPosAPC(const Frequency &freq, size_t receiverType, const Eigen::MatrixBase< Derived > &e_recvPosMarker, const std::shared_ptr< const GnssObs > &gnssObs, const std::string &nameId) const
Calculates the antenna phase center position for the marker.
double calculateIonosphericDelay(const Frequency &freq, int8_t freqNum, const Eigen::Vector3d &lla_recvPosAPC, const std::shared_ptr< const GnssObs > &gnssObs, const std::shared_ptr< const IonosphericCorrections > &ionosphericCorrections, double elevation, double azimuth) const
Calculate the ionospheric delay with the model selected in the GUI.
const GnssMeasurementErrorModel & getGnssMeasurementErrorModel() const
Get the GNSS measurement error model.
size_t _receiverCount
Number of receivers (used for GUI)
IonosphereModel _ionosphereModel
Ionosphere Model used for the calculation.
double calcObservationVariance(Frequency freq, int8_t freqNum, size_t receiverType, GnssObs::ObservationType obsType, const Eigen::Vector3d &e_recvPosMarker, const Eigen::Vector3d &e_satPos, double cn0, const std::shared_ptr< const GnssObs > &gnssObs, const std::shared_ptr< const SatNavData > &navData, const std::shared_ptr< const IonosphericCorrections > &ionosphericCorrections, const std::string &nameId, ObservationDifference obsDiff) const
Calculates the observation variance.
void calcObservationEstimate(const SatSigId &satSigId, Observations::SignalObservation &observation, const Receiver< ReceiverType > &receiver, const std::shared_ptr< const IonosphericCorrections > &ionosphericCorrections, const std::string &nameId, ObservationDifference obsDiff) const
Calculates the observation estimate for the given signal.
double calculateTroposphericDelay(const Eigen::Vector3d &lla_recvPosAPC, const std::shared_ptr< const GnssObs > &gnssObs, double elevation, double azimuth, const std::string &nameId) const
Calculate the tropospheric delay with the model selected in the GUI.
std::pair< double, Eigen::Vector3d > calcCarrierEstimate(Frequency freq, int8_t freqNum, size_t receiverType, const Eigen::MatrixBase< Derived > &e_recvPosMarker, double recvClockBias, const std::shared_ptr< const SatelliteInfo > &satInfo, const std::shared_ptr< const GnssObs > &gnssObs, const std::shared_ptr< const IonosphericCorrections > &ionosphericCorrections, const std::string &nameId) const
Calculates the carrier-phase estimate.
bool ShowGuiWidgets(const char *id, float itemWidth)
Shows the GUI input to select the options.
const TroposphereModelSelection & getTroposphereModels() const
Get the Troposphere Model selection.
auto calcPseudorangeEstimate(Frequency freq, size_t receiverType, const Eigen::MatrixBase< Derived > &e_recvPosAPC, const auto &recvClockBias, const auto &interFreqBias, const auto &dpsr_T_r_s, const auto &dpsr_I_r_s, const std::shared_ptr< const SatelliteInfo > &satInfo, const auto &elevation, const std::shared_ptr< const GnssObs > &gnssObs, const std::string &nameId) const
Calculates the pseudorange estimate.
T calcPCV(const Frequency &freq, const InsTime &insTime, const T &elevation, std::optional< double > azimuth, size_t receiverType, const std::shared_ptr< const GnssObs > &gnssObs, const std::string &nameId) const
Calculates the phase center variation.
auto calcDopplerEstimate(Frequency freq, size_t receiverType, const Eigen::MatrixBase< DerivedPos > &e_recvPosMarker, const Eigen::MatrixBase< DerivedVel > &e_recvVel, const auto &recvClockDrift, const std::shared_ptr< const SatelliteInfo > &satInfo, const std::shared_ptr< const GnssObs > &gnssObs, const std::string &nameId) const
Calculates the doppler estimate.
friend void from_json(const json &j, ObservationEstimator::Antenna &obj)
Converts the provided json object into a node object.
std::unordered_map< size_t, Antenna > _antenna
User antenna selection. Key is receiver type.
friend void to_json(json &j, const ObservationEstimator &obj)
Converts the provided object into json.
void calcObservationEstimates(Observations &observations, const Receiver< ReceiverType > &receiver, const std::shared_ptr< const IonosphericCorrections > &ionosphericCorrections, const std::string &nameId, ObservationDifference obsDiff) const
Calculates the observation estimates.
bool InputDouble3(const char *label, double v[3], const char *format, ImGuiInputTextFlags flags)
Shows an InputText GUI element for an array of 'double[3]'.
Eigen::Vector3< typename Derived::Scalar > e_posMarker2ARP(const Eigen::MatrixBase< Derived > &e_posMarker, const std::shared_ptr< const GnssObs > &gnssObs, const Eigen::Vector3d &hen_delta=Eigen::Vector3d::Zero())
Converts a marker position to the antenna reference point position.
Eigen::Vector3< typename Derived::Scalar > ecef2lla_WGS84(const Eigen::MatrixBase< Derived > &e_position)
Converts Earth-centered-Earth-fixed coordinates into latitude, longitude and altitude using WGS84.
Eigen::Quaternion< Scalar > n_Quat_e(const Scalar &latitude, const Scalar &longitude)
Quaternion for rotations from Earth-fixed to navigation frame.
Eigen::Vector3< typename Derived::Scalar > e_posARP2APC(const Eigen::MatrixBase< Derived > &e_posARP, const std::shared_ptr< const GnssObs > &gnssObs, Frequency freq, const std::string &antennaType, const std::string &nameId)
Converts a antenna reference point position position to the antenna phase center position.
Frequency_
Enumerate for GNSS frequencies.
bool ComboTroposphereModel(const char *label, TroposphereModelSelection &troposphereModelSelection, float width)
Shows a ComboBox and button for advanced configuration to select the troposphere models.
Derived::Scalar calcSatElevation(const Eigen::MatrixBase< Derived > &n_lineOfSightUnitVector)
Calculates the elevation of the satellite from the antenna.
IonosphereModel
Available Ionosphere Models.
@ Klobuchar
Klobuchar model (GPS), also called Broadcast sometimes.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
DerivedA::Scalar calcSagnacCorrection(const Eigen::MatrixBase< DerivedA > &e_posAnt, const Eigen::MatrixBase< DerivedB > &e_satPos)
Calculates the Earth rotation/Sagnac correction.
double ionoErrorVar(double dpsr_I, Frequency freq, int8_t num)
Calculates the ionospheric error variance.
double tropoErrorVar(double dpsr_T, double elevation)
Calculates the tropospheric error variance.
bool ComboIonosphereModel(const char *label, IonosphereModel &ionosphereModel)
Shows a ComboBox to select the ionosphere model.
void move(std::vector< T > &v, size_t sourceIdx, size_t targetIdx)
Moves an element within a vector to a new position.
DerivedA::Scalar calcSagnacRateCorrection(const Eigen::MatrixBase< DerivedA > &e_recvPos, const Eigen::MatrixBase< DerivedB > &e_satPos, const Eigen::MatrixBase< DerivedC > &e_recvVel, const Eigen::MatrixBase< DerivedD > &e_satVel)
Calculates the Range-rate Earth rotation/Sagnac correction.
ZenithDelay calcTroposphericDelayAndMapping(const InsTime &insTime, const Eigen::Vector3d &lla_pos, double elevation, double, const TroposphereModelSelection &troposphereModels, const std::string &nameId)
Calculates the tropospheric zenith hydrostatic and wet delays and corresponding mapping factors.
Derived::Scalar calcSatAzimuth(const Eigen::MatrixBase< Derived > &n_lineOfSightUnitVector)
Calculates the azimuth of the satellite from the antenna.
double calcIonosphericDelay(double tow, Frequency freq, int8_t freqNum, const Eigen::Vector3d &lla_pos, double elevation, double azimuth, IonosphereModel ionosphereModel, const IonosphericCorrections *corrections)
Calculates the ionospheric delay.
Eigen::Vector3< typename DerivedA::Scalar > e_calcLineOfSightUnitVector(const Eigen::MatrixBase< DerivedA > &e_posAnt, const Eigen::MatrixBase< DerivedB > &e_posSat)
Calculates the line-of-sight unit vector from the user antenna to the satellite.
bool autoDetermine
Try determine antenna type from e.g. RINEX file.
Eigen::Vector3d hen_delta
Delta values of marker to antenna base.
bool correctPCV
Correct phase center variation.
std::string name
Type of the antenna for the Antex lookup.
bool correctPCO
Correct phase center offset.
Eigen::Vector3d e_satVel
Satellite velocity in ECEF frame [m/s].
SatelliteInfo(Eigen::Vector3d e_satPos, Eigen::Vector3d e_satVel, double satClockBias, double satClockDrift)
Constructor.
Eigen::Vector3d e_satPos
Satellite position in ECEF coordinates [m].
double satClockBias
Satellite clock bias [s].
double satClockDrift
Satellite clock drift [s/s].
Receiver specific observation of the signal.
int8_t freqNum() const
Frequency number. Only used for GLONASS G1 and G2.
std::unordered_map< size_t, std::shared_ptr< ReceiverSpecificData > > recvObs
Receiver specific data.
const std::shared_ptr< const SatNavData > & navData() const
Satellite Navigation data.
Observation storage type.
unordered_map< SatSigId, SignalObservation > signals
Observations and calculated data for each signal.
const double * biasFor(SatelliteSystem satSys) const
Get the bias for the given satellite system.
const double * driftFor(SatelliteSystem satSys) const
Get the drift for the given satellite system.
std::shared_ptr< const GnssObs > gnssObs
Latest GNSS observation.
std::unordered_map< Frequency, UncertainValue< double > > interFrequencyBias
Inter frequency biases [s].
ReceiverType type
Receiver Type.
Eigen::Vector3d e_posMarker
Marker Position in ECEF frame [m].
Eigen::Vector3d e_vel
Velocity in ECEF frame [m/s].
ReceiverClock recvClk
Estimated receiver clock parameters.
Identifies a satellite signal (satellite frequency and number)
Frequency freq() const
Returns the frequency of the satellite signal.
Collection of troposphere model selections.