Sun + Moon Calculator
Royalty Free
Calculate sun/moon positions and phases
Language
JavaScript
Metrics
API Calls - 383,189
Avg call duration -
1.46sec
Permissions
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT).
Learn More
Run an Example
Input
Output
{
"dawn": "2017-10-22T21:41:10.750Z",
"dusk": "2017-10-23T09:31:41.360Z",
"golden_hour": "2017-10-23T08:28:52.002Z",
"golden_hour_end": "2017-10-22T22:44:00.108Z",
"moon_altitude": -0.5289480705057222,
"moon_angle": -1.5180271321248808,
"moon_azimuth": -1.6180776214866397,
"moon_distance": 403993.661224214,
"moon_fraction": 0.1000407737691864,
"moon_parallactic_angle": -0.9658544274436652,
"moon_phase": 0.10243801154640614,
"moonrise": "2017-10-22T00:08:24.200Z",
"moonset": "2017-10-22T10:58:21.583Z",
"nadir": "2017-10-22T15:36:26.055Z",
"nautical_dawn": "2017-10-22T21:10:32.302Z",
"nautical_dusk": "2017-10-23T10:02:19.808Z",
"night": "2017-10-23T10:32:45.096Z",
"night_end": "2017-10-22T20:40:07.013Z",
"solar_noon": "2017-10-23T03:36:26.055Z",
"sun_altitude": 0.027987016697548252,
"sun_azimuth": -1.2984399100983957,
"sunrise": "2017-10-22T22:07:54.047Z",
"sunset": "2017-10-23T09:04:58.063Z",
"sunset_start": "2017-10-23T09:02:11.231Z",
"time": "2017-10-22T22:19:55.211Z"
}
Install and Use
Install
Install the Algorithmia CLI client by running:
curl -sSLf https://algorithmia.com/install.sh | sh
Then authenticate by running:
$ algo auth
# When prompted for api endpoint, hit enter
# When prompted for API key, enter your key: YOUR_API_KEY
Use
algo run jhurliman/SunMoonCalculator/0.1.0 -d '{
"time":"2017-10-22T22:19:55.211Z",
"lat":37.8044,
"lon":122.2711
}' --timeout 300