In Orekit, instantaneous velocity jumps are implemented in the class ImpulseManeuver. The corresponding mass expenditure is given by Tsiolkovski inverted equation using the Euclidean norm a.k.a. 2-norm of the delta-V (in satellite frame or other if attitude override is present). However, this is only representative of a single, gimbaled thruster. Other cases can model different configurations, like the 1-norm which translates six thrusters mounted in orthogonal directions. See Space Trajectory Optimization and L1-Optimal Control Problems for more details. So it’d be nice to be able to choose, maybe via an enum?
That actually brings me to something in Hipparchus. The interface Vector and the abstract class RealVector only have 1, 2 and \infty norms, which are all particular cases of the p-norm: ||(x_1,\dots,x_n)||_p=(|x_1|^p+\dots +|x_n|^p)^{1/p}
Why is it not implemented? Is it only because it wasn’t already in Apache’s math?
Personally, I would also like the method getNorm() to have an alternative signature where p can be specified (like Numpy does), with the default value being 2 to avoid breaking anything.
Adding generality is good, but keeping efficiency is also good.
Most people use the Lâ‚‚ norm, and it is fast to be computed, which is important as we routinely use millions of such computations in classical use cases. The general case implies calling {Fast}Math.pow which is the worst function to compute. It is extremely slow and has a lot of difficult special cases (17 special cases in the Java specification), so it is a function that should almost always be avoided.
So I would be OK to add a general norm, but not to remove the fast, efficient and accurate Lâ‚‚ norm.
I remember when I was a student (looooong ago). My math teacher used to say “don’t create the theory of the n-wheels bicycle only to apply it to n=2 later”