Hacker News new | past | comments | ask | show | jobs | submit login
Stellarium Web: Online Planetarium (stellarium-web.org)
364 points by phsilva 9 months ago | hide | past | web | favorite | 48 comments

Stellarium [0] is such a great project. We even used it in an upper-division college observational astronomy course to perform the historical experiment to measure the Earth-Sun distance (the astronomical unit or au). It was a lot of fun, we mock-observed the transit of Venus [1] from two different latitudes to perform the same calculation done in 1769 on James Cooke's expidition from Tahiti [2].

[0] http://stellarium.org [1] https://en.m.wikipedia.org/wiki/Transit_of_Venus [2] https://en.m.wikipedia.org/wiki/1769_Transit_of_Venus_observ...

I am one of the developers. Nice to see the project getting first page of hackernews. If you have any technical question about how it was done, feel free to ask.

Very nice work; I've enjoyed using Stellarium several times, in night mode, to find various stars and planets in the sky, and it's wonderful to see a web version now.

I'm curious about something: on your Github project, you mention using a CLA, but it sounds like the only reason you're using it is to ensure provenance and irrevocability of contributions. Given that, have you considered using something like the Developer Certificate of Origin (DCO, AKA "Signed-off-by"), which has built-in support in Git and much broader acceptance in the FOSS community?

Where can we find the C source to the stellarium-web-engine.js file? thanks!

edit: It looks like this is it https://github.com/Stellarium/stellarium-web-engine

That's the one.

I was expecting a lot more code, you guys did a great job cleaning up and reducing the original desktop codebase.

Yes, but here having a small code is a necessity since we can't have a too big final executable on a website. I am actually still thinking we could make it even smaller.

Stellarium was a fine achievement a decade ago ... and has become more beautiful and useful ever since. It is certainly among the top-100 the 'rock stars' of software, and unsurpassed as a science-learning tool. Many thanks to you all!

What's the data store? And apologies if this is a dumb question, but given the number of astronomical objects in the universe that we might identify, is there some special consideration given to how large the amount of data stored might grow to?

Server side we have a mongodb database that contains the list of all the searchable objects. It is generated mostly using common stars and nebulae catalogs.

For streaming the data with good performances we also have an amazon S3 instance where we store compressed tiles of data. Each tile contains information about objects in a small region of the sky inside a given magnitude range, so when the user zoom in and out, we can download only the tiles of the visible portions of the sky.

That's how we can render the whole Gaia catalog, containing about 1 billion stars. You can try it: zoom in, and you will see the stars being loaded on the fly.

As for the database size consideration, it will most likely be an issue once we start to support queries into the Gaia catalog (about 500GB of data). There are some ways to make it work though.

How are you guys constructing the DB from the catalog? Do you plan to grow it?

