Can anyone tell me the proper way to reinitialize Celestia to its factory/installation default state (preferably via script), short of uninstalling it from Windows and reinstalling it? I wrote a simple script and now for no reason that I can pin down, I cannot now get it to function as it did anymore.
Actually, I'm finding that, even after an uninstall and a reinstall, my script still won't function as it used to.
Reinitializing Celestia to Its Factory Default State
- SevenSpheres
- Moderator
- Posts: 826
- Joined: 08.10.2019
- With us: 5 years 1 month
This script used to land on Earth and then zoom in on Io quite nicely. Now it only brings up a black screen. Pressing '~' doesn't bring up any debug info. I'm stumped.
observer = celestia:getobserver()
EarthObject = celestia:find("Earth")
observer:gotosurface(EarthObject)
observer:gotolonglat(EarthObject, -84.3880, 33.7490, 0.1)
Observedbject = celestia:find("Io")
observer:track(ObservedObject)
observer:setfov(math.rad(0.001))
newTime = celestia:tojulianday(2021, 12, 30, 00, 05, 6.0)
celestia:settime(newTime)
Your original instructions still work, of course:
To go to a specific location on Earth:
"Navigation" menu -> "Goto Object"
Go to Earth at the latitude and longitude you want
Press Ctrl+G to land
Press Ctrl+F to enable alt-azimuth mode
To view a planet or other object at high magnification:
Select the object and press T to track it (keep it centered on the screen)
Use the , key to decrease the field of view (you can also use . to increase the field of view)
observer = celestia:getobserver()
EarthObject = celestia:find("Earth")
observer:gotosurface(EarthObject)
observer:gotolonglat(EarthObject, -84.3880, 33.7490, 0.1)
Observedbject = celestia:find("Io")
observer:track(ObservedObject)
observer:setfov(math.rad(0.001))
newTime = celestia:tojulianday(2021, 12, 30, 00, 05, 6.0)
celestia:settime(newTime)
Your original instructions still work, of course:
To go to a specific location on Earth:
"Navigation" menu -> "Goto Object"
Go to Earth at the latitude and longitude you want
Press Ctrl+G to land
Press Ctrl+F to enable alt-azimuth mode
To view a planet or other object at high magnification:
Select the object and press T to track it (keep it centered on the screen)
Use the , key to decrease the field of view (you can also use . to increase the field of view)
- SevenSpheres
- Moderator
- Posts: 826
- Joined: 08.10.2019
- With us: 5 years 1 month
You have a typo; this
should be
After correcting this, the script works for me (if it's intended to immediately switch to a view of Io).
TJackson wrote:Observedbject = celestia:find("Io")
observer:track(ObservedObject)
should be
TJackson wrote:ObservedObject = celestia:find("Io")
observer:track(ObservedObject)
After correcting this, the script works for me (if it's intended to immediately switch to a view of Io).
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
Script Debug Information
The failure to catch the typo was indeed my fault. However, that points to a deficiency (or room for improvement) not only in me but also in Celestia. Operating systems provide crash reports, debuggers report execution errors, and compilers report syntax errors for a reason. It would certainly be a helpful feature for Celestia to somehow indicate the presence of that typo (or anything ELSE that it can't execute in a running script). I was disappointed to find that the '~ debug console' feature does not (that I can determine) include any information about a running script. Maybe it should. If so, where should I propose/request/suggest that addition? The Wiki? The Development subforum? The Bugs subforum? Thx
- SevenSpheres
- Moderator
- Posts: 826
- Joined: 08.10.2019
- With us: 5 years 1 month
TJackson wrote:If so, where should I propose/request/suggest that addition? The Wiki? The Development subforum? The Bugs subforum? Thx
Definitely one of the latter; GitHub would be even better. Wikibooks is for documentation, not requesting features.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED