Page 1 of 1

Reinitializing Celestia to Its Factory Default State

Posted: 02.01.2022, 01:02
by TJackson
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.

Posted: 02.01.2022, 01:18
by SevenSpheres
What exactly isn't working correctly now?

Posted: 02.01.2022, 02:02
by TJackson
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)

Posted: 02.01.2022, 02:24
by SevenSpheres
You have a typo; this

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).

Posted: 02.01.2022, 03:24
by TJackson
I'm so embarassed I didn't catch that. :oops: And you've been so helpful and polite. :smoke: I'll give you a bit of a rest now, SevenSpheres. How may I recommend you for an increase in Celestia rank? :biggrin:

Script Debug Information

Posted: 04.01.2022, 12:41
by TJackson
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

Posted: 04.01.2022, 18:14
by SevenSpheres
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.