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>
62 for (
size_t i = 0; i < receiverCount; i++)
82 template<
typename ReceiverType>
85 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
86 [[maybe_unused]]
const std::string& nameId,
89 LOG_DATA(
"{}: Calculating all observation estimates:", nameId);
90 for (
auto& [satSigId, observation] : observations.
signals)
103 template<
typename ReceiverType>
107 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
108 [[maybe_unused]]
const std::string& nameId,
111 LOG_DATA(
"{}: Calculating observation estimates for [{}]", nameId, satSigId);
115 auto& recvObs = observation.
recvObs.at(receiver.
type);
123 double elevation = recvObs->satElevation(e_recvPosAPC, lla_recvPosAPC);
124 double azimuth = recvObs->satAzimuth(e_recvPosAPC, lla_recvPosAPC);
125 Eigen::Vector3d e_pLOS = recvObs->e_pLOS(e_recvPosAPC);
128 double rho_r_s = (recvObs->e_satPos() - e_recvPosAPC).norm();
129 recvObs->terms.rho_r_s = rho_r_s;
133 recvObs->terms.tropoZenithDelay = tropo_r_s;
135 double dpsr_T_r_s = tropo_r_s.ZHD * tropo_r_s.zhdMappingFactor + tropo_r_s.ZWD * tropo_r_s.zwdMappingFactor;
136 recvObs->terms.dpsr_T_r_s = dpsr_T_r_s;
139 freq, observation.
freqNum(), lla_recvPosAPC, elevation, azimuth,
141 recvObs->terms.dpsr_I_r_s = dpsr_I_r_s;
144 recvObs->terms.dpsr_ie_r_s = dpsr_ie_r_s;
151 double cn0 = recvObs->gnssObsData().CN0.value_or(1.0);
155 for (
auto& [obsType, obsData] : recvObs->obs)
157 LOG_DATA(
"{}: [{}][{:11}][{:5}] Observation estimate", nameId, satSigId, obsType, receiver.
type);
161 obsData.estimate = rho_r_s
171 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Geometrical range", nameId, satSigId, obsType, receiver.
type, rho_r_s);
172 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Sagnac correction", nameId, satSigId, obsType, receiver.
type, dpsr_ie_r_s);
173 if (dpsr_T_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Tropospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_T_r_s); }
174 if (dpsr_I_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Ionospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_I_r_s); }
176 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Satellite clock bias", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().bias);
179 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m] Pseudorange estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
180 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Pseudorange measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
181 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
184 obsData.estimate = rho_r_s
194 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Geometrical range", nameId, satSigId, obsType, receiver.
type, rho_r_s);
195 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Sagnac correction", nameId, satSigId, obsType, receiver.
type, dpsr_ie_r_s);
196 if (dpsr_T_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m] Tropospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_T_r_s); }
197 if (dpsr_I_r_s != 0.0) {
LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Ionospheric delay", nameId, satSigId, obsType, receiver.
type, dpsr_I_r_s); }
199 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m] Satellite clock bias", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().bias);
201 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m] Carrier-phase estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
202 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m] Carrier-phase measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
203 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
206 obsData.estimate = e_pLOS.dot(recvObs->e_satVel() - receiver.
e_vel)
210 - recvObs->satClock().drift);
212 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m/s] ", nameId, satSigId, obsType, receiver.
type, e_pLOS.dot(recvObs->e_satVel() - receiver.
e_vel));
213 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()));
215 LOG_DATA(
"{}: [{}][{:11}][{:5}] - {:.4f} [m/s] Satellite clock drift", nameId, satSigId, obsType, receiver.
type,
InsConst::C * recvObs->satClock().drift);
216 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4f} [m/s] Doppler estimate", nameId, satSigId, obsType, receiver.
type, obsData.estimate);
217 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4f} [m/s] Doppler measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement);
218 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4e} [m/s] Difference to measurement", nameId, satSigId, obsType, receiver.
type, obsData.measurement - obsData.estimate);
223 LOG_DATA(
"{}: [{}][{:11}][{:5}] Observation error variance", nameId, satSigId, obsType, receiver.
type);
224 LOG_DATA(
"{}: [{}][{:11}][{:5}] {:.4g} [{}] Measurement error variance", nameId, satSigId, obsType, receiver.
type, obsData.measVar,
231 obsData.measVar += observation.
navData()->calcSatellitePositionVariance()
234 LOG_DATA(
"{}: [{}][{:11}][{:5}] + {:.4f} [m^2] Satellite position variance", nameId, satSigId, obsType, receiver.
type, observation.
navData()->calcSatellitePositionVariance());
235 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())); }
236 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)); }
244 LOG_DATA(
"{}: [{}][{:11}][{:5}] = {:.4g} [{}] Observation error variance", nameId, satSigId, obsType, receiver.
type, obsData.measVar,
279 template<
typename Derived>
282 const Eigen::MatrixBase<Derived>& e_recvPosAPC,
283 const auto& recvClockBias,
284 const auto& interFreqBias,
285 const auto& dpsr_T_r_s,
286 const auto& dpsr_I_r_s,
287 const std::shared_ptr<const SatelliteInfo>& satInfo,
288 const auto& elevation,
289 const std::shared_ptr<const GnssObs>& gnssObs,
290 [[maybe_unused]]
const std::string& nameId)
const
293 auto rho_r_s = (satInfo->e_satPos - e_recvPosAPC).norm();
303 auto pcv =
calcPCV(freq, gnssObs->insTime, elevation, std::nullopt, receiverType, gnssObs, nameId);
309 +
InsConst::C * (recvClockBias - satInfo->satClockBias + interFreqBias)
324 template<
typename Derived>
325 std::pair<double, Eigen::Vector3d>
329 const Eigen::MatrixBase<Derived>& e_recvPosMarker,
330 double recvClockBias,
331 const std::shared_ptr<const SatelliteInfo>& satInfo,
332 const std::shared_ptr<const GnssObs>& gnssObs,
333 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
334 [[maybe_unused]]
const std::string& nameId)
const
336 Eigen::Vector3d e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
340 Eigen::Vector3d n_lineOfSightUnitVector =
trafo::n_Quat_e(lla_recvPosAPC(0), lla_recvPosAPC(1)) * e_pLOS;
345 double rho_r_s = (satInfo->e_satPos - e_recvPosAPC).norm();
349 double dpsr_I_r_s =
calculateIonosphericDelay(freq, freqNum, lla_recvPosAPC, gnssObs, ionosphericCorrections, elevation, azimuth);
358 auto pcv =
calcPCV(freq, gnssObs->insTime, elevation, std::nullopt, receiverType, gnssObs, nameId);
360 double estimate = rho_r_s
364 +
InsConst::C * (recvClockBias - satInfo->satClockBias )
367 return { estimate, e_pLOS };
380 template<
typename DerivedPos,
typename DerivedVel>
383 const Eigen::MatrixBase<DerivedPos>& e_recvPosMarker,
384 const Eigen::MatrixBase<DerivedVel>& e_recvVel,
385 const auto& recvClockDrift,
386 const std::shared_ptr<const SatelliteInfo>& satInfo,
387 const std::shared_ptr<const GnssObs>& gnssObs,
388 [[maybe_unused]]
const std::string& nameId)
const
390 auto e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
394 return e_pLOS.dot(satInfo->e_satVel - e_recvVel)
396 +
InsConst::C * (recvClockDrift - satInfo->satClockDrift);
417 const Eigen::Vector3d& e_recvPosMarker,
418 const Eigen::Vector3d& e_satPos,
420 const std::shared_ptr<const GnssObs>& gnssObs,
421 const std::shared_ptr<const SatNavData>& navData,
422 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
423 [[maybe_unused]]
const std::string& nameId,
428 Eigen::Vector3d e_recvPosAPC =
e_calcRecvPosAPC(freq, receiverType, e_recvPosMarker, gnssObs, nameId);
432 Eigen::Vector3d n_lineOfSightUnitVector =
trafo::n_Quat_e(lla_recvPosAPC(0), lla_recvPosAPC(1)) * e_pLOS;
439 double dpsr_I_r_s =
calculateIonosphericDelay(freq, freqNum, lla_recvPosAPC, gnssObs, ionosphericCorrections, elevation, azimuth);
441 double variance = 0.0;
462 variance += navData->calcSatellitePositionVariance()
481 template<
typename Derived>
484 const Eigen::MatrixBase<Derived>& e_recvPosMarker,
485 const std::shared_ptr<const GnssObs>& gnssObs,
486 [[maybe_unused]]
const std::string& nameId)
const
495 std::string antennaType;
498 antennaType = gnssObs->receiverInfo->get().antennaType;
502 antennaType = antenna.
name;
523 std::optional<double> azimuth,
525 const std::shared_ptr<const GnssObs>& gnssObs,
526 [[maybe_unused]]
const std::string& nameId)
const
528 if (std::isnan(elevation)
529 || (azimuth.has_value() && std::isnan(*azimuth))) {
return T(0.0); }
533 std::string antennaType;
536 antennaType = gnssObs->receiverInfo->get().antennaType;
540 antennaType = antenna.
name;
565 const Eigen::Vector3d& lla_recvPosAPC,
566 const std::shared_ptr<const GnssObs>& gnssObs,
567 const std::shared_ptr<const IonosphericCorrections>& ionosphericCorrections,
569 double azimuth)
const
572 freq, freqNum, lla_recvPosAPC,
585 const std::shared_ptr<const GnssObs>& gnssObs,
588 [[maybe_unused]]
const std::string& nameId)
const
593 return tropo_r_s.ZHD * tropo_r_s.zhdMappingFactor + tropo_r_s.ZWD * tropo_r_s.zwdMappingFactor;
599 template<
typename ReceiverType>
602 bool changed =
false;
604 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
605 if (ImGui::TreeNode(fmt::format(
"Compensation models##{}",
id).c_str()))
607 ImGui::SetNextItemWidth(itemWidth - ImGui::GetStyle().IndentSpacing);
620 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
621 if (ImGui::TreeNode(fmt::format(
"GNSS Measurement Error##{}",
id).c_str()))
625 LOG_DEBUG(
"{}: GNSS Measurement Error Model changed.",
id);
631 if (ImGui::TreeNode(fmt::format(
"Antenna settings##{}",
id).c_str()))
637 ImGui::SetNextItemOpen(
true, ImGuiCond_FirstUseEver);
638 if (!ImGui::TreeNode(fmt::format(
"{}",
static_cast<ReceiverType
>(i)).c_str())) {
continue; }
641 if (ImGui::Checkbox(fmt::format(
"Correct Phase-center offset##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).correctPCO))
647 if (ImGui::Checkbox(fmt::format(
"Correct Phase-center variation##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).correctPCV))
653 if (!
_antenna.at(i).correctPCO && !
_antenna.at(i).correctPCV) { ImGui::BeginDisabled(); }
654 if (ImGui::Checkbox(fmt::format(
"Auto determine##antenna {} {}",
id, i).c_str(), &
_antenna.at(i).autoDetermine))
660 if (
_antenna.at(i).autoDetermine) { ImGui::BeginDisabled(); }
661 ImGui::SetNextItemWidth(itemWidth - (1.0F +
static_cast<float>(
_receiverCount > 1)) * ImGui::GetStyle().IndentSpacing);
663 if (ImGui::BeginCombo(fmt::format(
"Type##Combo {} {}",
id, i).c_str(),
_antenna.at(i).name.c_str()))
665 ImGui::PushFont(Application::MonoFont());
666 if (ImGui::Selectable(fmt::format(
"##Selectable {} {}",
id, i).c_str(),
_antenna.at(i).name.empty()))
673 const bool is_selected = (
_antenna.at(i).name == iter);
674 if (ImGui::Selectable(iter.c_str(), is_selected))
678 if (is_selected) { ImGui::SetItemDefaultFocus(); }
683 if (
_antenna.at(i).autoDetermine) { ImGui::EndDisabled(); }
684 if (!
_antenna.at(i).correctPCO && !
_antenna.at(i).correctPCV) { ImGui::EndDisabled(); }
688 ImGui::SetNextItemWidth(itemWidth - (1.0F +
static_cast<float>(
_receiverCount > 1)) * ImGui::GetStyle().IndentSpacing);
691 LOG_DEBUG(
"{}: Antenna {} delta: {}",
id, i,
_antenna.at(i).hen_delta.transpose());
696 "- Horizontal eccentricity of ARP relative to the marker (east/north)");
741 {
"name", obj.
name },
750 if (j.contains(
"correctPCO")) { j.at(
"correctPCO").get_to(obj.
correctPCO); }
751 if (j.contains(
"correctPCV")) { j.at(
"correctPCV").get_to(obj.
correctPCV); }
752 if (j.contains(
"autoDetermine")) { j.at(
"autoDetermine").get_to(obj.
autoDetermine); }
753 if (j.contains(
"name")) { j.at(
"name").get_to(obj.
name); }
754 if (j.contains(
"hen_delta")) { j.at(
"hen_delta").get_to(obj.
hen_delta); }
774 if (j.contains(
"ionosphereModel")) { j.at(
"ionosphereModel").get_to(obj.
_ionosphereModel); }
775 if (j.contains(
"troposphereModels")) { j.at(
"troposphereModels").get_to(obj.
_troposphereModels); }
777 if (j.contains(
"antenna")) { j.at(
"antenna").get_to(obj.
_antenna); }
GNSS Antenna related transformations.
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.
Definition Antenna.hpp:33
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.
Definition Antenna.hpp:89
Transformation collection.
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.
Definition CoordinateFrames.hpp:420
Eigen::Quaternion< Scalar > n_Quat_e(const Scalar &latitude, const Scalar &longitude)
Quaternion for rotations from Earth-fixed to navigation frame.
Definition CoordinateFrames.hpp:320
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Frequency definition for different satellite systems.
Frequency_
Enumerate for GNSS frequencies.
Definition Frequency.hpp:26
Galileo Ephemeris information.
Derived::Scalar calcSatElevation(const Eigen::MatrixBase< Derived > &n_lineOfSightUnitVector)
Calculates the elevation of the satellite from the antenna.
Definition Functions.hpp:43
DerivedA::Scalar calcSagnacCorrection(const Eigen::MatrixBase< DerivedA > &e_posAnt, const Eigen::MatrixBase< DerivedB > &e_satPos)
Calculates the Earth rotation/Sagnac correction.
Definition Functions.hpp:66
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.
Definition Functions.hpp:81
Derived::Scalar calcSatAzimuth(const Eigen::MatrixBase< Derived > &n_lineOfSightUnitVector)
Calculates the azimuth of the satellite from the antenna.
Definition Functions.hpp:54
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.
Definition Functions.hpp:31
GNSS Observation messages.
Text Help Marker (?) with Tooltip.
void HelpMarker(const char *desc, const char *symbol="(?)")
Text Help Marker, e.g. '(?)', with Tooltip.
IonosphereModel
Available Ionosphere Models.
Definition Ionosphere.hpp:28
@ Klobuchar
Klobuchar model (GPS), also called Broadcast sometimes.
Definition Ionosphere.hpp:30
double ionoErrorVar(double dpsr_I, Frequency freq, int8_t num)
Calculates the ionospheric error variance.
bool ComboIonosphereModel(const char *label, IonosphereModel &ionosphereModel)
Shows a ComboBox to select the ionosphere model.
double calcIonosphericDelay(double tow, Frequency freq, int8_t freqNum, const Eigen::Vector3d &lla_pos, double elevation, double azimuth, IonosphereModel ionosphereModel=IonosphereModel::None, const IonosphericCorrections *corrections=nullptr)
Calculates the ionospheric delay.
Defines how to save certain datatypes to json.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
Definition Logger.hpp:67
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
Definition Logger.hpp:29
Errors concerning GNSS observations.
Observation data used for calculations.
Structs identifying a unique satellite.
bool ComboTroposphereModel(const char *label, TroposphereModelSelection &troposphereModelSelection, float width=0.0F)
Shows a ComboBox and button for advanced configuration to select the troposphere models.
double tropoErrorVar(double dpsr_T, double elevation)
Calculates the tropospheric error variance.
ZenithDelay calcTroposphericDelayAndMapping(const InsTime &insTime, const Eigen::Vector3d &lla_pos, double elevation, double azimuth, const TroposphereModelSelection &troposphereModels, const std::string &nameId)
Calculates the tropospheric zenith hydrostatic and wet delays and corresponding mapping factors.
Values with an uncertainty (Standard Deviation)
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:27
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.
Definition AntexReader.hpp:395
static AntexReader & Get()
Get the static Instance of the reader.
Definition AntexReader.hpp:98
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
SatelliteSystem getSatSys() const
Get the satellite system for which this frequency is defined.
Definition Frequency.hpp:152
Errors concerning GNSS observations.
Definition MeasurementErrors.hpp:31
ObservationType
Observation types.
Definition GnssObs.hpp:37
@ Doppler
Doppler (Pseudorange rate)
Definition GnssObs.hpp:40
@ ObservationType_COUNT
Count.
Definition GnssObs.hpp:41
@ Carrier
Carrier-Phase.
Definition GnssObs.hpp:39
@ Pseudorange
Pseudorange.
Definition GnssObs.hpp:38
static constexpr double C
Speed of light [m/s].
Definition Constants.hpp:34
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
friend void to_json(json &j, const ObservationEstimator::Antenna &obj)
Converts the provided object into json.
Definition ObservationEstimator.hpp:735
const IonosphereModel & getIonosphereModel() const
Get the Ionosphere Model selected.
Definition ObservationEstimator.hpp:707
TroposphereModelSelection _troposphereModels
Troposphere Models used for the calculation.
Definition ObservationEstimator.hpp:715
friend void from_json(const json &j, ObservationEstimator &obj)
Converts the provided json object into a node object.
Definition ObservationEstimator.hpp:772
ObservationDifference
How the observation gets used. Influenced the measurement variance.
Definition ObservationEstimator.hpp:70
@ NoDifference
Estimation is not differenced.
Definition ObservationEstimator.hpp:71
@ DoubleDifference
Double Difference.
Definition ObservationEstimator.hpp:73
@ SingleDifference
Single Difference.
Definition ObservationEstimator.hpp:72
ObservationEstimator(size_t receiverCount)
Constructor.
Definition ObservationEstimator.hpp:59
GnssMeasurementErrorModel _gnssMeasurementErrorModel
GNSS measurement error model to use.
Definition ObservationEstimator.hpp:716
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.
Definition ObservationEstimator.hpp:482
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.
Definition ObservationEstimator.hpp:563
const GnssMeasurementErrorModel & getGnssMeasurementErrorModel() const
Get the GNSS measurement error model.
Definition ObservationEstimator.hpp:711
size_t _receiverCount
Number of receivers (used for GUI)
Definition ObservationEstimator.hpp:718
IonosphereModel _ionosphereModel
Ionosphere Model used for the calculation.
Definition ObservationEstimator.hpp:714
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.
Definition ObservationEstimator.hpp:413
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.
Definition ObservationEstimator.hpp:104
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.
Definition ObservationEstimator.hpp:584
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.
Definition ObservationEstimator.hpp:326
bool ShowGuiWidgets(const char *id, float itemWidth)
Shows the GUI input to select the options.
Definition ObservationEstimator.hpp:600
const TroposphereModelSelection & getTroposphereModels() const
Get the Troposphere Model selection.
Definition ObservationEstimator.hpp:709
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.
Definition ObservationEstimator.hpp:280
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.
Definition ObservationEstimator.hpp:520
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.
Definition ObservationEstimator.hpp:381
friend void from_json(const json &j, ObservationEstimator::Antenna &obj)
Converts the provided json object into a node object.
Definition ObservationEstimator.hpp:748
std::unordered_map< size_t, Antenna > _antenna
User antenna selection. Key is receiver type.
Definition ObservationEstimator.hpp:730
friend void to_json(json &j, const ObservationEstimator &obj)
Converts the provided object into json.
Definition ObservationEstimator.hpp:760
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.
Definition ObservationEstimator.hpp:83
bool InputDouble3(const char *label, double v[3], const char *format="%.6f", ImGuiInputTextFlags flags=0)
Shows an InputText GUI element for an array of 'double[3]'.
Antenna information.
Definition ObservationEstimator.hpp:722
bool autoDetermine
Try determine antenna type from e.g. RINEX file.
Definition ObservationEstimator.hpp:725
Eigen::Vector3d hen_delta
Delta values of marker to antenna base.
Definition ObservationEstimator.hpp:727
bool correctPCV
Correct phase center variation.
Definition ObservationEstimator.hpp:724
std::string name
Type of the antenna for the Antex lookup.
Definition ObservationEstimator.hpp:726
bool correctPCO
Correct phase center offset.
Definition ObservationEstimator.hpp:723
Eigen::Vector3d e_satVel
Satellite velocity in ECEF frame [m/s].
Definition ObservationEstimator.hpp:261
SatelliteInfo(Eigen::Vector3d e_satPos, Eigen::Vector3d e_satVel, double satClockBias, double satClockDrift)
Constructor.
Definition ObservationEstimator.hpp:257
Eigen::Vector3d e_satPos
Satellite position in ECEF coordinates [m].
Definition ObservationEstimator.hpp:260
double satClockBias
Satellite clock bias [s].
Definition ObservationEstimator.hpp:262
double satClockDrift
Satellite clock drift [s/s].
Definition ObservationEstimator.hpp:263
Receiver specific observation of the signal.
Definition Observation.hpp:44
int8_t freqNum() const
Frequency number. Only used for GLONASS G1 and G2.
Definition Observation.hpp:198
std::unordered_map< size_t, std::shared_ptr< ReceiverSpecificData > > recvObs
Receiver specific data.
Definition Observation.hpp:193
const std::shared_ptr< const SatNavData > & navData() const
Satellite Navigation data.
Definition Observation.hpp:196
Observation storage type.
Definition Observation.hpp:41
unordered_map< SatSigId, SignalObservation > signals
Observations and calculated data for each signal.
Definition Observation.hpp:205
const double * biasFor(SatelliteSystem satSys) const
Get the bias for the given satellite system.
Definition ReceiverClock.hpp:81
const double * driftFor(SatelliteSystem satSys) const
Get the drift for the given satellite system.
Definition ReceiverClock.hpp:115
Receiver information.
Definition Receiver.hpp:34
std::shared_ptr< const GnssObs > gnssObs
Latest GNSS observation.
Definition Receiver.hpp:54
std::unordered_map< Frequency, UncertainValue< double > > interFrequencyBias
Inter frequency biases [s].
Definition Receiver.hpp:52
ReceiverType type
Receiver Type.
Definition Receiver.hpp:42
Eigen::Vector3d e_posMarker
Marker Position in ECEF frame [m].
Definition Receiver.hpp:44
Eigen::Vector3d e_vel
Velocity in ECEF frame [m/s].
Definition Receiver.hpp:48
ReceiverClock recvClk
Estimated receiver clock parameters.
Definition Receiver.hpp:50
Identifies a satellite signal (satellite frequency and number)
Definition SatelliteIdentifier.hpp:67
Frequency freq() const
Returns the frequency of the satellite signal.
Definition SatelliteIdentifier.hpp:108
Satellite System type.
Definition SatelliteSystem.hpp:44
Collection of troposphere model selections.
Definition Troposphere.hpp:63