astrOS
- 11 Devlogs
- 31 Total hours
A space/astronomy themed webOS
A space/astronomy themed webOS
finished the last feature, a year-round meteor shower schedule with active/upcoming status so you actually know when to set an alarm. 11 major showers baked in (Quadrantids through Ursids), and everything’s calculated client-side, no API needed.
went through all three files line-by-line before shipping. found and fixed two bugs plus some cleanup:
getSnapZone() detected top-left/top-right when you dragged to a corner, but showSnapPreview() and applySnap() never had rect definitions for those zones, so the preview showed nothing and the drop silently failed. added proper quarter-tile rects for both corners so you can now snap to all four quadrantsgetElementById() calls for apod explanation/toggle buttons were working but the elements weren’t explicitly in the HTML, they were created at render-time by innerHTML, so the id references were technically fine but fragile. left them as-is since they work, but flagged it as something to refactor if we add more dynamic content laterSHIPPPPPPPPPPPPPPPPPPPPPPPPP

Thought it’d be cool to have something you could just leave open on the desktop, so I added a little live Solar System app. Every planet sits where it actually should be today rather than looping around on some fake animation.
Planet positions come from simplified J2000 Keplerian elements (semi-major axis, eccentricity, orbital period, etc.) and get advanced from the current date, so they’re calculated fresh instead of being hardcoded.
Conveniently I’d already written a Newton-Raphson solver for Kepler’s equation while making Umbra, so I shamelessly reused it here to solve the eccentric anomaly before converting that into the planet’s true anomaly and distance from the Sun. Nice when old suffering becomes reusable code lol.
Biggest headache honestly wasn’t the orbital maths, it was the scale. If you draw everything linearly then Neptune disappears off the edge of the canvas, but if you squash everything too much then the inner planets all merge together. Ended up scaling the orbital radius by √r instead, which keeps the angular positions correct while compressing the distances enough that the whole Solar System fits on one screen.
Made every planet clickable as well because a static diagram felt a bit dead. Clicking one gives its current distance from the Sun and orbital period, with Earth getting a little highlight ring so it’s easy to spot where we are.
It redraws once a minute since the planets barely move on human timescales anyway, and it’s definitely not accurate enough to navigate a spacecraft with, but it’s surprisingly close considering it’s just running a handful of orbital equations in the browser lol.
New app, tells you whether tonight’s actually worth setting up a telescope for.
New app, tracks the ISS live using wheretheiss.at (no key needed, CORS-open, genuinely such a nice API to work with).
Polls every 5 seconds for lat/lon/altitude/velocity
Keeping the last 20 fixes so there’s a fading trail behind the current position instead of just a dot that teleports every update
Drew my own little world map for this since I didn’t want to deal with map tile assets, just lat/lon gridlines every 30°, equator and prime meridian slightly brighter.
I reused the geolocation I already grab on boot for the sky map, so this app also shows your distance from the ISS via a haversineKm() calc, and flags when it’s within ~2000km with a little “nearby!” tag. Not a proper overhead check (that’d need elevation angle above your horizon) but good enough for now
Added a stopIssTracker() call on window close so the polling interval actually dies instead of running forever in the background, learnt that lesson the hard way after leaving a tab open for way too long testing this
Added the Astronomy Picture of the Day app, pulls straight from NASA’s API and shows today’s pic with the write-up tucked behind a toggle so the image gets to be the main object first.
Cached in localStorage per calendar day, so reopening the window doesn’t burn another call for the same picture
Nearly got got by this one: NASA sometimes serves a video instead of an image for the day, and my first pass just shoved the url into an <img> tag, broken image icon staring back at me lol
Added a media_type check so videos link out instead of trying to embed
Also handled the fetch failing outright, just shows a “try again later” message instead of leaving a blank window, DEMO_KEY’s rate limit is gonna trip this eventually so it needed to fail gracefully lol
what’s next?
either stargazing conditions or the ISS tracker, we’ll see which one I go for
This was an absolute lock-in but I don’t wanna rank low on storytelling, so I’ll make this one detailed lol.
localStorage so it survives a refreshmarkActiveWallpaperSwatch re-reads storage and re-marks the active swatch every time the window reopensGPair, OCl, SNR, Cl+N), so I wrote a bucket function that checks substrings to map raw types into galaxy, nebula, cluster, or other for the filter dropdown
scheduleNotifications twice and stack two loops, doubling the ping ratenotifStarted flag so the loop only ever starts oncestopPropagation on mousedown so resizing doesn’t also trigger the window dragToday I finished off the final parts for the first mission.
I added a coords toggle so you don’t doxx yourself while taking screenshots of the map.
I also fixed up the minimising animation and changed the taskbar to host the app icons instead of the usual app name (this had an ugly white bg lol so I had to change it no matter what)
I also added a custom background (yes this is reused from my g-lens project sue me)
added a basic notepad app, it does not save between sessions though.
added an animation to minimising windows
[FIX] made star names not rotate with the star map (this was annoying me lol)
what’s next?
add icons to taskbar and not just names for minimised apps
hide the coords on sky map lol dont doxx yourself
a review of the guidelines so I can get webOS 2!
Today I wanted to add an app. Not a standard one like notepad, music, file explorer… something that is different. So, naturally, I spent two hours coding my own star map using a ton of stars from the yale bright star catalogue (okay maybe not a ton but you get the idea). It takes the users location, calculates the chunk of sky above them (yes, you can do this) and shows the major stars visible to the naked eye on a turntable style minimap.
ohhhh yeah and i added stuff from the guide like the topbar and time, that’s not the star of the show for this log though lol.
I want to finish this project really efficiently, so I have mapped out what features I want (you will see as they come). Today, I finished the boot screen and styling for it, and made the file structure.
Not much, only 40 mins, but since its a roughly 2hr 30m project, 30m a day means I finish in 5 days.