AttitudesSequence.registerSwitchEvents seems still necessary in Orekit 13

One way that I did not experiment with, but would maybe be more in context with the single automata, was implementing switch conditions between two equal observation states, that would transition to either day or night depending on the position of the satellite at this point. Something like the following:

I do not know if it is possible to implement a transition between the same attitude, only to control the state they will transition to. My guess is it involves defining the observation attitude as many times as the amount of states we need it to transition to.

Thank you very much for your responses and explanations!

I will still try the workaround, though, if it makes at the time I will be able to, as I cannot at the moment!

Thanks!

This is exactly what I do in an operational product I work on. In fact, the nodes in the automata really represent states; the attitude mode is just one part of the state, and some conditions (in your case day or night, in my case visibility from one or another station, or even both stations) are other components of the state. This implies that several different states can in fact correspond to the same attitude mode. From AttitudeSequence perspective, it will detect the transition and perform a switch from attitude A… to attitude A, so basically a no-op, but from a state perspective, it will somehow remember the fact it is day or it is night, and the transitions out of these states can be different.

From experience, I can tell it works very well and is in fact quite easy to maintain. Drawing the state transition as you did is a great help. In one unit tests of my operational product, I have three attitude modes, but 5 states and 12 different transitions configured between these states. Some states can be entered from different transitions, and some states are different exit conditions.

Perfect! I will then try this approach. That way I use the AttitudesSequence as it was designed to be used. Even better that it was already done and tested before. I guess at this point the previous problem with the Switch Events on nested sequences would be more of a convenience matter for a specific problem, if any at all, and doesn’t really affect AttitudesSequence use.

Thank you so much!