For Gaia, it would be impossible (or too expensive) to put the whole catalog into a conventional DB. The solution is probably going to be something similar to OpenDAP (https://www.opendap.org/), but I haven't looked much into it myself.

Any plans on integrating with the Virtual Observatory, or is that too slow to integrate nicely?

One of the goal for the web version is to allow displaying sky observations yes (we are working on it). Not specifically from the VO, but it could as well.

i've used the desktop version (which i love, thanks!) -- how was it ported to the web?

The web version is a full rewrite of the original code, with less features and smaller code. It was designed to work on the web from the start. We try to keep the style similar though.

Wait, so the web version is a C rewrite that is then emscriptened to JS but was specifically intended for the web? That's really interesting. Can you say a little bit about how you decided to take that approach?

In the end the target is web assembly, so even writing the code directly in js would require some compilation. Why C and not an other language that can be compiled to web assembly? I guess that was mostly a question of taste.

Ah, the web assembly target is for performance? I'm curious about the process of getting from 'let's put Stellarium on the web' to 'we're going to do a clean, pruned rewrite in C and spit out web assembly'. Like, did you sit around and think deep thoughts about various options? Or did someone look at web assembly and think 'huh, webassembly might be a neat way to port Stellarium to the web'.

I think it was mostly because we knew we could do it this way. Having a C code base is also nicer for integrating back into Stellarium desktop, do other platform ports, etc.

Makes sense, thanks for indulging my nosiness!

I'd love to help make the stellarium.org site responsive. Nice docs for your Jekyll site set up.[0] I'll dig into the files to grok your workflow and submit a PR for something small at first to get your feedback, say maybe the post pages.

my github username === my hn username

Cheers! And thanks for your team's work!

[0] https://github.com/Stellarium/stellarium.github.io/blob/mast...

Thanks, that would be a nice contribution!

Hi @guillaumec , Thank you for this wonderful software.

Are the places, online or real-world, where I can get training on using Stellarium? I want to enjoy this software, but my usage has been cursory for many years now. Where can I find more information about both the concepts of Astronomy and using Stellarium for those? A video course or a in-person session would be beneficial for me, and I believe, for many others. Thanks again!

Was just using it to find where Sgr A* was in the sky a few minutes ago, I love how big the database is. Thank you!

Currently, there are about 2 millions searchable deep sky objects, plus all the Hipparcos star catalog (about 100,000 stars).

If you zoom in you can actually see the entirely of Gaia dr2 catalog (about 1 billion sources, mostly stars).

We also have most of the major solar system bodies.

Very nice. It does not work under Firefox in Debian unstable, though (the UI works, but there are no stars). It works with Chromium.

Same with Firefox (61.0.2) on Arch

I've been following the Stellarium project for upwards of a decade and I'm always pleasantly surprised at how far it's come, even if I still have a few grips about telescope integration (still no built-in ASCOM or INDI interfaces).

I did some work for a company about 2 years ago to port a stripped-down version of Stellarium for internal-use on some custom ARM-based in-field devices (the company worked in the satcom industry) and I'm still amazed at the amount of complexity that goes into astronomical simulation. In fact, I recommend devs interested in this space check out the Stellarium source repo, which provides ample amounts of well-designed (Qt-ish) C++ surrounding astronomical projection, star rendering, ephemeris calculation, etc.

While this online-version doesn't seem to share too much with the regular desktop Stellarium (WebAssembly port, anyone?) it does appear to be one of the best web-based planetariums currently.

>I've been following the Stellarium project for upwards of a decade and I'm always pleasantly surprised at how far it's come

Likewise. My first ever open source contributions were to the Stellarium project at about the age of 14. The regular volunteers (especially Matthew) were unbelievably patient and helpful. Working on Stellarium was what really pushed me to spend a lot of time learning programming.

Hey that's one of the nicest compliment I ever got from a user/contributor, thanks! (Fabien from Stellarium team)

Thank you for your devoted work on Stellarium for so many years!

When I learned about Webassembly, stellarium was high on the list of programs I thought would be nice if ported to the web. Like many people, I enjoy geeking about space and astronomy from times to times, but not enough to bother installing a dedicated software or keeping it up to date. Call me lazy if you want, but I'm sure there are many people like me. Now I know if I want to look at the sky on my computer, it's just one url in my web browser. Thanks.

A port for Celestia would be nice too.

Surprising how well integrated this is. I half expected this to be a direct port of the thing, with the same Qt UI, to Emscripten. Instead, there is some actual proper HTML UI overlayed on the WebGL canvas.

This brings back memories. I have spent countless hours playing on the desktop versions years ago. An excellent piece of software, and glad it has a web version now. Bookmarking! And thank you!

Here's a nice surprise: it appears to work just great on Safari on iOS.

Setting your location could be easier, but color me impressed.

The location defaults to (0,0) for me. Usually it's at least accurate to the country, which is accurate enough for this purpose. Setting it wasn't a big deal to me -- again, I just drop it anywhere in the country because it doesn't make a difference anyway, at least in Europe.

In theory, the location should be auto-detected, if you allow your browser to send it

A cold winter, perfectly clear sky, in a dark, dark forest out in nowhere, wearing night-vision goggles I looked up for a moment, and was stunned. It's ridiculous to think we are the only intelligent life out there, when every mm of the sky is filled with stars and galaxies.

It needs to be localized. In other languages stars and constellations have more entertaining names, not just latin derivatives. Google translator seems to do just fine, judging by "Otava. Linnunrata. Pohjantähti."

I'd really enjoy seeing integration with Google Street view (where possible), to modify the terrestrial panorama, as the foreground for what the user might expect to see on the ground, for any given pin dropped on the map.

It starts the viewing on Null Island (0 Lat / 0 Long) when geolocation is refused, so the grassy farm field is cool, but it's be neat to pull the view into cities, to see what the sky would look like, if the light pollution weren't getting in the way.

Stellarium is one of those apps that is capable of bringing a powerful new Macbook Pro to its knees. It's a great app, but the quality (at least on Mac) is complete crap. There's no QA, apparently. The recent versions on Mac have been basically unusable. Too bad.

This is really cool! I am not much of an amateur astronomer, but I regularly use the desktop version to look up what I just saw in the sky.

Landscape? That's just dummy data, right?

Can I set the timezone? Or can it be inferred from the location? The location is properly detected ...

Landscape is dummy, yes.

Timezone I'm not sure, but the time can be set using the slider in the right bottom corner.

How acurate is this?

Accuracy is good for present time (i.e. +- a few days from now), but degrades quickly with time (for planets, satellites etc..). For the online version we can't afford to use full planetary models (like in the desktop version) as it would be too much data to download at startup.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact