Closed dsholes closed 6 years ago
Velocity is not yet supported; when I wrote that code, I knew how to rotate the position into GCRS coordinates, but not how to rotate the velocity:
rITRF, vITRF = TEME_to_ITRF(t.ut1, rTEME, vTEME)
rGCRS = ITRF_to_GCRS(t, rITRF)
vGCRS = zeros_like(rGCRS) # todo: someday also compute vGCRS?
If the holiday tomorrow gives me some free time, I might look at whether I can figure out the transformation and return something other than zeros!
Oh — I should ask for a clarification: are you interested in the satellite's velocity relative to a non-rotating observer watching the rotating Earth from a distance? Or in its velocity relative to a location on Earth which is itself veering constantly in a circle at high speed?
Thank you for the quick response! I'm interested in its velocity relative to a location on earth. I think vITRF
would be enough for me, but since you're returning everything else in GCRS
, it would be nice to have that as well.
By the way, I think it has already been asked in Issue #85, but is there a reason you don't offer a method to return rITRF
and vITRF
, considering you're often already calculating them?
I'm new to skyfield but I'm really enjoying it so far. The code and documentation is very clean and easy to follow. Thank you for all of your work!
The SPICE routine xf2rav() may be helpful here. It's documented at:
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xf2rav_c.html
and should be available in the source code. It's description is "This routine determines a state transformation matrix from a rotation matrix and the angular velocity of the rotation."
I'm trying to get the velocity of an EarthSatellite loaded from a TLE. For example:
But this returns
[0., 0., 0.]
. Note thatcubesat.at(t).position
,cubesat.at(t).subpoint()
both behave as expected. Am I misunderstanding whatcubesat.at(t).velocity
is supposed to return?