Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
SimTX Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
SimTX API/Packets/WeatherMapResponse
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{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]]
Summary:
Please note that all contributions to SimTX Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SimTX Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:SimTX API navbox
(
edit
)
Template:SimTX API navigation
(
edit
)
Template:SimTX packet
(
edit
)