PVCoordinatesProvider for deep sky objects

Hi,
I’m a new Orekit user, I have a degree in Physics, but I’m not very expert in space dynamics. In any case I’m having fun with Orekit trying to study sources and tests. I’m using some predefined detectors and I would like to use a PVCoordinatesProvider implementation for deep sky objects or stars: is it possible? Can someone help me?
Thanks in advance!

Matteo

Hi @Teo

Welcome to the Orekit forum.

I suggest you to use AbsolutePVCoordinates class to define the coordinates. This class is an a PVCoordinatesProvider implementation. The main advantage of this class is that PV coordinates can be extrapolated for both inertial and non-inertial frames. Please note that you have to use, at least, Orekit 10.0 to use this class.

Regards,
Bryan

Are you actually looking for PV coordinates or are you looking for some sort of angular coordinates type representation to do look angles? For solar system objects you can do either but for stars you’ll probably want to do angles only. What sort of analysis are you trying to perform?

Thanks for your answers.

I’m using a TLEPropagator with satellite TLE elements. Then I use an AngularSeparationDetector where I’d want to use:

  • as field “observer” the topocentric frame of my observation point on Earth
  • as field “beacon” the deep sky object PVCoordinatesProvider I’m asking for

If possible can you help me also with a short example of the AbsolutePVCoordinates or the implementation I need? I’ve already written the code for using propagator and detector in this case, I don’t know how write the deep sky object PVCoordinatesProvider implementation.

Thanks in advance again!

1 Like

Hi @Teo,

How is your deep sky object defined in the first place ? With right ascension/declination in an inertial frame ?
If so you can build a class that extends the PVCoordinatesProvider interface quite easily:

  • Assuming your deep space object is fixed (relative to Earth on a reasonable time span);
  • Giving it an arbitrary long distance D, say D = 1 light-year (a very close star :wink:)
  • Constructor takes the input inertial frame (J2000 here) and the two input angles and builds the constant PVCoordinates in J2000 using:
dsoPositionJ2000 = new Vector3D(right-ascension, declination).scalarMultiply(D);
dsoPVJ2000 = new PVCoordinates(dsoPosition, Vector3D.ZERO);
  • Then the getPVCoordinates(date, frame) does:
return new TimeStampedPVCoordinates(date, J2000.getTransformTo(frame, date).transformPVCoordinates(dsoPVJ2000));

Is it something like that you’re looking for ?
(Note that I haven’t tested the code; there may be typos in it).

Regards,
Maxime

Thanks for your answer, this is what I was looking for. I will try it!
Thanks again!

Hi,
I resume this old conversation because I have a problem in my code and it seems the problem is in PVCoordinates I use for deep sky objects, so I write this code to test it: here I calculate azimut and altitude for Rigel star from London and compare them with values from Stellarium to verify if it works correctly, but the values does not match.
Can you help me to understand where is the error?
Thanks in advance!

AbsoluteDate date = new AbsoluteDate(2020, 12, 05, 23, 00, 00.000, TimeScalesFactory.getUTC());

    Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
    BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
            Constants.WGS84_EARTH_FLATTENING,
            earthFrame);

    final double longitude = FastMath.toRadians(0.1257);
    final double latitude = FastMath.toRadians(51.5085);
    final GeodeticPoint station1 = new GeodeticPoint(latitude, longitude, 25);
    TopocentricFrame topocentricFrame = new TopocentricFrame(earth, station1, "station1");

    Double rightAscension = 78.6345;
    Double declination = -8.2016;
    int distance = 860;

    Vector3D dsoPositionJ2000 = new Vector3D(FastMath.toRadians(rightAscension), FastMath.toRadians(declination)).scalarMultiply(distance);
    PVCoordinates pvCoordinates1 = new PVCoordinates(dsoPositionJ2000, Vector3D.ZERO);

    PVCoordinates pvCoordinates = new TimeStampedPVCoordinates(date, FramesFactory.getEME2000().getTransformTo(topocentricFrame, date).transformPVCoordinates(pvCoordinates1));

    Double azimut = (FastMath.toDegrees(pvCoordinates.getPosition().getAlpha()) - 90) * -1;
    Double altitude = FastMath.toDegrees(pvCoordinates.getPosition().getDelta());

    System.out.println("Calculated azimut: " + azimut);
    System.out.println("Calculated altitude: " + altitude);

    System.out.println("Expected azimut: 158° 46' 10.7");
    System.out.println("Expected altitude: 28° 10' 54.9");

The output is:

Calculated azimut: 0.7709563133729631
Calculated altitude: -89.81872323868046
Expected azimut: 158° 46’ 10.7
Expected altitude: 28° 10’ 54.9

Hi @Teo

According to your example, Rigel is a little too close to the Earth (i.e. 860 meters) :slightly_smiling_face:

You have just to change

int distance = 860;

into

double distance = 860.0 * Constants.JULIAN_YEAR * Constants.SPEED_OF_LIGHT;

and your results will be better (i.e. Calculated azimut: 159.0512257106477 Calculated altitude: 28.207945881723063).

Please note that you can directly compute the angles thanks to the topocentricFrame object. It allows removing two lines in your example. Here the way to compute the angles directly using topocentricFrame:

Double azimut = FastMath.toDegrees(topocentricFrame.getAzimuth(dsoPositionJ2000, FramesFactory.getEME2000(), date));
Double altitude = FastMath.toDegrees(topocentricFrame.getElevation(dsoPositionJ2000, FramesFactory.getEME2000(), date));

Best regards,
Bryan

If you want to improve again your results, you can also use the longitude at London center: -0.1273 degrees. I think this is the value used by Stellarium.

By updating London longitude I have

Calculated azimut: 158.7744907605066 = 156° 46’ 28.1
Calculated altitude: 28.151291280822647 = 28° 9’ 4.6

Stellarium may also take into account refraction, and I don’t know it it knows about EOP.