SimTX API/Packets/WeatherMapResponse: Difference between revisions
Appearance
Clanker moved page SimTX API/Packets/WeatherMapResponse to SimTX API v24/Packets/WeatherMapResponse: Archive the v24 protocol reference Tag: New redirect |
Protocol v25 reference: WeatherMapResponse Tag: Removed redirect |
||
| Line 1: | Line 1: | ||
# | {{SimTX API navigation}} | ||
{{SimTX packet | |||
| name = WeatherMapResponse | |||
| frame = ServerFrame | |||
| field = 33 | |||
| member = weather_map | |||
| direction = s2c | |||
| session = [[SimTX API/Control session|Control]] | |||
| roles = <code>ROLE_CONTROL</code>. | |||
| permission = None | |||
| answers = [[SimTX API/Packets/WeatherMapRequest|WeatherMapRequest]] | |||
| group = control | |||
| file = control.proto | |||
}} | |||
'''WeatherMapResponse''' returns the raster requested by a [[SimTX API/Packets/WeatherMapRequest|WeatherMapRequest]], with a summary of the weather at the centre of the area. | |||
== Definition == | |||
<syntaxhighlight lang="protobuf"> | |||
message WeatherMapResponse { | |||
int64 request_id = 1; | |||
int64 valid_time_ms = 2; | |||
string type = 3; // weather type (string enum, common.proto) | |||
double south_latitude_deg = 4; | |||
double north_latitude_deg = 5; | |||
double west_longitude_deg = 6; | |||
double east_longitude_deg = 7; | |||
int32 width = 8; | |||
int32 height = 9; | |||
repeated float values = 10; | |||
float surface_temperature_celsius = 11; | |||
float surface_pressure_hpa = 12; | |||
float surface_relative_humidity_percent = 13; | |||
float surface_wind_meters_per_second = 14; | |||
float maximum_rain_rate_millimeters_per_hour = 15; | |||
float maximum_cloud_water_grams_per_cubic_meter = 16; | |||
float cape_joules_per_kilogram = 17; | |||
float lightning_flashes_per_minute = 18; | |||
string duct_type = 19; // duct type (string enum, common.proto) | |||
float duct_base_meters = 20; | |||
float duct_top_meters = 21; | |||
float duct_strength_m_units = 22; | |||
float duct_gradient_m_units_per_kilometer = 23; | |||
} | |||
</syntaxhighlight> | |||
== Fields == | |||
{| class="wikitable" | |||
! # !! Field !! Type !! Description | |||
|- | |||
| 1 || <code>request_id</code> || <code>int64</code> || The request this answers. | |||
|- | |||
| 2 || <code>valid_time_ms</code> || <code>int64</code> || Simulated time the data is valid for, Unix ms. | |||
|- | |||
| 3 || <code>type</code> || <code>string</code> || Map type, as requested. | |||
|- | |||
| 4 || <code>south_latitude_deg</code> || <code>double</code> || Southern edge. | |||
|- | |||
| 5 || <code>north_latitude_deg</code> || <code>double</code> || Northern edge. | |||
|- | |||
| 6 || <code>west_longitude_deg</code> || <code>double</code> || Western edge, normalised to (−180, 180]. | |||
|- | |||
| 7 || <code>east_longitude_deg</code> || <code>double</code> || Eastern edge, normalised to (−180, 180]. | |||
|- | |||
| 8 || <code>width</code> || <code>int32</code> || Raster columns. | |||
|- | |||
| 9 || <code>height</code> || <code>int32</code> || Raster rows. | |||
|- | |||
| 10 || <code>values</code> || <code>repeated float</code> || <code>width × height</code> values in the unit of the map type, row-major. Always finite. | |||
|- | |||
| 11 || <code>surface_temperature_celsius</code> || <code>float</code> || At the centre: surface temperature, °C. | |||
|- | |||
| 12 || <code>surface_pressure_hpa</code> || <code>float</code> || At the centre: surface pressure, hPa. | |||
|- | |||
| 13 || <code>surface_relative_humidity_percent</code> || <code>float</code> || At the centre: relative humidity, percent. | |||
|- | |||
| 14 || <code>surface_wind_meters_per_second</code> || <code>float</code> || At the centre: wind speed, m/s. | |||
|- | |||
| 15 || <code>maximum_rain_rate_millimeters_per_hour</code> || <code>float</code> || At the centre: highest rain rate in the column, mm/h. | |||
|- | |||
| 16 || <code>maximum_cloud_water_grams_per_cubic_meter</code> || <code>float</code> || At the centre: highest cloud water content in the column, g/m³. | |||
|- | |||
| 17 || <code>cape_joules_per_kilogram</code> || <code>float</code> || At the centre: convective available potential energy, J/kg. | |||
|- | |||
| 18 || <code>lightning_flashes_per_minute</code> || <code>float</code> || At the centre: lightning rate, flashes/min. | |||
|- | |||
| 19 || <code>duct_type</code> || <code>string</code> || [[SimTX API/Data types#Duct type|Duct type]] of the strongest duct at the centre, or <code>NONE</code>. | |||
|- | |||
| 20 || <code>duct_base_meters</code> || <code>float</code> || Duct base height, m. NaN without a duct. | |||
|- | |||
| 21 || <code>duct_top_meters</code> || <code>float</code> || Duct top height, m. NaN without a duct. | |||
|- | |||
| 22 || <code>duct_strength_m_units</code> || <code>float</code> || Duct strength, M-units. 0 without a duct. | |||
|- | |||
| 23 || <code>duct_gradient_m_units_per_kilometer</code> || <code>float</code> || Steepest modified-refractivity gradient in the duct, M-units/km. NaN without a duct. | |||
|} | |||
== Raster layout == | |||
Values are stored row-major (<code>index = row × width + column</code>) and sampled at grid '''nodes''' that include the edges of the area: | |||
<syntaxhighlight lang="text"> | |||
latitude = north − (north − south) × row / (height − 1) | |||
longitude = west + (east − west ) × column / (width − 1) | |||
</syntaxhighlight> | |||
Row 0 is the northern edge and the last row the southern edge; columns run west to east. North and south are clamped to ±90°. When the area crosses the antimeridian, <code>west_longitude_deg</code> is greater than <code>east_longitude_deg</code>; add 360° to the eastern edge before interpolating. For a 360° span the two edges are equal. | |||
Raster values are always finite. The duct summary fields may be NaN as described in the field table. | |||
== See also == | |||
* [[SimTX API/Packets/WeatherMapRequest|WeatherMapRequest]] | |||
{{SimTX API navbox}} | |||
[[Category:SimTX API]] | |||
Latest revision as of 17:19, 24 October 2026
| Frame | ServerFrame, field 33
|
|---|---|
| Member | weather_map
|
| Direction | Server → client |
| Session | Control |
| Roles | ROLE_CONTROL.
|
| Permission | None |
| Answers | WeatherMapRequest |
| Defined in | control.proto
|
WeatherMapResponse returns the raster requested by a WeatherMapRequest, with a summary of the weather at the centre of the area.
Definition[edit | edit source]
message WeatherMapResponse {
int64 request_id = 1;
int64 valid_time_ms = 2;
string type = 3; // weather type (string enum, common.proto)
double south_latitude_deg = 4;
double north_latitude_deg = 5;
double west_longitude_deg = 6;
double east_longitude_deg = 7;
int32 width = 8;
int32 height = 9;
repeated float values = 10;
float surface_temperature_celsius = 11;
float surface_pressure_hpa = 12;
float surface_relative_humidity_percent = 13;
float surface_wind_meters_per_second = 14;
float maximum_rain_rate_millimeters_per_hour = 15;
float maximum_cloud_water_grams_per_cubic_meter = 16;
float cape_joules_per_kilogram = 17;
float lightning_flashes_per_minute = 18;
string duct_type = 19; // duct type (string enum, common.proto)
float duct_base_meters = 20;
float duct_top_meters = 21;
float duct_strength_m_units = 22;
float duct_gradient_m_units_per_kilometer = 23;
}
Fields[edit | edit source]
| # | Field | Type | Description |
|---|---|---|---|
| 1 | request_id |
int64 |
The request this answers. |
| 2 | valid_time_ms |
int64 |
Simulated time the data is valid for, Unix ms. |
| 3 | type |
string |
Map type, as requested. |
| 4 | south_latitude_deg |
double |
Southern edge. |
| 5 | north_latitude_deg |
double |
Northern edge. |
| 6 | west_longitude_deg |
double |
Western edge, normalised to (−180, 180]. |
| 7 | east_longitude_deg |
double |
Eastern edge, normalised to (−180, 180]. |
| 8 | width |
int32 |
Raster columns. |
| 9 | height |
int32 |
Raster rows. |
| 10 | values |
repeated float |
width × height values in the unit of the map type, row-major. Always finite.
|
| 11 | surface_temperature_celsius |
float |
At the centre: surface temperature, °C. |
| 12 | surface_pressure_hpa |
float |
At the centre: surface pressure, hPa. |
| 13 | surface_relative_humidity_percent |
float |
At the centre: relative humidity, percent. |
| 14 | surface_wind_meters_per_second |
float |
At the centre: wind speed, m/s. |
| 15 | maximum_rain_rate_millimeters_per_hour |
float |
At the centre: highest rain rate in the column, mm/h. |
| 16 | maximum_cloud_water_grams_per_cubic_meter |
float |
At the centre: highest cloud water content in the column, g/m³. |
| 17 | cape_joules_per_kilogram |
float |
At the centre: convective available potential energy, J/kg. |
| 18 | lightning_flashes_per_minute |
float |
At the centre: lightning rate, flashes/min. |
| 19 | duct_type |
string |
Duct type of the strongest duct at the centre, or NONE.
|
| 20 | duct_base_meters |
float |
Duct base height, m. NaN without a duct. |
| 21 | duct_top_meters |
float |
Duct top height, m. NaN without a duct. |
| 22 | duct_strength_m_units |
float |
Duct strength, M-units. 0 without a duct. |
| 23 | duct_gradient_m_units_per_kilometer |
float |
Steepest modified-refractivity gradient in the duct, M-units/km. NaN without a duct. |
Raster layout[edit | edit source]
Values are stored row-major (index = row × width + column) and sampled at grid nodes that include the edges of the area:
latitude = north − (north − south) × row / (height − 1)
longitude = west + (east − west ) × column / (width − 1)
Row 0 is the northern edge and the last row the southern edge; columns run west to east. North and south are clamped to ±90°. When the area crosses the antimeridian, west_longitude_deg is greater than east_longitude_deg; add 360° to the eastern edge before interpolating. For a 360° span the two edges are equal.
Raster values are always finite. The duct summary fields may be NaN as described in the field table.