Celestia's navigation function has an awkward quality. It will happily: show the label of, 'select' and 'goto' objects that aren't really there; simply because the current time of the simulation clock is outside the object's timeline. It won't even show the object's timeline in the info text or anywhere else on the screen. This particularly relates to spacecrafts, since those are among the few Celestia object types that actually do have a timeline. This script is designed to overcome that shortcoming but only for spacecrafts.
The script extends the default Celestia "Goto"; it Reacts to [Shift] + [G] and shows a message and a menu íf the currently selected object is a spacecraft and íf the current simulation time is outside the spacecrafts lifetime. The menu allows to:
B - set the clock to the beginning of the crafts lifetime
- and set the direction of the clock to forward
M - set the clock in the middle of the crafts lifetime
- do not change the direction of the clock
E - set the clock to the end of the crafts lifetime
- and set the direction of the clock to backward
N - set the clock to "now" (is the current system time)
- only when "now" is within the craft's lifetime
- do not change the direction of the clock
P - show a menu to select a specific phase
- a submenu then allows to set the clock to the beginning, middle or end of the chosen phase
- only if a craft has more than 1 phase specified
- allows max 9 phases per object to keep the state machine from becomming too complex for a script
If the selected object is not a spacecraft or the current simulation time is within the lifetime of the currently selected craft, the script reverts to Celestia's default Goto function. The same happens when the object has no lifetime specified; i.e. both begin- and endtime are reported by celestia as -infinity and +infinity respectively (like for the spacecrafts: Integral and Chandra X-Ray Observatory).
Pressing any other key then B, M, etc. will set the menu state machine back to it's default state. This excludes keys like "escape", F1 => F12, Up, Down, etc. These keys do not seem to be reported to the script by celestia's keyeventhandler().
The script also reacts to: [Shift] + [B], [Shift] + [M], [Shift] + [N], [Shift] + [E] and [Shift] + [P]. These act as shortcuts into the Goto menu for a currently selected spacecraft, but they also work when the simulation clock is within the spacecraft's lifetime.
Remarks:
Installation
Use
Remarks
Version 2.1, 17 apr 2011
- Changed:
Version 2, 16 jan 2011
- Added:
Menuoptions:
M = Middle of lifetime or timespan
N = Now (systemtime)
- Changed:
Version 1, 13 jan 2011
Initial version