Source: https://guthlabs.ai/docs/instruments/sunrise-sunset-calculator/implementation/

instrument implementation / implementation-contract

# Sunrise/Sunset Calculator implementation

A source-bound implementation contract for Sunrise/Sunset Calculator; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t6-040

**Effect**: Computation or source lookup only

## Input and validation requirements

The pole input at latitude exactly 90 degrees causes the NOAA hour-angle expression to divide by cos(latitude)=0. Without an explicit pole or polar-condition guard, the calculator can return Infinity, NaN, or fabricated sunrise and sunset times. Longitude-sign ambiguity can also shift every local result by four hours if east/west convention is not documented.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "latitude_deg": 0,
    "longitude_deg": 0,
    "date": "2023-01-01",
    "timezone_utc_offset_hours": 0,
    "zenith_deg": 90.833
  },
  "expected_outputs": {
    "solar_noon_local": "12:02:54",
    "sunrise_local": "05:59:17",
    "sunset_local": "18:06:32",
    "day_length": "12:07:15"
  },
  "working": "N=1, so gamma=2*pi*(1-1)/365=0. Declination = 0.006918-0.399912-0.006758-0.002697=-0.402449 rad=-23.07 degrees. Equation of time = 229.18*(0.000075+0.001868-0.014615)=229.18*(-0.012672)=-2.904 minutes. cos(H0)=[cos(90.833)-sin(0)*sin(-23.07)]/[cos(0)*cos(-23.07)]=(-0.01454)/(0.9201)=-0.01580. H0=acos(-0.01580)=90.9055 degrees. Solar noon=720-4*0-(-2.904)+60*0=722.904 minutes=12:02:54. Sunrise=722.904-4*90.9055=359.282 minutes=05:59:17. Sunset=722.904+363.622=1086.526 minutes=18:06:32. Day length=2*(363.622)=727.244 minutes=12:07:15."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/sunrise-sunset-calculator/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/sunrise-sunset-calculator/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/sunrise-sunset-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche6/tranche6-results.json`
