Weather API: Difference between revisions
No edit summary |
No edit summary |
||
| (6 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
== Deep Sky Chile Weather API User Manual == | == Deep Sky Chile Weather API User Manual == | ||
The Deep Sky Chile Weather API provides real-time weather and astronomical data, including cloud cover, temperature, wind speed, rain, light levels, and key astronomical measurements. | The Deep Sky Chile Weather API provides real-time weather and astronomical data, including cloud cover, temperature, wind speed, rain, light levels, seeing conditions, and key astronomical measurements. | ||
=== Base URL === | === Base URL === | ||
The base URL for accessing the API is: http://api.deepskychile.com/weather | The base URL for accessing the API is: | ||
<code>http://api.deepskychile.com/weather</code> | |||
=== Endpoint === | === Endpoint === | ||
* '''GET /weather''': Retrieves the current weather and astronomical data, including cloud, rain, light states, and important astronomical metrics. | * '''GET /weather''': Retrieves the current weather and astronomical data, including cloud, rain, light states, seeing, and important astronomical metrics. | ||
=== Response Format === | === Response Format === | ||
The API returns | The API returns data in JSON format with the following structure: | ||
<pre> | |||
{ | { | ||
"weather": { | "weather": { | ||
"cloudwatcher": { | "cloudwatcher": { | ||
"clouds": | "clouds": <clouds_value>, | ||
"temp": | "temp": <temperature_value>, | ||
"wind": | "wind": <wind_speed>, | ||
"gust": | "gust": <wind_gust>, | ||
"rain": | "rain": <rain_value>, | ||
"light": | "light": <light_level>, | ||
"switch": | "switch": <switch_state>, | ||
"safe": | "safe": <safe_state>, | ||
"hum": | "hum": <humidity>, | ||
"dewp": | "dewp": <dew_point>, | ||
"cloudsState": " | "cloudsState": "<clouds_state>", | ||
"rainState": " | "rainState": "<rain_state>", | ||
"lightState": " | "lightState": "<light_state>" | ||
}, | }, | ||
"ninox": { | "ninox": { | ||
"UTC": " | "UTC": "<utc_time>", | ||
"NSBNow": | "NSBNow": <current_NSB_value>, | ||
"SunAltitude": | "SunAltitude": <sun_altitude>, | ||
"MoonAltitude": | "MoonAltitude": <moon_altitude>, | ||
"MoonPhase": | "MoonPhase": <moon_phase>, | ||
"ZenithGalacticLatitude": | "ZenithGalacticLatitude": <galactic_latitude>, | ||
"NightBestNSB": | "NightBestNSB": <best_NSB_value>, | ||
"NightBestNSBTime": " | "NightBestNSBTime": "<night_best_NSB_time>", | ||
"NightBestNSBZGL": | "NightBestNSBZGL": <night_best_ZGL>, | ||
"OverallBestNSB": | "OverallBestNSB": <overall_best_NSB_value>, | ||
"OverallBestNSBTime": " | "OverallBestNSBTime": "<overall_best_NSB_time>", | ||
"OverallBestNSBZGL": | "OverallBestNSBZGL": <overall_best_ZGL> | ||
}, | |||
"seeing": { | |||
"UTC": "<seeing_utc_time>", | |||
"SeeingValue": <seeing_value>, | |||
"status": "<seeing_monitor_status>", | |||
"avgSeeing": <average_seeing>, | |||
"monitoringSeeingStart": "<seeing_monitoring_start>", | |||
"minSeeing": <minimum_seeing_since_start>, | |||
"minSeeingTime": "<minimum_seeing_time>", | |||
"nightMinSeeing": <minimum_seeing_current_night>, | |||
"nightMinSeeingTime": "<minimum_seeing_time_current_night>" | |||
}, | }, | ||
"average": { | "average": { | ||
"avgHum": | "avgHum": <average_humidity>, | ||
"avgWind": | "avgWind": <average_wind_speed>, | ||
"avgTemp": | "avgTemp": <average_temperature>, | ||
"monitoringStart": " | "monitoringStart": "<monitoring_start_date>" | ||
} | } | ||
} | } | ||
} | } | ||
</pre> | |||
=== Fields === | |||
'''weather''' | |||
The main object containing weather data from four sources: <code>cloudwatcher</code>, <code>ninox</code>, <code>seeing</code>, and <code>average</code>. | |||
'''cloudwatcher (General Weather Data)''' | |||
* '''clouds''' (float): Current sky temperature in degrees Celsius. | |||
* '''temp''' (float): Current temperature in degrees Celsius. | |||
* '''wind''' (float): Wind speed in km/h. | |||
* '''gust''' (float): Wind gust speed in km/h. | |||
* '''rain''' (float): Rain value (unitless). | |||
* '''light''' (float): Ambient light level (unitless). | |||
* '''switch''' (integer): Lock switch status: | |||
* 1 – Observatories are unlocked. | |||
* 0 – Observatories are locked. | |||
* '''safe''' (integer): Safety status: | |||
* 1 – Safe. | |||
* 0 – Unsafe. | |||
* '''hum''' (float): Relative humidity (%). | |||
* '''dewp''' (float): Dew point temperature in degrees Celsius. | |||
* '''cloudsState''' (string): | |||
* "Clear" – Low cloud cover. | |||
* "Cloudy" – Moderate cloud cover. | |||
* "Overcast" – High cloud cover or fully covered skies. | |||
* '''rainState''' (string): | |||
* "Dry" – Rain > 2000. | |||
* "Wet" – Rain between 1700 and 2000. | |||
* "Raining" – Rain < 1700. | |||
* '''lightState''' (string): | |||
* "Dark" – Light > 8000. | |||
* "Bright" – Light between 6 and 8000. | |||
* "Sunny" – Light <= 6. | |||
'''ninox (Astronomical Data)''' | |||
* '''UTC''' (string): Current UTC time, format yyyy-mm-dd hh:mm:ss. | |||
* ''' | * '''NSBNow''' (float): Current sky-brightness (NSB) value; lower is darker. | ||
* ''' | * '''SunAltitude''' (float): Altitude of the Sun (°). | ||
* ''' | * '''MoonAltitude''' (float): Altitude of the Moon (°). | ||
* ''' | * '''MoonPhase''' (float): Moon phase (%). | ||
* ''' | * '''ZenithGalacticLatitude''' (float): Galactic latitude at zenith (°). | ||
* ''' | * '''NightBestNSB''' (float): Best NSB value for the current night. | ||
* '''NightBestNSBTime''' (string): Timestamp of <code>NightBestNSB</code>. | |||
* '''NightBestNSBZGL''' (float): Zenith galactic latitude at <code>NightBestNSBTime</code>. | |||
* ''' | * '''OverallBestNSB''' (float): Best overall NSB recorded. | ||
* '''OverallBestNSBTime''' (string): Timestamp of <code>OverallBestNSB</code>. | |||
* '''OverallBestNSBZGL''' (float): Galactic latitude at <code>OverallBestNSBTime</code>. | |||
* ''' | |||
* ''' | |||
* ''' | |||
* ''' | |||
* ''' | |||
'''seeing (Atmospheric Seeing Conditions)''' | |||
* '''UTC''' (string): | * '''UTC''' (string): UTC time of the current seeing measurement. | ||
* ''' | * '''SeeingValue''' (float): Current seeing value in arcseconds (lower = better). | ||
* ''' | * '''status''' (string): Operational status of the seeing monitor (e.g., "Monitoring", "Idle (Daytime)"). | ||
* ''' | * '''avgSeeing''' (float): Average seeing since monitoring began. | ||
* ''' | * '''monitoringSeeingStart''' (string): Start timestamp for seeing monitoring (yyyy-mm-dd hh:mm:ss). | ||
* ''' | * '''minSeeing''' (float): Lowest (best) seeing since <code>monitoringSeeingStart</code>. | ||
* '''minSeeingTime''' (string): Timestamp of <code>minSeeing</code>. | |||
* ''' | * '''nightMinSeeing''' (float): Best seeing during the current astronomical night. | ||
* ''' | * '''nightMinSeeingTime''' (string): Timestamp of <code>nightMinSeeing</code>. | ||
* ''' | |||
average (Averaged Historical Data) | '''average (Averaged Historical Data)''' | ||
* '''avgHum''' (float): | * '''avgHum''' (float): Average humidity (%) since monitoring began. | ||
* '''avgWind''' (float): | * '''avgWind''' (float): Average wind speed (km/h) since monitoring began. | ||
* '''avgTemp''' (float): | * '''avgTemp''' (float): Average temperature (°C) since monitoring began. | ||
* '''monitoringStart''' (string): | * '''monitoringStart''' (string): Start timestamp for historical averages (yyyy-mm-dd hh:mm:ss). | ||
=== Example Response === | === Example Response === | ||
<pre> | |||
{ | { | ||
"weather": { | "weather": { | ||
"cloudwatcher": { | "cloudwatcher": { | ||
"clouds": - | "clouds": -14.82, | ||
"temp": | "temp": 12.09, | ||
"wind": 3, | "wind": 3, | ||
"gust": | "gust": 3, | ||
"rain": | "rain": 5248, | ||
"light": | "light": 57232, | ||
"switch": 1, | "switch": 1, | ||
"safe": 1, | "safe": 1, | ||
"hum": | "hum": 22, | ||
"dewp": | "dewp": -9, | ||
"cloudsState": "Clear", | "cloudsState": "Clear", | ||
"rainState": "Dry", | "rainState": "Dry", | ||
"lightState": " | "lightState": "Dark" | ||
}, | }, | ||
"ninox": { | "ninox": { | ||
"UTC": " | "UTC": "2025-05-24 07:42:47", | ||
"NSBNow": | "NSBNow": 21.02, | ||
"SunAltitude": - | "SunAltitude": -48.5, | ||
"MoonAltitude": | "MoonAltitude": -10.7, | ||
"MoonPhase": | "MoonPhase": 11.42, | ||
"ZenithGalacticLatitude": - | "ZenithGalacticLatitude": -15.9, | ||
"NightBestNSB": | "NightBestNSB": 21.41, | ||
"NightBestNSBTime": " | "NightBestNSBTime": "2025-05-24 00:59:44", | ||
"NightBestNSBZGL": | "NightBestNSBZGL": 32, | ||
"OverallBestNSB": | "OverallBestNSB": 21.96, | ||
"OverallBestNSBTime": " | "OverallBestNSBTime": "2025-05-17 23:30:55", | ||
"OverallBestNSBZGL": | "OverallBestNSBZGL": 23.2 | ||
}, | |||
"seeing": { | |||
"UTC": "2025-05-24 07:35:03", | |||
"SeeingValue": 1.22, | |||
"status": "Idle (Daytime)", | |||
"avgSeeing": 0.93, | |||
"monitoringSeeingStart": "2025-05-21 14:04:05", | |||
"minSeeing": 0.48, | |||
"minSeeingTime": "2025-05-22 10:22:06", | |||
"nightMinSeeing": 0.54, | |||
"nightMinSeeingTime": "2025-05-24 06:20:06" | |||
}, | }, | ||
"average": { | "average": { | ||
"avgHum": | "avgHum": 25.22, | ||
"avgWind": | "avgWind": 3.37, | ||
"avgTemp": | "avgTemp": 15.26, | ||
"monitoringStart": "2023- | "monitoringStart": "2023-05-24 09:49:02" | ||
} | } | ||
} | } | ||
} | } | ||
</pre> | |||
=== Error Handling === | === Error Handling === | ||
If an error occurs while fetching the data, the API will return a generic HTTP error response (e.g., 500 Internal Server Error). | If an error occurs while fetching the data, the API will return a generic HTTP error response (e.g., 500 Internal Server Error). | ||
=== | === Example Request === | ||
To retrieve the current weather and astronomical data: | |||
<code>GET http://api.deepskychile.com/weather</code> | |||
=== | === Authentication === | ||
Currently, the API does not require authentication. Any future requirements will be documented here. | |||
=== Conclusion === | |||
This API provides detailed weather, seeing, and astronomical data to support stargazing, observatory operations, and long-term monitoring at Deep Sky Chile. | |||
[[Category:User manuals]] | [[Category:User manuals]] | ||
Latest revision as of 13:28, 8 December 2025
Deep Sky Chile Weather API User Manual[edit]
The Deep Sky Chile Weather API provides real-time weather and astronomical data, including cloud cover, temperature, wind speed, rain, light levels, seeing conditions, and key astronomical measurements.
Base URL[edit]
The base URL for accessing the API is:
http://api.deepskychile.com/weather
Endpoint[edit]
- GET /weather: Retrieves the current weather and astronomical data, including cloud, rain, light states, seeing, and important astronomical metrics.
Response Format[edit]
The API returns data in JSON format with the following structure:
{
"weather": {
"cloudwatcher": {
"clouds": <clouds_value>,
"temp": <temperature_value>,
"wind": <wind_speed>,
"gust": <wind_gust>,
"rain": <rain_value>,
"light": <light_level>,
"switch": <switch_state>,
"safe": <safe_state>,
"hum": <humidity>,
"dewp": <dew_point>,
"cloudsState": "<clouds_state>",
"rainState": "<rain_state>",
"lightState": "<light_state>"
},
"ninox": {
"UTC": "<utc_time>",
"NSBNow": <current_NSB_value>,
"SunAltitude": <sun_altitude>,
"MoonAltitude": <moon_altitude>,
"MoonPhase": <moon_phase>,
"ZenithGalacticLatitude": <galactic_latitude>,
"NightBestNSB": <best_NSB_value>,
"NightBestNSBTime": "<night_best_NSB_time>",
"NightBestNSBZGL": <night_best_ZGL>,
"OverallBestNSB": <overall_best_NSB_value>,
"OverallBestNSBTime": "<overall_best_NSB_time>",
"OverallBestNSBZGL": <overall_best_ZGL>
},
"seeing": {
"UTC": "<seeing_utc_time>",
"SeeingValue": <seeing_value>,
"status": "<seeing_monitor_status>",
"avgSeeing": <average_seeing>,
"monitoringSeeingStart": "<seeing_monitoring_start>",
"minSeeing": <minimum_seeing_since_start>,
"minSeeingTime": "<minimum_seeing_time>",
"nightMinSeeing": <minimum_seeing_current_night>,
"nightMinSeeingTime": "<minimum_seeing_time_current_night>"
},
"average": {
"avgHum": <average_humidity>,
"avgWind": <average_wind_speed>,
"avgTemp": <average_temperature>,
"monitoringStart": "<monitoring_start_date>"
}
}
}
Fields[edit]
weather
The main object containing weather data from four sources: cloudwatcher, ninox, seeing, and average.
cloudwatcher (General Weather Data)
- clouds (float): Current sky temperature in degrees Celsius.
- temp (float): Current temperature in degrees Celsius.
- wind (float): Wind speed in km/h.
- gust (float): Wind gust speed in km/h.
- rain (float): Rain value (unitless).
- light (float): Ambient light level (unitless).
- switch (integer): Lock switch status:
* 1 – Observatories are unlocked. * 0 – Observatories are locked.
- safe (integer): Safety status:
* 1 – Safe. * 0 – Unsafe.
- hum (float): Relative humidity (%).
- dewp (float): Dew point temperature in degrees Celsius.
- cloudsState (string):
* "Clear" – Low cloud cover. * "Cloudy" – Moderate cloud cover. * "Overcast" – High cloud cover or fully covered skies.
- rainState (string):
* "Dry" – Rain > 2000. * "Wet" – Rain between 1700 and 2000. * "Raining" – Rain < 1700.
- lightState (string):
* "Dark" – Light > 8000. * "Bright" – Light between 6 and 8000. * "Sunny" – Light <= 6.
ninox (Astronomical Data)
- UTC (string): Current UTC time, format yyyy-mm-dd hh:mm:ss.
- NSBNow (float): Current sky-brightness (NSB) value; lower is darker.
- SunAltitude (float): Altitude of the Sun (°).
- MoonAltitude (float): Altitude of the Moon (°).
- MoonPhase (float): Moon phase (%).
- ZenithGalacticLatitude (float): Galactic latitude at zenith (°).
- NightBestNSB (float): Best NSB value for the current night.
- NightBestNSBTime (string): Timestamp of
NightBestNSB. - NightBestNSBZGL (float): Zenith galactic latitude at
NightBestNSBTime. - OverallBestNSB (float): Best overall NSB recorded.
- OverallBestNSBTime (string): Timestamp of
OverallBestNSB. - OverallBestNSBZGL (float): Galactic latitude at
OverallBestNSBTime.
seeing (Atmospheric Seeing Conditions)
- UTC (string): UTC time of the current seeing measurement.
- SeeingValue (float): Current seeing value in arcseconds (lower = better).
- status (string): Operational status of the seeing monitor (e.g., "Monitoring", "Idle (Daytime)").
- avgSeeing (float): Average seeing since monitoring began.
- monitoringSeeingStart (string): Start timestamp for seeing monitoring (yyyy-mm-dd hh:mm:ss).
- minSeeing (float): Lowest (best) seeing since
monitoringSeeingStart. - minSeeingTime (string): Timestamp of
minSeeing. - nightMinSeeing (float): Best seeing during the current astronomical night.
- nightMinSeeingTime (string): Timestamp of
nightMinSeeing.
average (Averaged Historical Data)
- avgHum (float): Average humidity (%) since monitoring began.
- avgWind (float): Average wind speed (km/h) since monitoring began.
- avgTemp (float): Average temperature (°C) since monitoring began.
- monitoringStart (string): Start timestamp for historical averages (yyyy-mm-dd hh:mm:ss).
Example Response[edit]
{
"weather": {
"cloudwatcher": {
"clouds": -14.82,
"temp": 12.09,
"wind": 3,
"gust": 3,
"rain": 5248,
"light": 57232,
"switch": 1,
"safe": 1,
"hum": 22,
"dewp": -9,
"cloudsState": "Clear",
"rainState": "Dry",
"lightState": "Dark"
},
"ninox": {
"UTC": "2025-05-24 07:42:47",
"NSBNow": 21.02,
"SunAltitude": -48.5,
"MoonAltitude": -10.7,
"MoonPhase": 11.42,
"ZenithGalacticLatitude": -15.9,
"NightBestNSB": 21.41,
"NightBestNSBTime": "2025-05-24 00:59:44",
"NightBestNSBZGL": 32,
"OverallBestNSB": 21.96,
"OverallBestNSBTime": "2025-05-17 23:30:55",
"OverallBestNSBZGL": 23.2
},
"seeing": {
"UTC": "2025-05-24 07:35:03",
"SeeingValue": 1.22,
"status": "Idle (Daytime)",
"avgSeeing": 0.93,
"monitoringSeeingStart": "2025-05-21 14:04:05",
"minSeeing": 0.48,
"minSeeingTime": "2025-05-22 10:22:06",
"nightMinSeeing": 0.54,
"nightMinSeeingTime": "2025-05-24 06:20:06"
},
"average": {
"avgHum": 25.22,
"avgWind": 3.37,
"avgTemp": 15.26,
"monitoringStart": "2023-05-24 09:49:02"
}
}
}
Error Handling[edit]
If an error occurs while fetching the data, the API will return a generic HTTP error response (e.g., 500 Internal Server Error).
Example Request[edit]
To retrieve the current weather and astronomical data:
GET http://api.deepskychile.com/weather
Authentication[edit]
Currently, the API does not require authentication. Any future requirements will be documented here.
Conclusion[edit]
This API provides detailed weather, seeing, and astronomical data to support stargazing, observatory operations, and long-term monitoring at Deep Sky Chile.