Avoid evaluating derivatives when they are ultimately not used
The frames hierarchy now allows to compute static transforms, which are less computationally intensive than full blown transforms.
This should be used more thoroughly.
One typical and easy use case is to search for patterns of the form getPVCoordinates\(.*\)\.getPosition\(\)
, which correspond to
calls to classes implementing PVCoordinatesProvider
but also to SpacecraftState
which has a getPVCoordinates()
method without arguments.
A quick check showed 168 such patterns at time of writing.
These calls could be replaced by a new getPosition(.*)
method, with a default implementation in the PVCoordinatesProvider
interface that would call the existing full transform. Dedicated implementations could then be added to SpacecraftState
, XxxOrbit
and similar classes for improved performances.