@@ -10,17 +10,16 @@ export const spec = {
'/api/position' : {
get : {
summary : 'Station position' ,
description : 'Latest GPS position and info ' ,
parameters : [ ] ,
description : 'Latest GPS position and altitude ' ,
responses : {
200 : {
description : 'Last known position' ,
content : { 'application/json' : { schema : { $ref : '#/components/schemas/DataRow ' } } }
content : { 'application/json' : { schema : { $ref : '#/components/schemas/Position ' } } }
}
}
}
} ,
'/api/data ' : {
'/api/current ' : {
get : {
summary : 'Current conditions' ,
description : 'Latest reading of all metrics — sensor, forecast, celestial & space weather merged into a single flat object' ,
@@ -82,153 +81,79 @@ export const spec = {
Position : {
type : 'object' ,
properties : {
lat : { type : 'number' , description : 'Latitude' } ,
lon : { type : 'number' , description : 'Longitude' } ,
alt : { type : 'number' , description : 'Altitude' } ,
latitude : { type : 'number' , description : 'Latitude (°) ' } ,
longitude : { type : 'number' , description : 'Longitude (°) ' } ,
altitude : { type : 'number' , description : 'Altitude (m) ' } ,
}
} ,
DataRow : {
type : 'object' ,
properties : {
time : { type : 'string' , description : 'ISO8601 timestamp or date ' } ,
time : { type : 'string' , format : 'date-time' , description : 'ISO8601 timestamp' } ,
// Environment
temperature : { type : 'number' , description : 'Temperature (°C)' } ,
env _temp _f : { type : 'number' , description : 'T emperature (°F )' } ,
env _temp _min _c : { type : 'number' , description : 'Daily min temperature (°C)' } ,
env _temp _max _c : { type : 'number' , description : 'Daily max temperature (°C )' } ,
humidity : { type : 'number' , description : 'Relativ e humidity (% )' } ,
dew _point : { type : 'number' , description : 'Dew point (°C)' } ,
heat _index : { type : 'number' , description : 'Feels like / heat index (°C)' } ,
pressure _hpa : { type : 'number' , description : 'Station pressure (h Pa)' } ,
pressure _slp : { type : 'number' , description : 'Sea level pressure (hPa)' } ,
pressure _rate : { type : 'number' , description : 'Pressure change rat e (hPa/hr )' } ,
pressure _trend : { type : 'string' , enum : [ 'Rising' , 'Falling' , 'Stable' ] , description : 'Pressure trend label ' } ,
humidity _abs : { type : 'number' , description : 'Absolute humidity (g/m³) ' } ,
vapor _pressure _deficit : { type : 'number' , description : 'Vapour pressure deficit (kPa) ' } ,
air _quality _ohms : { type : 'number' , description : 'BME680 gas resistance (Ω )' } ,
air _quality : { type : 'number' , description : 'Air quality index score (0– 100)' } ,
air _quality _label : { type : 'string' , enum : [ 'Excellent' , 'Good' , 'Fair' , 'Poor' , 'Very Poor' ] } ,
frost _risk : { type : 'string' , enum : [ 'None' , 'Low' , 'Moderate' , 'High' ] } ,
// Light
lux : { type : 'number' , description : 'Illuminance (lux) ' } ,
uv _index : { type : 'number' , description : 'UV index ' } ,
solar _wm2 : { type : 'number' , description : 'Solar irradiance (W/m²)' } ,
uv _dose : { type : 'number' , description : 'Accumulated UV dose today (mJ/cm² )' } ,
light _burn _time _min : { type : 'number' , description : 'Time to sunburn skin type 2 (min )' } ,
clouds : { type : 'number' , description : 'Estimated cloud cover (% )' } ,
light _cloud _label : { type : 'string' , enum : [ 'Clear' , 'Partly Cloudy' , 'Mostly Cloudy' , 'Overcast' ] } ,
light _dli : { type : 'number' , description : 'Daily light integral (mol/m²/day)' } ,
daylight : { type : 'number ' , description : 'Hours above daylight threshold today ' } ,
visibility : { type : 'number ' , description : 'Estimated visibility (km) ' } ,
uv _index _max : { type : 'number' , description : 'Daily max UV index' } ,
solar _wm2 _sum : { type : 'number' , description : 'Daily solar radiation sum (MJ/m² )' } ,
// Wind (Open-Meteo)
wind _speed _kmh : { type : 'number' , description : 'Wind speed (km/h )' } ,
wind _direction _deg : { type : 'number' , description : 'Wind direction (°) ' } ,
wind _gusts _kmh : { type : 'number' , description : 'Wind gusts (km/h)' } ,
wind _speed _max _kmh : { type : 'number' , description : 'Daily max w ind speed (km/h)' } ,
wind _gusts _max _kmh : { type : 'number' , description : 'Daily max w ind gusts (km/h)' } ,
// Forecast
forecast _weathercode : { type : 'number' , description : 'WMO weather code' } ,
forecast _weather _label : { type : 'string' , description : 'Human readable weather label' } ,
forecast _weather _icon : { type : 'string' , description : 'Local icon path e.g. 01d' } ,
forecast _precipitation _mm : { type : 'number' , description : 'Precipitation (mm)' } ,
forecast _precipitation _probability : { type : 'number' , description : 'Precipitation probability (%)' } ,
forecast _snowfall _mm : { type : 'number' , description : 'Snowfall (mm)' } ,
forecast _snow _depth _m : { type : 'number' , description : 'Snow depth (m)' } ,
forecast _cape : { type : 'number' , description : 'Convective available potential energy (J/kg)' } ,
forecast _freezing _level _m : { type : 'number' , description : 'Freezing level altitude (m)' } ,
forecast _evapotranspiration _mm : { type : 'number' , description : 'Evapotranspiration (mm)' } ,
// Seismic
seismic _ax : { type : 'number' , description : 'Peak acceleration X axis (g)' } ,
seismic _ay : { type : 'number' , description : 'Peak acceleration Y axis (g)' } ,
seismic _az : { type : 'number' , description : 'Peak acceleration Z axis (g, includes gravity)' } ,
seismic _magnitude : { type : 'number' , description : 'Peak seismic magnitude (g, gravity removed)' } ,
// Compass
compass _heading : { type : 'number' , description : 'Magnetic heading (°)' } ,
compass _x : { type : 'number' } ,
compass _y : { type : 'number' } ,
compass _z : { type : 'number' } ,
// Ground / Accumulation
ground _distance : { type : 'number' , description : 'LIDAR ground distance (cm)' } ,
lidar _strength : { type : 'number' , description : 'LIDAR signal strength' } ,
ground _calibration : { type : 'number' , description : 'Calibrated baseline distance (cm)' } ,
accumulation : { type : 'number' , description : 'Snow/flood depth (cm)' } ,
ground _accumulation _type : { type : 'string' , enum : [ 'snow' , 'slush' , 'ice' , 'flood' ] , description : 'Accumulation type' } ,
temperature : { type : 'number' , description : 'Temperature (°C)' } ,
env _temp _min _c : { type : 'number' , description : 'Daily min t emperature (°C )' } ,
env _temp _max _c : { type : 'number' , description : 'Daily max temperature (°C)' } ,
humidity : { type : 'number' , description : 'Relative humidity (% )' } ,
humidity _abs : { type : 'number' , description : 'Absolut e humidity (g/m³ )' } ,
dew _point : { type : 'number' , description : 'Dew point (°C)' } ,
heat _index : { type : 'number' , description : 'Feels like / heat index (°C)' } ,
vapor _ pressure_deficit : { type : 'number' , description : 'Vapour pressure deficit (k Pa)' } ,
pressure _hpa : { type : 'number' , description : 'Station pressure (hPa)' } ,
pressure _slp : { type : 'number' , description : 'Sea level pressur e (hPa)' } ,
pressure _rate : { type : 'number' , description : 'Pressure change rate (hPa/hr) ' } ,
pressure _trend : { type : 'string' , enum : [ 'Rising' , 'Falling' , 'Stable' ] , description : 'Pressure trend label ' } ,
frost _risk : { type : 'string' , enum : [ 'None' , 'Low' , 'Moderate' , 'High' ] , description : 'Frost risk level ' } ,
air _quality : { type : 'number' , description : 'Air quality index score (0– 100 )' } ,
air _quality _label : { type : 'string' , enum : [ 'Excellent' , 'Good' , 'Fair' , 'Poor' , 'Very Poor' ] } ,
// Light & Solar
lux : { type : 'number' , description : 'Illuminance (lux)' } ,
uv _index : { type : 'number' , description : 'UV index' } ,
uv _index _max : { type : 'number' , description : 'Daily max UV index ' } ,
uv _dose : { type : 'number' , description : 'Accumulated UV dose today (mJ/cm²) ' } ,
solar _wm2 : { type : 'number' , description : 'Solar irradiance (W/m²)' } ,
daily _light _integral : { type : 'number' , description : 'Daily light integral (mol/m²/day )' } ,
clouds : { type : 'number' , description : 'Cloud cover fraction (0– 1 )' } ,
visibility : { type : 'number' , description : 'Estimated visibility (km )' } ,
day light: { type : 'number' , description : 'Hours of daylight' } ,
// Weather
label : { type : 'string ' , description : 'Human readable weather label ' } ,
icon : { type : 'string ' , description : 'OWM icon code e.g. 01d ' } ,
raining : { type : 'string' , enum : [ 'True' , 'False' ] } ,
precipitation : { type : 'number' , description : 'Precipitation (mm )' } ,
precipitation _chance : { type : 'number' , description : 'Precipitation probability (%)' } ,
accumulation : { type : 'number' , description : 'Accumulated precipitation (mm )' } ,
storm _trend : { type : 'number' , description : '1=worsening, 0=stable, -1=improving ' } ,
// Wind
wind _speed : { type : 'number' , description : 'W ind speed (km/h)' } ,
wind _gusts : { type : 'number' , description : 'W ind gusts (km/h)' } ,
wind _direction : { type : 'number' , description : 'Wind direction (°)' } ,
// Lightning
lightning _distanc e : { type : 'number' , description : 'Lightning strike distance (km )' } ,
lightning _energy : { type : 'number' , description : 'Lightning energy ' } ,
lightning _strikes _per _hour : { type : 'number' , description : 'Strike rate (strikes/hr)' } ,
storm _direction : { type : 'string' , enum : [ 'Approaching' , 'Retreating' , 'Stationary' ] } ,
lightning _false _positive : { type : 'number' , description : '1 if disturber/false positive' } ,
lightning _detector _sensitivity : { type : 'number' , description : 'AS3935 noise floor setting (0– 7)' } ,
// GPS
latitude : { type : 'number' , description : 'Latitude (°)' } ,
longitude : { type : 'number' , description : 'Longitude (°)' } ,
altitude : { type : 'number' , description : 'Altitude (m)' } ,
gps _satellites : { type : 'number' , description : 'Satellites in view' } ,
gps _speed _kmh : { type : 'number' , description : 'Ground speed (km/h)' } ,
gps _heading : { type : 'number' , description : 'GPS heading (°)' } ,
lightning _rat e : { type : 'number' , description : 'Strike rate (strikes/hr )' } ,
lightning _distance : { type : 'number' , description : 'Lightning strike distance (km) ' } ,
// Sun
sun _elevation : { type : 'number' , description : 'Solar elevation angle (°)' } ,
sun _azimuth : { type : 'number' , description : 'Solar azimuth (°)' } ,
sun _ sunrise: { type : 'string' , description : 'Sunrise time (ISO8601) ' } ,
sun _ sunset: { type : 'string' , description : 'Sunset time (ISO8601) ' } ,
sun _solar _noon : { type : 'string ' , description : 'Solar noon (ISO8601) ' } ,
sun _day _length _hours : { type : 'number' , description : 'Day length (hours)' } ,
sun _golden _hour _morning _start : { type : 'string' } ,
sun _golden _hour _morning _end : { type : 'string' } ,
sun _golden _hour _evening _start : { type : 'string' } ,
sun _golden _hour _evening _end : { type : 'string' } ,
sun _is _day : { type : 'number' , description : '1 if daytime' } ,
sun _ssn : { type : 'number' , description : 'Estimated sunspot number' } ,
sun _activity _label : { type : 'string' , enum : [ 'Very Low' , 'Low' , 'Moderate' , 'High' , 'Very High' ] } ,
sun _elevation : { type : 'number' , description : 'Solar elevation angle (°)' } ,
sun _azimuth : { type : 'number' , description : 'Solar azimuth (°)' } ,
sunrise : { type : 'string' , format : 'date-time' , description : 'Sunrise time' } ,
sunset : { type : 'string' , format : 'date-time' , description : 'Sunset time' } ,
daytime : { type : 'boolean ' , description : 'True if between sunrise and sunset ' } ,
// Moon
moon _phase : { type : 'string' , description : 'Moon phase name' } ,
moon _illumination _pct : { type : 'number' , description : 'Moon illumination (%)' } ,
moon _moonrise : { type : 'string ' , description : 'Moonrise time (ISO8601 )' } ,
moon _moonset : { type : 'string ' , description : 'Moonset time (ISO8601 )' } ,
moon_next _full : { type : 'string' , description : 'Next full moon (ISO8601) ' } ,
moon_next _new : { type : 'string' , description : 'Next new moon (ISO8601) ' } ,
// Season
seas on_next _event : { type : 'string' , description : 'Next solstice/equinox name ' } ,
season _next _event _date : { type : 'string' } ,
season _last _event : { type : 'string ' } ,
season _last _event _date : { type : 'string' } ,
// Space weather
space _kp _index : { type : 'number' , description : 'Planetary K index (0– 9)' } ,
space _ap _in dex : { type : 'number' , description : 'Ap geomagnetic index ' } ,
space _geomagnetic _storm : { type : 'string' , enum : [ 'None' , 'Minor' , 'Moderate' , 'Strong' , 'Severe' ] } ,
space _solar _wind _speed _kms : { type : 'number' , description : 'Solar wind speed (km/s )' } ,
space _solar _wind _density : { type : 'number' , description : 'Solar wind proton density (p/cm³)' } ,
space _solar _wind _temp : { type : 'number' , description : 'Solar wind temperature (K)' } ,
space _imf _bz : { type : 'number' , description : 'IMF Bz component (nT)' } ,
space _imf _bt : { type : 'number' , description : 'IMF total field Bt (nT)' } ,
space _solar _flux _f107 : { type : 'number' , description : 'Solar flux F10.7 index' } ,
// Marine
wave _height : { type : 'number' , description : 'Significant wave height (m)' } ,
wave _direction : { type : 'number' , description : 'Wave direction (°)' } ,
wave _period : { type : 'number' , description : 'Wave period (s)' } ,
swell _wave _height : { type : 'number' , description : 'Swell wave height (m)' } ,
swell _wave _direction : { type : 'number' , description : 'Swell direction (°)' } ,
swell _wave _period : { type : 'number' , description : 'Swell period (s)' } ,
wind _wave _height : { type : 'number' , description : 'Wind wave height (m)' } ,
wave _height _max : { type : 'number' , description : 'Daily max wave height (m)' } ,
// AQ
pm10 : { type : 'number' , description : 'PM10 (μg/m³)' } ,
pm2 _5 : { type : 'number' , description : 'PM2.5 (μg/m³)' } ,
carbon _monoxide : { type : 'number' , description : 'CO (μg/m³)' } ,
nitrogen _dioxide : { type : 'number' , description : 'NO₂ (μg/m³)' } ,
sulphur _dioxide : { type : 'number' , description : 'SO₂ (μg/m³)' } ,
ozone : { type : 'number' , description : 'O₃ (μg/m³)' } ,
aerosol _optical _depth : { type : 'number' } ,
dust : { type : 'number' , description : 'Dust (μg/m³)' } ,
alder _pollen : { type : 'number' , description : 'Alder pollen (grains/m³)' } ,
birch _pollen : { type : 'number' , description : 'Birch pollen (grains/m³)' } ,
grass _pollen : { type : 'number' , description : 'Grass pollen (grains/m³)' } ,
mugwort _pollen : { type : 'number' , description : 'Mugwort pollen (grains/m³)' } ,
olive _pollen : { type : 'number' , description : 'Olive pollen (grains/m³)' } ,
ragweed _pollen : { type : 'number' , description : 'Ragweed pollen (grains/m³)' } ,
moon _phase : { type : 'string' , description : 'Moon phase name' } ,
moon _illumination : { type : 'number' , description : 'Moon illumination (%)' } ,
moon _elevation : { type : 'number ' , description : 'Moon elevation (° )' } ,
moon _azimuth : { type : 'number ' , description : 'Moon azimuth (° )' } ,
moonrise : { type : 'string' , format : 'date-time' , description : 'Moonrise time ' } ,
moonset : { type : 'string' , format : 'date-time' , description : 'Moonset time ' } ,
moon _new : { type : 'string' , format : 'date-time' , description : 'Next new moon' } ,
mo on_full : { type : 'string' , format : 'date-time' , description : 'Next full moon ' } ,
// Seismic
seismic _magnitude : { type : 'number' , description : 'Peak seismic magnitude (g) ' } ,
// Ground
ground _distance : { type : 'number' , description : 'LIDAR ground distance (cm)' } ,
// GPS
latitu de: { type : 'number' , description : 'Latitude (°) ' } ,
longitude : { type : 'number' , description : 'Longitude (°)' } ,
altitude : { type : 'number' , description : 'Altitude (m )' } ,
}
}
}