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 )
- 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).