New Feature Solar Eclipses in Sitrec

New Feature

Giddierone

Senior Member.
SItrec question: I saw some discussion of eclipses elsewhere, but didn't see the answer, so was wondering if, if you go to the right location, date and time of an eclipse does Sitrec simulate the moon's shadow?
 
SItrec question: I saw some discussion of eclipses elsewhere, but didn't see the answer, so was wondering if, if you go to the right location, date and time of an eclipse does Sitrec simulate the moon's shadow?
Not sure about Sitrec, I don't think it's set up for shadow casting, @Mick West will probably have to answer that.

But Orb Hunter does simulate the Moon's shadow; in fact, it's one of my "go-to" tests.

1766322490677.png
 
Always fun to add stuff, but if you want to get the accuracy as per the screenshot above, you'll need npm astronomy-engine (trust me, stuff of experience ;))
That's what I currently use. e.g.

JavaScript:
// get a vector in ESU coordinates to a celestial body from a EUS position (like a camera or object)
// - body = (e.g "Sun", "Venus", "Moon", etc)
// - date = date of observation (Date object)
export function getCelestialDirection(body, date, pos) {
    let LLA;
    // if a position is provided, use that to calculate the LLA of the observer
    // realistically this won't make any significant difference for the Sun,
    // the biggest difference will be for the Moon, then nearby planets
    if (pos !== undefined) {
        LLA = EUSToLLA(pos);
    } else {
        // default to the local origin, should be fine for the sun.
        LLA = V3(Sit.lat, Sit.lon, 0)
    }

    let observer = new Astronomy.Observer(LLA.x, LLA.y, LLA.z);
    const celestialInfo = Astronomy.Equator(body, date, observer, false, true);
    const ra = (celestialInfo.ra) / 24 * 2 * Math.PI;   // Right Ascension NOTE, in hours, so 0..24 -> 0..2π
    const dec = radians(celestialInfo.dec); // Declination
    return getCelestialDirectionFromRaDec(ra, dec, date);
}
 
Last edited:
The underlying math checks out. If I put in that date, time, and location, the sun and moon vectors are coincident.
2025-12-21_10-59-44.jpg
 
Once I got there, I played with using shadow casts but couldn't seem to get the right balance of illumination, and so just ended up drawing two cones using the opposing sun-moon vector, one for full umbra and one for penumbra. Seemed to work fine.
 
My umbra seems a bit off, compared to NASA. I think the most likely reason is that I use a WGS84 sphere instead of an ellipsoid
@GM4AJK, do you factor that in?

See here, Reykjavik is predicted by NASA to be in totality, but not in mine.

2025-12-21_13-58-13.jpg
 
Since Orb Hunter is really a "Situation Awareness" educator (and therefore simpler to drive) I didn't bother with WGS84. My intent with OH was:-
  1. Get something simple to use into people's hands to understand the motions of satellites, the Earth, and the Sun, and why flares happen and what conditions they occur in.
  2. To show the value of computer simulations in the study of stuff in the sky. I've just seen too many dismissive comments about software and really wanted to put something together that's easy to use/understand.
Btw, I initially wasn't intending to release a program. My initial goal was to learn ThreeJS, Typescript, etc as working on Sitrec showed I needed to understand these libraries (I'm more of a C/C++ guy, and my experience of night-sky to date is working on Stellarium stuff a few years ago).

But after a couple of weeks (and a poke from Flarky, lol), I saw that, in fact, there was something worth pursuing, so I did, and that's where Orb Hunter originated.

Edit: Btw, that's why there are no stars in Orb Hunter. Stars were actually added early on, but I took them out because they drew the user's focus away from the experience I wanted to convey: the satellites, the Sun, and the observer. That's deliberate, I'm hoping that Orb Hunter, for some, will be the first steps towards using Sitrec ;)
 
Back
Top