# How to calculate velocity components of a point on Mars surface w.r.t. Mars center?

I found altitude, speed and acceleration data of old mission Phoenix during EDL phase, but they are referred to Mars c.o.g. rather than to ground or to landing site:

Position and velocity (X_POSITION, Y_POSITION, Z_POSITION and associated uncertainties; X_VELOCITY, Y_VELOCITY, Z_VELOCITY and associated uncertainties) are given in an XYZ cartesian frame whose origin is at the center of mass of Mars. The +Z axis passes through the north pole and the +X axis passes through the equator at zero degrees east areocentric longitude at a specified time. The +Y axis completes a right-handed set.

https://pds-atmospheres.nmsu.edu/pdsd/archive/data/phx-m-ase-5-edl-rdr-v10/phxase_0002/CATALOG/DATASET.CAT

How can I re-calculate the data w.r.t landing site ? (68.2368N ,234.3111E , landed 2316.903 seconds after reference time 2008-05-25T23:00:00.000). I should calculate speed and position of landing site w.r.t. Mars center at each EDL moment, but how?

Or where can I find such recalculated data?

• Are you looking for extremely accurate values, or is approximation assuming a spherical Mars acceptable? – Russell Borogove Nov 18 '18 at 2:09
• How well does this answer address your question, is there more I can try to help with? – uhoh Dec 20 '18 at 11:39
• thanks for the effort but I don't know anything about SPICE kernels :-) , I would have appreciated some math. A spherical Mars approximation would be enough for me. – jumpjack Dec 21 '18 at 13:58
• @jumpjack okay thanks for the info! I many try to answer further, someone else may as well. – uhoh Dec 21 '18 at 14:16

I just realized that rather than x/y/z data I can just use latitude, longitude and distance from center both for calculating position and speed w.r.t. surface and landing site, by subtracting from them latitude, longitude and Mars-center distance of landing site.

Landing site rotates along a circle with radius R*cos(LAT) with an angular speed of 360° in 24 hours, 39 minutes and 35.244 seconds, which is 14.6' per second.

There are spice kernels for this. 19 pck in https://naif.jpl.nasa.gov/naif/tutorials.html links to the PDF Planetary Constants Kernel PCK, January 2018 If you like to do things right the first time, all roads seem to lead to SPICE.

If you like Python, you can have a look at https://spiceypy.readthedocs.io/en/master/binary_pck.html though it's better to stick as close to standard SPICE utilities.

As the last slide (below) illustrates, there are plenty of guides available online for how to use SPICE correctly.

You can also use JPL's horizions to get several kinds of vector data.

For example:

• Unfortunately NASA horizons reports: "No ephemeris for target "Phoenix (spacecraft)" after A.D. 2008-MAY-25 23:31:27.8620 TDB" . But EDL data report "START_TIME = 2008-05-25T23:30:47, STOP_TIME = 2008-05-25T23:38:36.899 " – jumpjack Dec 21 '18 at 14:26
• @jumpjack Looking at this answer to JPL Horizons original reference orbit data for Juno - how to retrieve now that it's been updated? I found the following. naif.jpl.nasa.gov/pub/naif/PHOENIX/kernels/spk So far I can't read that, but it may be what you want. – uhoh Dec 21 '18 at 15:35