Header Clocks Configuration

This page documents the header center clocks (Local, UTC, LST) and their location setup.

What Is Shown

  • Local: current local time.

  • UTC: current UTC time.

  • LST: local sidereal time, calculated from longitude.

  • Hovering each clock shows sunrise and sunset for the configured location.

All calculations are local in the browser (no external API calls).

Preference Controls

In Settings > Preferences there is a compact Header clocks section:

  • Device Location: On/Off

  • All: On/Off

  • Individual toggles: Local, UTC, LST

  • Manual location fields:

    • Sunrise/Sunset Lat

    • Sunrise/Sunset Lon

    • LST Longitude

  • Hover LST Longitude to see why that value was selected (preference/config/URL fallback/site fallback).

When Device Location is on:

  • Browser geolocation is used.

  • Sunrise/sunset manual fields are auto-populated for verification.

  • Sunrise/sunset manual fields are disabled.

  • LST Longitude remains editable (it is independent from device location).

When Device Location is off:

  • Manual fields are used (if set).

Runtime Fallbacks (public/config.js)

If manual values are not set in preferences, these optional config keys are used:

// Optional manual fallback coordinates for header clock preferences
HEADER_CLOCKS_MANUAL_LATITUDE: -30.713,
HEADER_CLOCKS_MANUAL_LONGITUDE: 21.443,
HEADER_CLOCKS_LST_LONGITUDE: 21.443,

Other site keys accepted as fallback:

  • SITE_LATITUDE / SITE_LONGITUDE

For SKAO deployments, LST default longitude is auto-selected by URL hostname when no manual/config value is set:

  • Hostname containing low -> SKA-Low (Australia): 116.7644482

  • Hostname containing mid -> SKA-Mid (South Africa): 21.449412

  • Hostnames without a Low/Mid match default to SKA-Mid.

Effective Source Order

For sunrise/sunset latitude and longitude:

  1. Device location (if enabled and available)

  2. Preferences manual values

  3. HEADER_CLOCKS_MANUAL_LATITUDE / HEADER_CLOCKS_MANUAL_LONGITUDE

  4. SITE_LATITUDE / SITE_LONGITUDE

  5. Greenwich fallback

For LST longitude:

  1. Preference LST Longitude

  2. HEADER_CLOCKS_LST_LONGITUDE

  3. URL-based SKAO site default (low/mid)

  4. HEADER_CLOCKS_MANUAL_LONGITUDE

  5. SITE_LONGITUDE

  6. SKA-Mid fallback

Persistence Compatibility

Header clock preferences are persisted in a backend-compatible way using both keys:

  • headerClocks (camelCase)

  • header_clocks (snake_case)

This avoids refresh reverts when environments are mixed across backend versions.

UTC Sunrise/Sunset Note

Sunrise/sunset are computed once using the same local timestamps.
The UTC tooltip values are the same events formatted in UTC.