GNSS attitude by GenericGNSS

Hi everybody,

I’m using OnBoardAntennaOneWayGNSSPhaseModifier to add the antenna offset modifier of a LEO satellite into the OneWayGNSSPhase measurement.

OneWayGNSSPhase requires AttitudeProvider for GNSS satellites. I’m using GenericGNSS to define this Attitude Provider (Please let me know if I’m mistaken!).

GenericGNSS constructor is:

    public GenericGNSS(AbsoluteDate validityStart,
                   AbsoluteDate validityEnd,
                   ExtendedPVCoordinatesProvider sun,
                   Frame inertialFrame)

I assume that the validityStart is the epoch of the measurement. How about the validityEnd?
and how can I generate ExtendedPVCoordinatesProvider sun? I’m a newbie in Java.

Your help is appreciated in advance.
Best regards

Hi Amir,

The validityStart and validityEnd correspond in fact to very large period (years!). They are intended to handle cases when the satellite managing one PRN is switched to another satellite of a different model (with a different attitude model), for example when a GPS block IIA is replaced by a GPS block IIF. Such changes are published by coast guards NANUS bulletins (if I remember well) and are also present in the antex files. The GenericGNSS attitude is used when one does not have a more precise model. It is good enough for many purposes, but may fail around eclipses and noon turns where different satellite models behave differently.

The nominal way to handle this is complicated and… undocumented (my bad). Here is how you could do it, assuming you get the PRN/satellite type mapping from an antex file following IGS naming and located in your orekit-data folder

  AntexLoader loader = new AntexLoader(AntexLoader.DEFAULT_ANTEX_SUPPORTED_NAMES,
  // the following should be done for each satellite you manage
  TimeSpanMap<SatelliteAntenna> tsm = loader.findSatelliteAntenna(satelliteSystem, prnNumber);
  TimeSpanMap.Span<SatelliteAntenna> span = tsm.getSpan(someDate);
  SatelliteType type = span.getData().getSatelliteType();
  GNSSAttitudeProvider provider = type.buildAttitudeProvider(span.getStart(),

With this, you should get either the exact attitude mode even valid during eclipse and noon turns, or the generic mode. You could improve this to check if you need to change the model during simulation (if satellite handling this PRN changes, in fact, which is not frequent)

1 Like

Thank you, @luc. I understood the attitude part.

About the sun in

GNSSAttitudeProvider provider = type.buildAttitudeProvider(span.getStart(),

I have used CelestialBodyFactory.getSun(), is it correct? I assume that the sun positions will be interpolated by using JPL ephemeris.

Yes, the Sun in the code snippet above is the celestial body, and it comes from JPL ephemerides.

1 Like