> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plantpredict.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sun Position & Extra-terrestrial Irradiance Overview

export const Decomposition = () => <Tooltip tip="Separating GHI into direct (DNI) and diffuse (DHI) components using empirical models.">
    decomposition
  </Tooltip>;

export const Transposition = () => <Tooltip tip="Converting horizontal irradiance components to plane-of-array (tilted surface) irradiance.">
    transposition
  </Tooltip>;

export const Refraction = () => <Tooltip tip="Bending of light as it passes through earth's atmosphere, making the sun appear higher than its true position.">
    refraction
  </Tooltip>;

export const AirMass = () => <Tooltip tip="Ratio of atmospheric path length to path length at zenith; equals 1 when sun is overhead.">
    air mass
  </Tooltip>;

export const Aberration = () => <Tooltip tip="Apparent displacement of a celestial object due to the finite speed of light and earth's orbital motion.">
    aberration
  </Tooltip>;

export const Nutation = () => <Tooltip tip="Short-period oscillations in earth's axis caused by gravitational torques from sun and moon.">
    nutation
  </Tooltip>;

export const Azimuth = () => <Tooltip tip="Horizontal angle measured clockwise from north; applies to sun direction or surface orientation.">
    azimuth
  </Tooltip>;

export const Zenith = () => <Tooltip tip="Angle between the local vertical and the sun (0° = overhead, 90° = horizon).">
    zenith
  </Tooltip>;

This section covers the fundamental astronomical calculations required for solar energy prediction. These models calculate the solar irradiance at the top of the atmosphere and the sun's apparent position from the point of view of the observer, forming the foundation for all subsequent irradiance and energy production models.

## Models in This Section

### [Extraterrestrial Irradiance](extraterrestrial_irradiance)

Calculates the solar irradiance at the top of the atmosphere using the Spencer equation for earth-sun distance correction. This represents the maximum possible solar energy available before atmospheric attenuation.

### [Solar Position Algorithm](solar_position_algorithm)

Calculates the sun's apparent position (<Zenith /> and <Azimuth /> angles) using the NREL Solar Position Algorithm (SPA). Includes corrections for <Nutation />, <Aberration />, and atmospheric <Refraction />.

### [Sunrise and Sunset Determination](sunrise_sunset)

Determines daily sunrise and sunset times for the site location. Used for timestamp adjustment, handles the edge cases of polar regions where the sun may not rise or set for multiple days.

### [Air Mass](air_mass)

Calculates the relative path length of solar radiation through the atmosphere (<AirMass /> or AM). Two model options: Bird-Hulstrom and Kasten-Sandia. Both include pressure correction for site elevation.

## Calculation Sequence

1. **Extraterrestrial Irradiance** → Top-of-atmosphere DNI
2. **Solar Position** → Apparent sun zenith and azimuth angles
3. **Sunrise/Sunset** → Day boundaries for timestamp adjustment
4. **Air Mass** → Atmospheric path length (depends on zenith angle)

These outputs feed into <Transposition /> models, tracking algorithms, diffuse-direct <Decomposition />, and spectral corrections.
