Hello everybody,
I am trying to compute the partials of slightly shifted PVCoordinates
w.r.t. to the initial position and velocity. For this, I am using coordinates of type Gradient
.
However, I noticed that the implementation in KeplerianMotionCartesianUtility.predictPositionVelocity
, which is used by FieldOrbit<T>.shiftedBy(T dt)
and in the Keplerian propagator, returns a wrong result if the input FieldPVCoordinates<T>
define a circular (or almost circular) orbit.
To investigate this further, I computed the partials of the shifted PVCoordinates
using different methods, namely:
FieldAbsolutePVCoordinates<T>.shiftedBy(T dt)
, which uses a constant accelerationKeplerianMotionCartesianUtility.predictPositionVelocity
directlyFieldCartesianOrbit<T>.shiftedBy(T dt)
, which uses (2)FieldKeplerianPropagator<T>
, which also uses (2)FieldNumericalProagator<T>
, which integrates the Keplerian dynamics numerically
I am considering a very small time shift, such that (1) is a good approximation of the other approaches if the initial acceleration is set equal to the nominal Keplerian acceleration.
For nearly circular orbits, (1) and (5) produce consistent results, while (2) to (4) fail to compute the correct partials.
For more eccentric orbits, all approaches return approximately the same results (which is the expected behavior).
These are the results I obtained in two different cases (for the second case I just perturb the velocity vector to increase the eccentricity of the first orbit)
Initial Keplerian parameters: {a: 6797121.104302704; e: 2.2204485879284054E-16; i: 100.39951330616847; pa: 89.91335946442716; raan: 26.6094141509654; v: 0.08664053557284496;}
Partials of final position w.r.t. initial position and velocity
constant acceleration:
dx/dX0[1.0000168994862317, 4.5283252297977215E-6, -1.468012823409825E-5, -6.004370269625362E-4, -2.7189281896099027E-9, 8.814343594433244E-9]
dy/dX0[8.466108202097147E-6, 1.0000022685477443, -7.354280026392985E-6, -5.083278934008411E-9, -6.004282421537878E-4, 4.415707411311126E-9]
dz/dX0[-1.2576069630502057E-11, -3.3698381488348877E-12, 1.0000000000109246, 7.55101025161933E-15, 2.0233414060012877E-15, -6.004268800633028E-4]
predicted PV (analytical Keplerian motion):
dx/dX0[37.8013609081357, -1.6448618582351173, -700.6896803759753, 142874.88808466596, -331305.3883924205, 8.81419456915055E-9]
dy/dX0[41.64139772915594, -50.59850875272008, -316.82260566518426, -204016.05429537073, -159168.66324828798, 4.415611375196497E-9]
dz/dX0[4.320477920155774, -8.42424405988989, -10.427034967150316, -35713.15754554635, -18633.058849253375, -6.004268800944921E-4]
shifted orbit (analytical Keplerian motion):
dx/dX0[37.8013609081357, -1.6448618582351173, -700.6896803759753, 142874.88808466596, -331305.3883924205, 8.81419456915055E-9]
dy/dX0[41.64139772915594, -50.59850875272008, -316.82260566518426, -204016.05429537073, -159168.66324828798, 4.415611375196497E-9]
dz/dX0[4.320477920155774, -8.42424405988989, -10.427034967150316, -35713.15754554635, -18633.058849253375, -6.004268800944921E-4]
analytical Keplerian propagator:
dx/dX0[37.8013609081357, -1.6448618582351173, -700.6896803759753, 142874.88808466596, -331305.3883924205, 8.81419456915055E-9]
dy/dX0[41.64139772915594, -50.59850875272008, -316.82260566518426, -204016.05429537073, -159168.66324828798, 4.415611375196497E-9]
dz/dX0[4.320477920155774, -8.42424405988989, -10.427034967150316, -35713.15754554635, -18633.058849253375, -6.004268800944921E-4]
numerical propagator:
dx/dX0[1.000016899486007, 4.528325220798379E-6, -1.4680128179234142E-5, -6.004370272592041E-4, -2.7189912543690298E-9, 8.81443895650591E-9]
dy/dX0[8.466108193105892E-6, 1.000002268547533, -7.354280135291047E-6, -5.083336418465478E-9, -6.004282424783014E-4, 4.415767307364149E-9]
dz/dX0[-1.252131731632744E-11, -3.4786895586336186E-12, 1.0000000000113594, 3.410605131648481E-13, 1.1368683772161603E-13, -6.004268803110335E-4]
Initial Keplerian parameters: {a: 7849161.160914415; e: 0.1354594254432164; i: 100.33817753639391; pa: 81.59899074987786; raan: 32.90381183966837; v: 9.535005927822688;}
Partials of final position w.r.t. initial position and velocity
constant acceleration:
dx/dX0[1.0000168994862317, 4.5283252297977215E-6, -1.468012823409825E-5, -6.004370269625362E-4, -2.7189281896099027E-9, 8.814343594433244E-9]
dy/dX0[1.0934365593905585E-5, 1.0000029299330708, -9.49838870103491E-6, -6.5652870189490684E-9, -6.004286392673159E-4, 5.703087893329081E-9]
dz/dX0[-1.2576069630502057E-11, -3.3698381488348877E-12, 1.0000000000109246, 7.55101025161933E-15, 2.0233414060012877E-15, -6.004268800633028E-4]
predicted PV (analytical Keplerian motion):
dx/dX0[1.0000168994860035, 4.52832521805049E-6, -1.4680128180495782E-5, -6.00437026792361E-4, -2.7187660806215795E-9, 8.817182268901528E-9]
dy/dX0[1.0934365582690384E-5, 1.0000029299328588, -9.498388810428104E-6, -6.564782477943558E-9, -6.004286392050358E-4, 5.704714862079537E-9]
dz/dX0[-1.2521245326361835E-11, -3.4787149276699216E-12, 1.00000000001136, -1.0051532092441608E-13, 5.221940995658252E-14, -6.004268803226246E-4]
shifted orbit (analytical Keplerian motion):
dx/dX0[1.0000168994860035, 4.52832521805049E-6, -1.4680128180495782E-5, -6.00437026792361E-4, -2.7187660806215795E-9, 8.817182268901528E-9]
dy/dX0[1.0934365582690384E-5, 1.0000029299328588, -9.498388810428104E-6, -6.564782477943558E-9, -6.004286392050358E-4, 5.704714862079537E-9]
dz/dX0[-1.2521245326361835E-11, -3.4787149276699216E-12, 1.00000000001136, -1.0051532092441608E-13, 5.221940995658252E-14, -6.004268803226246E-4]
analytical Keplerian propagator:
dx/dX0[1.0000168994860035, 4.52832521805049E-6, -1.4680128180495782E-5, -6.00437026792361E-4, -2.7187660806215795E-9, 8.817182268901528E-9]
dy/dX0[1.0934365582690384E-5, 1.0000029299328588, -9.498388810428104E-6, -6.564782477943558E-9, -6.004286392050358E-4, 5.704714862079537E-9]
dz/dX0[-1.2521245326361835E-11, -3.4787149276699216E-12, 1.00000000001136, -1.0051532092441608E-13, 5.221940995658252E-14, -6.004268803226246E-4]
numerical propagator:
dx/dX0[1.0000168994860075, 4.528325220271023E-6, -1.4680128178568008E-5, -6.004370274865778E-4, -2.7189628326595994E-9, 8.814375007659692E-9]
dy/dX0[1.0934365584802652E-5, 1.0000029299328599, -9.498388809092706E-6, -6.565585408679908E-9, -6.004286401548597E-4, 5.703114425159583E-9]
dz/dX0[-1.252176140553729E-11, -3.478661803058003E-12, 1.000000000011359, 1.1368683772161603E-12, 9.094947017729282E-13, -6.004268807373592E-4]
I would guess the error comes from the solution to the Kepler equation, but I haven’t looked into it yet. Do you have any hint?
This is the code I used to produce the above results:
KeplerianMotionDerivativesTest.java (6.8 KB)
Thank you,
Alberto