SDK JS
    Preparing search index...

    Function computeTimelineBands

    • Turn a day's solar events into contiguous TimelineBands spanning the whole local day, for painting the scrubber track. The day opens in fallbackPhase (deep night around local midnight) and switches phase at each valid solar event.

      Parameters

      • times: SolarTimes

        The day's solar event instants (Atmosphere's SolarTimes, e.g. from solarTimes(date, lng, lat)).

      • lng: number

        Longitude in degrees the solar time is referenced to (the events are converted to local solar minute-of-day at this longitude).

      • fallbackPhase: BandPhase = 'night'

        The phase the day starts in before the first event. Default 'night'.

      Returns TimelineBand[]

      Bands ordered by startMin, jointly covering [0, 1440]. Never throws: invalid events (polar day/night yield Invalid Date) are skipped, so the surrounding band widens.