DerivativeStructures derivatives diverge for low altitudes (drag + srp)
Resulting from this discussion. Derivatives of the PV variables with respect to their initial values, when obtained through a PartialDifferentialEquations object vastly differ from those obtained using DerivativeStructures objects (the latter diverge) when conditions are as follows:
- Low altitude (6550km initial altitude, nearly 0 eccentricity).
- Drag force with a HarrisPriester atmosphere model is on. (- SolarRadiationPressure force model is also on, but divergence is also there without it.)
- The integrators used for both computations are DormandPrince853 both in field and non-field versions.
This small piece of code can be used as a quick reference for identifying the problem.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information