# Wndsn Sun Calculator

Companion to Wndsn Quadrant Telemeters: Low tech, high utility graphical distance computers from the Wndsn applied science lab.

*By way of using a Wndsn Quadrant to measure local latitude and calculate declination for a given date, a number of values can be derived through further Quadrant computations.*

Knowing the noon altitude of the Sun, we can calculate the solar declination δ and vice versa.

The declination of the Sun is the angle between the Sun's rays and the equatorial plane of the Earth. The declination angle is the same for anywhere on Earth on a given day.

## Input

## Results

The equations are proof-of-concept formulas and ignore specifics like atmospheric refraction, etc. The calculated results are FOR EDUCATIONAL PURPOSES ONLY; some are exact, some are approximate, and some are simplified. Actual Sun data may vary significantly.

### Input

- Latitude φ:
`52.5°`

- Date:
`2019-01-06`

- Instantaneous Sun altitude h:
`10°`

### General calculations for latitude

- Maximum solar altitude H on equinoxes for latitude given:
`37.5°`

- Maximum solar altitude H on summer solstice for latitude given:
`60.94°`

- Maximum solar altitude H on winter solstice for latitude given:
`14.06°`

- Summer solstice sunrise α
_{sr}and sunset α_{ss}azimuth:and`49.2°`

`310.8°`

- Winter solstice sunrise α
_{sr}and sunset α_{ss}azimuth:and`130.8°`

`229.2°`

### Diurnal calculations for latitude and declination or date

- Day #:
`6`

- Declination δ:
`-22.49°`

- Sunrise azimuth α
_{sr}:`128.93°`

- Sunset azimuth α
_{ss}:`231.07°`

- Hour angle at sunrise t
_{sr}:`57.35°`

- Sun hours:
`07:36`

- Length of unequal Sun hour:
`38 min`

- Noon altitude H:
`15.01°`

- Equation of time:
`-05:12`

### Instantaneous calculations for Sun altitude

- Hour angle t:
`31.98°`

- Time to or from noon:
`02:04`

- Sun azimuth α
_{s}:`156.23°`

- Shadow length (of a stick with a height of 1 unit):
`5.67`

The *display* precision set is `.2`

. To change that, edit the variable `&digits=x`

in the URL where `0 <= x <= 9`

.

## Explanation

[Load sample values (JSON) (XML) (CSV).]

- H(φ,δ)
- Sun altitude at noon H from latitude:

`H = (90° − φ) + δ`

- α
_{sr}(φ,δ) - Azimuth α
_{sr}of rising/setting sun:

`cos α`

_{sr}= sin δ / cos φ - t
_{sr}(φ,δ) - Hour angle t
_{sr}of rising/setting sun (from noon):

`cos t`

_{sr}= -tan φ * tan δ - t(h,φ,δ)
- Hour angle t from instantaneous Sun altitude h:

`sin t = (sin h - sin δ * sin φ) / (cos δ * cos φ)`

- α
_{s}(t,φ,δ) - Sun azimuth α
_{s}for a given hour:

`tan α`

_{s}= (sin t / (sin φ * cos t)) - cos φ * tan δ

where H = Sun altitude at noon, h = instantaneous Sun altitude, t = hour angle, φ = latitude, and δ = declination.

## Reference

1 rad = 57.3 deg 6.2832 rad = 360 deg = 6283.2 mil = 21,600 minutes (moa) 0.017453 rad = 1 deg = 17.453 mil = 60 minutes (moa) 0.0573 deg = 1 mil = 3.438 minutes (moa)