Well, that went better than I expected! Correct rotation for time/data/longitude is working. The rotation required is:
JavaScript:
function getSiderealTime(date, longitude) {
const JD = date / 86400000 + 2440587.5; // convert to Julian Date const D = JD - 2451545.0; // Days since J2000.0 let GMST = 280.46061837 + 360.98564736629 * D; // in degrees // Add the observer's longitude (in degrees) GMST += longitude; // Normalize to [0 ... Read even more