sun_moon
Compute sunrise, sunset, twilight, moon phase, and shadow-length ratio for any location. Supports offline calculations for shadow studies, solar analysis, and photography timing.
Instructions
Get sunrise, sunset, twilight, golden hour and moon phase for a location.
Computed offline from astronomical formulas -- no network needed.
Includes the shadow-length ratio, which is what construction shadow studies, right-to-light assessments and solar-panel shading analysis actually need: a 10 m object at 30 degrees solar elevation casts a 17.3 m shadow. Also used for photography scheduling, crop modelling, delivery windows before dusk, and retail daylight-hours analysis.
Inside the polar circles, events that do not occur are returned as null with an explanation rather than as an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on_date | No | Date as YYYY-MM-DD. Defaults to today (UTC). | |
| location | Yes | Position, as coordinates or a place name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sun | Yes | ||
| date | Yes | ||
| meta | Yes | ||
| moon | Yes | ||
| latitude | Yes | ||
| timezone | Yes | ||
| longitude | Yes | ||
| position_now | No |