Devlog #8 — TLE age, observer location & localStorageShort but important session.First,
finished off the tick() function. Added TLE age display — shows how old
the orbital data is. Under an hour it shows minutes, over an hour it
shows decimal hours. Small detail but useful, stale TLE data means
inaccurate position.Then observer location. This
took a bit of thinking. The app needs to know where you are to predict
ISS passes — so setObserver() takes lat/lng, validates it (no infinite
values, lat within ±90, lng within ±180), converts to radians for the
math, and stores it.The localStorage part was new
territory for me. Never used it before. Basically the browser remembers
your location between sessions — so next time you open the app it loads
your saved coordinates automatically via loadObserver(). One line to
save, one line to load, JSON in between. Actually really simple once I
understood it.The observer marker gets placed on
the globe too — same system as the ISS marker but sits almost on the
surface (altFrac: 0.005).Input fields update to
show the saved coordinates. The location display shows hemisphere format
— 47.50° N, 19.04° E style — then “loading…” underneath while it
reverse geocodes the place name.Coordinates,
radians, localStorage, marker placement — a lot of small things that all
had to connect correctly. Felt good when it clicked.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.