1
$\begingroup$

I started using OreKit in a 3D star charting app I am writing in JavaFX. I wanted to convert from equatorial to galactic coordinates. I can do it simply by using the transformations, but I wanted to use Orekit, so I'm not writing code when a library will do. The docs in Orekit aren't very good, so I did a search and found this:

   Frame icrf = FramesFactory.getICRF();
   Frame galactic = FramesFactory.getGalactic();
   ... more code

Frame galactic = FramesFactory.getGalactic(); doesn't seem to exist anymore in Orekit, and I can't seem to find what replaces it.

Anyone know?

$\endgroup$

1 Answer 1

3
$\begingroup$

I'm not sure Orekit can handle the Galactic coordinate system; as a library primarily for close-to-Earth spacecraft, it would presumably be of limited use to support these coordinates. (I couldn't find any references to your getGalactic() method in the Orekit docs or with a Google search of the site).

I have very little familiarity with Java and zero with Orekit but I think you could perform this using by constructing a Transform (API docs) and feeding it a Rotation constructed from a 3x3 rotation matrix which is documented here. The rotation matrix to transform ICRS coordinates (which are supported by Orekit) to Galactic coordinates are given in the C source code for the SOFA routine iauIcrs2g. I have cut and pasted these into the "Java like" code below based on the Orekit API docs but have not tested it any way.

double galrotm[3][3] = { { -0.054875560416215368492398900454,
                           -0.873437090234885048760383168409,
                           -0.483835015548713226831774175116 },
                         { +0.494109427875583673525222371358,
                           -0.444829629960011178146614061616,
                           +0.746982244497218890527388004556 },
                         { -0.867666149019004701181616534570,
                           -0.198076373431201528180486091412,
                           +0.455983776175066922272100478348 } };
Rotation rotation = new Rotation(galrotm, threshold);
Vector3D rotationRate = new Vector3D(0, 0, 0);

Transform ICRStoGal = new Transform(rotation, rotationRate);

HEASARC has a converter that can take either object names or coordinates and convert them to galactic and ecliptic coordinates; an example for the high mass X-ray/black hole binary Cyg X-1 is shown in the screenshot below (values under the Galactic L and B headings):

Screenshot of the HEASARC tool showing an example of how to convert to galactic coordinates

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .