Behind The Scenes: Stellarium
Original Published Date : 2020-05-14
Whilst the excellent astronomy software Stellarium is most probably used âinteractivelyâ (as in using the mouse and on-screen options), behind the scenes you can automate it. That means have a series of instructions in a âtextâ file and just run them. Yes, a bit like an Office macro.
Naturally this leapt out at me and I said âsweet â something new â and useful â to learn!â. Useful because I have a list of Astronomy Introduction topics in mind and such automation would be very helpful here.
Step 01. Quickly read up on the basics of the language you write these âscriptsâ in. Itâs called ECMAScript and appears to be a standard form of JavaScript. Given I donât know JavaScript, that last bit is of approximately zero use to me đ
Anyway, itâs been sorta slow going, but Iâve taken some Big Boy Steps today. As you can clearly see from this code đ

You just know Iâm learning-as-I-go when my comment (// bitâs) have the term dâoh in them. The idea of first sitting down and properly learning the language â and only then designing the code â is anathema to me. Adam not Jamie mode here.
Iâve actually broken the back of the core things I want to do. Now time to put it all together.