as far as naming is concerned, the word “state” should be left for actual continuous variables, I think the generic thing could be “info” or something
let’s not add any more lines of code in (Field)SpacecraftState and use class composition for instance to manage the additional stuff
My opinion is a bit biased since we discussed this afternoon with Anne-Laure about this new feature.
AdditionalStateProvider is a very appreciated feature of Orekit. Extending its purpose is a very nice idea.
Maybe we can directly modify the existing AdditionalStateProvider class? The update will be straighforward for user (i.e. just add <Double> to their implementation). Therefore:
I don’t think that the name of the classe shall be modified. A “state” could be represented by a double value, a String, etc. In fact “state” is already a generic word.
Any additional code will be added in {Field}SpacecraftState. The idea is just to add a generic type to the interface
In the context of dynamical systems, state is kind of a keyword, it’s the vector of dependent variables. The case of user defined ones is already covered by the DoubleArrayDictionnary, and you can’t make that generic.
SpacecraftState has 18 constructors
I just think this deserves some brainstorming
Yes, we are aware of the current complexity of SpacecraftState. Romain did raise alerts several times about this, and I agree with him.
I have no clue how to handle this, but some redesign is probably needed. We really need to think this through for 13.0.
I would suggest something: all developers start by thinking of the pros and cons and if they find they can suggest a new architecture, splitting classes, using polymorphism, using builders… Then in one or two weeks, we set up a live brainstorming online (not really an Orekit Talk, but using similar means), in order to decide something collectively.
And I really like the idea of generalizing additional data (state or other name, I don’t care).