I have the following state vector of a spacecraft : [X, Y, Z, VX, VY, VZ]. The state vector is expressed in the inertial frame of the central body. I would like to convert this state vector when changing central body (for an interplanetary trajectory). For example my center body is the Earth, then when approaching the orbit of the Moon, I would like to express the state vector of the spacecraft in the same inertial frame but centered on the Moon.
For position transformation, it's just a translation (I compute planetary positions from a Chebyshev interpolation). But how do I transform the velocity of the spacecraft knowing that I do not have access to the planets velocity ? I have read some answers on this question here, but I can't use SPICE because I want to do this computation onboard the spacecraft. So is there an algorithm allowing to calculate the planets velocities via the Chebyshev coefficients ? Or is there another method to compute spacecraft velocity when changing central body ? I am interested by any paper talking about this.