Hi Miaomiao,
AbsoluteDate initialDate = new AbsoluteDate(2019, 03, 04, 19, 23, 19.107, utc);
Here, you should rather use AbsoluteDate(2019, 3, 4, 19, 23, 19.107, utc)
, i.e. without the leading 0 in the integer arguments because in Java (just like C or C++) an integer starting with 0 is considered in base 8, so you could for example not write 08 or 09. This is weird, I agree.
The result is: P(-5532934.557015174, -4451643.020879899, -20342.986059240364),
V(2227.74214972784, -2777.2138597461817,6286.218464870787)
But the result I got from STK is: P(-5532965.653, -4451604.404, -20335.815)
V(2227.721, -2227.218, 6286.224)
The reason for the discrepancy is most probably due to Earth Orientation Parameters. Orekit typically loads EOP from a directory if you followed the recommended way in https://www.orekit.org/static/configuration.html#Quick_setup_using_default_data. I have just updated the default data set with current EOP so transforms from early March 2019 should be very good. With this settings, and assuming the ITRF frame was built as
Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
Then I got these results:
Orbit: {P(-5532936.377581564, -4451640.759330523, -20342.717244308886), V(2227.741346228882, -2777.2148030375624, 6286.21837508928), A(-0.43445523497726507, -0.3485702847874696, -4.7502998555017007E-7)}
In order to get results close to STK, I had to do the following:
- prevent loading of Earth Orientation Parameter (or rather load truncated data the does NOT cover March 2019
- use TIRF as Earth frame rather than ITRF (i.e. ignore both pole wandering and S’ regular rate)
With these two settings, I get these results:
Orbit: {P(-5532965.981090575, -4451603.9940751055, -20336.33870949751), V(2227.721531578508, -2777.218942867515, 6286.223565804276), A(-0.43445755747722115, -0.34856739657047814, 2.5095149630985185E-8)}
which are 75cm away from STK.
So I would say Orekit results are good, and your STK configuration could be improved. I don’t know how to tell STK to use current EOP, and you should make sure your Earth frame is really ITRF, which takes into account many tiny effects.