Satellite observation planning using ekos scheduler
Related to Issue #57 . Making a new issue since there has been quite a bit of restructuring done in the architecture since then.
The basic idea is to enable observing satellited through the ekos scheduler. As highlighted in the previous issue, the first target was to change the GUI elements to adapt to satellite jobs. I have implemented a few of these ideas and am looking for feedback if I am going in the right direction. I would also appreciate any help with a few issues I am currently facing.
Suggested Ekos scheduler layout:
Change 1: Tracking mode selection:
- Two options provided as of now, which are - Sidereal and TLE tracking (Naming can be changed based on maintainer's suggestions).
- Sidereal tracking is basically the existing default tracking mode in the scheduler.
- TLE tracking can be enabled for Satellites/dynamic objects.
- An integer variable in SchedulerJob can store the tracking mode information. (Can be made an enumerator for readability)
Change 2: J2000/TLE:
- Based on the tracking mode selected, one of the two are made inactive (greyed out). TLE field is automatically filled if a satellite is selected. Cannot be edited by the user (This feature might be required for satellite objects not already in the database).
Change 3: Object altitude:
- Currently, if a satellite is selected in the scheduler the altitude shown in the job table is inaccurate. This has been corrected for satellites using "if/else" conditions.
- For this, the SchedulerUtils::findAltitude method is overridden to accept the object name and access the satellite as a SkyObject using the Instance()->skyComposite()->findByName() method. Note that this can’t be done if a satellite is passed as a SkyPoint since casting it to a Satellite object is not possible.
- Altitude is accessed after calling EquatorialToHorizontal method on the satellite object.
Change 4: Update Job start and end time: (Not yet implemented) This is where I am currently facing issues with satellites:
- As of now, the start and end times displayed in the scheduler for satellites are not accurate. I figure I have to make an overridden method for setStartupTime() but am unable to figure out how exactly. When I try to debug, I often get lost in the GreedyScheduler::findNextJob() <--> GreedyScheduler::simulate() loop. I understand what these functions are trying to do, but cant pin-point where the startupTime is being set exactly. Any help here would be really appreciated.
- General query: What is the difference between fileStartupTime and startupTime?
- Might be a BUG, not sure: The scheduler randomly assigns the status "IDLE" and "SCHEDULED" randomly even if I add the same object in successive runs of scheduler (run within one or two minutes). Of course, if the "IDLE" status is assigned, startupTime is not set, which confuses me further while debugging.
Change 5: Setting satellite TLE properties to INDI driver (for mounts with TLE tracking):
- When a satellite object is added to the scheduler, the ISD::Mount::setSatelliteTLEandTrack (as implemented in this MR) method is called with access through the mountInterface(). This is done after checking for the tracking mode in SchedulerProcess::executeJob() method.
- I haven't tested this yet and am not sure if this is the right way to call the method. Suggestions are welcome and would be highly helpful.
I will be creating an MR in draft state which closes this issue in a day or two. Looking forward to your opinions on these changes and suggestions on how to proceed.