update
This commit is contained in:
@@ -37,6 +37,14 @@
|
||||
};
|
||||
}
|
||||
|
||||
function buildRoundedIsoTimestamp(stepMinutes = 5) {
|
||||
const rounded = new Date();
|
||||
const minute = rounded.getUTCMinutes();
|
||||
const bucket = Math.floor(minute / stepMinutes) * stepMinutes;
|
||||
rounded.setUTCMinutes(bucket, 0, 0);
|
||||
return rounded.toISOString();
|
||||
}
|
||||
|
||||
function buildStellariumObserverUrl(geo) {
|
||||
const normalizedGeo = normalizeGeoForSky(geo);
|
||||
if (!normalizedGeo) {
|
||||
@@ -47,7 +55,7 @@
|
||||
wrapperUrl.searchParams.set("lat", String(normalizedGeo.latitude));
|
||||
wrapperUrl.searchParams.set("lng", String(normalizedGeo.longitude));
|
||||
wrapperUrl.searchParams.set("elev", "0");
|
||||
wrapperUrl.searchParams.set("date", new Date().toISOString());
|
||||
wrapperUrl.searchParams.set("date", buildRoundedIsoTimestamp(5));
|
||||
wrapperUrl.searchParams.set("az", "0");
|
||||
wrapperUrl.searchParams.set("alt", "90");
|
||||
wrapperUrl.searchParams.set("fov", NOW_SKY_FOV_DEGREES);
|
||||
|
||||
Reference in New Issue
Block a user