Observations are measured conditions reported by an actual weather station right now, as opposed to forecasts which are model-generated predictions. GodotNWS pulls the latest observation from the nearest NWS station to your configured location and packages everything into anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OdintheDoggo/GodotNWS/llms.txt
Use this file to discover all available pages before exploring further.
ObservationPacket resource.
Location setup must complete before calling this method. See the Location Setup guide and wait for
location_setup_complete.Fetching Observations
CallNws.fetch_current_observations(fetch_icon). When the data arrives, the observations_fetched signal fires with an ObservationPacket. If no observation data is available, the signal emits null instead — always check for this.
The fetch_icon Parameter
| Value | Behaviour |
|---|---|
true | Downloads the NWS condition icon PNG and sets obs.icon to an ImageTexture. The signal fires only after the icon arrives. |
false | Skips icon download. obs.icon will be null, but obs.iconUrl contains the URL. |
Temperature Units
Null and Missing Fields
The NWS observation format is sparse — weather stations do not always report every measurement. Many fields will be0.0 or empty if the station did not include them. Always check a value before displaying it.
The rawMessage Field
When available, obs.rawMessage contains the raw METAR string transmitted by the weather station. This is the same compact aviation weather format you see on aviation weather sites. It can be useful if you want to display or parse the unprocessed report.
ObservationPacket Fields
| Field | Type | Description |
|---|---|---|
raw | Dictionary | The complete raw JSON properties from the NWS API. |
station | String | URL/ID of the reporting station. |
timestamp | String | ISO 8601 timestamp of the observation. |
rawMessage | String | Raw METAR string, if the station transmitted one. |
textDescription | String | Human-readable condition description, e.g. "Mostly Cloudy". |
icon | ImageTexture | Condition icon image, or null. |
iconUrl | String | URL of the NWS condition icon, if one exists. |
presentWeather | String | Current weather phenomenon code (e.g. "rain", "snow"). |
temperature | float | Air temperature in °C. |
dewpoint | float | Dewpoint in °C. May be 0.0 if unreported. |
windDirection | float | Wind direction in degrees. May be 0.0 if calm or unreported. |
windSpeed | float | Wind speed in m/s. May be 0.0 if calm or unreported. |
windGust | float | Wind gust speed in m/s. May be 0.0 if no gusts. |
barometricPressure | float | Station pressure in Pascals. May be 0.0 if unreported. |
seaLevelPressure | float | Sea-level pressure in Pascals. May be 0.0 if unreported. |
visibility | float | Visibility in meters. May be 0.0 if unreported. |
maxTempLast24 | float | 24-hour high temperature in °C. May be 0.0. |
minTempLast24 | float | 24-hour low temperature in °C. May be 0.0. |
precipitationLastHour | float | Precipitation in the last hour, in mm. May be 0.0. |
precipitationLast3Hours | float | Precipitation in the last 3 hours, in mm. May be 0.0. |
precipitationLast6Hours | float | Precipitation in the last 6 hours, in mm. May be 0.0. |
relativeHumidity | float | Relative humidity as a percentage. May be 0.0 if unreported. |
windChill | float | Wind chill temperature in °C. May be 0.0. |
heatIndex | float | Heat index in °C. May be 0.0. |
cloudLayers | String | Cloud coverage code for the lowest layer (e.g. "FEW", "BKN", "OVC"). |
baseCloudHeight | float | Height of the lowest cloud layer base in meters. May be 0.0. |