I am new to Orekit and want to achieve something quite simple. My situation is as follows:
I have a simulation with a satellite orbiting the Earth and its attitude is set to sun-pointing. The user of the simulation has the possibility to set another attitude mode for the satellite by interacting with it over a GUI. What I would like to achieve is that the user can set another attitude mode (e.g. nadir pointing) and the satellite transitions smoothly to the new attitude.
What I tried first is to have two AttitudeProviders running (CelestialBodyPointed for sun-pointing and NadirPointing for nadir pointing) and to use resetActiveProvider of the AttitudeSequence class. However, when I trigger the transition the satellite just does an instantaneous flip which is not the result I am looking for.
My next approach was to use addSwitchingCondition of the AttitudeSequence class. However, none of the already existing EventDetectors matched my condition (i.e. setting a flag from false to true), so I tried to implement a custom EventDetector. But now I am stuck there trying to implement the g method which has to be continuous around its roots because my condition is discrete.
Could you point me in a direction how I could tackle the g function or is there even another more elegant way to achieve what I need?