Remote clock model in OneWayGNSSRangeBuilder

Hi all, I have been trying to figure out how to set the remote clock model in GNSS range measurement. I read the discussion in this topic remote clock model in OneWayGNSS, but unfortunately now the current version of the builder does not allow to include a custom clock model. It simply takes the quadratic clock model of the remote. I created the ObservableSatellite variable related to the remote through the following piece of code

sp3_prop = EphemerisFile.SatelliteEphemeris.cast_(sp3_ephemeris.get(item)).getPropagator()
# add BoundedPropagator to the generator
gnss_satellite = generator.addPropagator(sp3_prop, item)

As far as I understood, the output of sp3_ephemeris.get(item) correctly fills the AggregatedClockModel attribute of SP3Ephemeris output, but the ObservableSatellite variable gnss_satellite

  • has a different model which belongs to class QuadraticClockModel
  • has the attribute of type QuadraticClockModel which is uninitialized (I tried to print the offset at a certain absolute date with pdb debugger and it returns 0, whereas for the same absolute date the offset for the aggregated clock model is non-zero)

How could I move the info about clock offset from one model to another? Thank you in advance for your suggestions.

I understand your concerns. I am not happy with the current design either, but had to change to this for proper handling of derivatives.

When clock is not estimated as a continuous model but is in fact already known (estimated as snapshots, or loaded from SP3, or loaded from Rinex clock, or modeled by a custom method), then it is not the ObservableSatellite that should handle it, but rather a measurement modifier.

Do you use this form measurements generation or for orbit determination and time synchronisation?

Hi @luc , thank you very much for your quick reply. I am using for measurement generation. In particular, after the creation of the instance of OneWayGNSSRangeBuilder I am going to use it for the EventBasedScheduler. If you want, I can post some more code to better clarify.

So for measurement generation, I would definitely set up a measurement modifier that holds references to the receiver and emitter ClockModel. These models would be SampledClockModel or AggregatedClockModel types, extracted from the SP3.

In fact, this is exactly what I do as I am working on a Rinex measurements generator (sorry, I cannot share any code about this). What I can say, is that I don’t use the clocks from ObservableSatellite, and I don’t use the various clock drivers from it either. My custom implementations of EstimationModifier (one for ground receivers and one for spaceborne receivers) hold the sampled/aggregated clock models and apply them.

Thank you again for your answer, very much appreciated. Just a couple of further questions:

  • the clock model retrieved after parsing file .sp3 is not the one coming from the corresponding file .clk_30s? I would like to use this one to obtain more precise offset and as far as I understood this file is in RINEX format.
  • the clock offset model passed to OneWayGNSSRangeBuilder is applied to the observable? Or it must be added after the generation of the measurement?

The clock model can come from an SP3 or a clock file. If you have both, then the clock file is better as it has a higher rate (this was the goal of clock files).

The clock offset model should be applied afterwards.

In fact, I now think that the clocks handling in both ObservableSatellite, the {InterSatellite, OneWay}GNSS{Range, Phase, RangeRate}Builder, and the {InterSatellite, OneWay}GNSS{Range, Phase, RangeRate} should be completely removed and that modifiers should be used instead. This would allow more flexibility to users, for example to add error models, or feared events. In the GNSS world, clocks are really important stuff and need their own dedicated handling.

I created a new topic to discuss about evolution of the ObservableSatellite class and GNSS measurements.