Solar Times Provider

The Solar Provider calculates sun rise, set and noon dates for a given location.

Solar Provider

The Solar Provider calculates sun rise, set and noon dates for a given location, date and timezone using the a modified NOAA Solar Calculator algorithm.

Configuration

  • GPS Location
    This is normally the own location.
    The location input comes normally from the Location or GPS provider.
    Coordinates must be in Decimal degrees (DD) format like latitude, longitude, e.g. 41.40338, 2.17403. Decimal separator is a dot.

  • Date
    The date and timezone for the solar time calculation.
    The date must be an ISO formatted time like yyyy-MM-dd’T’HH:mm:ssXX with timezone info, e.g. from the Time provider, a date format of yyyy-MM-dd (using the local timezone) or leave it empty for the actual date.

  • Result Timezone
    Timezone for calculated result times; defaults to the current location.

  • Obstruction Angle
    Sometimes, at a fixed location like home, the horizon may be obscured by a hill or terrain obstacle. Use the obstruction angle of the obstacle to adjust the solar times in such a case.
    The angle may be calculated by angle = atan(obstacle height / distance between observer and obstacle).

    As a rule of thumb:
    A sunrise obstruction angle of 1° adds approximately 5 minutes to the calculated sunrise time.
    A sunset obstruction angle of 1° subtracts approximately 5 minutes from the calculated sunset time.

    The timing also depends on the day of the year because the sun moves at different speeds along its apparent path across the sky due to Earth’s elliptical orbit and axial tilt.
    This means the delay or subtraction caused by the obstruction angle can vary slightly throughout the year.

Query

  • Status

    Text Numeric Description

    N/A

    0

    Date or location is invalid

    Excellent

    1

    Date and location are valid

  • Sunrise
    Date and time of sunrise.

    Text Numeric

    Time in the format specified by Param 1

    Milliseconds since 1970-01-01 00:00:00 UTC + Timezone

    • Param 1
      Output time format; see Time Format. Empty keeps the default ISO value.

  • Sunset
    Date and time of sunset.

    Text Numeric

    Time in the format specified by Param 1

    Milliseconds since 1970-01-01 00:00:00 UTC + Timezone

    • Param 1
      Output time format; see Time Format. Empty keeps the default ISO value.

  • Noon
    Date and time of noon, the highest sun position of the day.

    Text

    Numeric

    Time in the format specified by Param 1

    Milliseconds since 1970-01-01 00:00:00 UTC + Timezone

    • Param 1
      Output time format; see Time Format. Empty keeps the default ISO value.

  • Day Phase
    The day phase as percentage from 0 (sunrise) to 100 (sunset).
    It is 0 before sunrise and 100 after sunset.

  • Is Day
    1 if the local time is between sunrise and sunset, 0 otherwise.

  • Daytime
    Return the duration of the day from sunrise to sunset.

    Text Numeric

    Daytime duration in the format specified by Param 1

    Daytime duration in milliseconds

    • Param 1
      Repeating a token pads with leading zeros.
      Available Pattern Tokens:

      Token Duration element

      S

      Milliseconds

      s

      Seconds

      m

      Minutes

      H

      Hours

      d

      Days

      w

      Weeks

      'text'

      Text content

      E.g. use "HH:mm" for an countdown

  • Nighttime
    Return the duration of the night from sunset to sunrise of the next day.

    Text Numeric

    Nighttime duration in the format specified by Param 1

    Nighttime duration in milliseconds

    • Param 1
      Repeating a token pads with leading zeros.
      Available Pattern Tokens:

      Token Duration element

      S

      Milliseconds

      s

      Seconds

      m

      Minutes

      H

      Hours

      d

      Days

      w

      Weeks

      'text'

      Text content

      E.g. use "HH:mm" for an countdown

  • Next Time
    Date and time of the next sunrise or sunset in relation to the actual time.

    Text

    Numeric

    Time in the format specified by Param 1

    Milliseconds since 1970-01-01 00:00:00 UTC + Timezone

    • Param 1
      Output time format; see Time Format. Empty keeps the default ISO value.

  • Next Name
    sunrise (0) or sunset (1) in relation to the actual time.