A UDP output from X-Plane to drive you own weather radar display… perhaps for your own moving map!

Send the following data to X-Plane’s IP address by UDP into port 49,000:

The 5 chars “RADR” (four chars plus a NULL at the end!) followed by a STRING (also null-terminated of course!) that lists the number of radar points per frame that you want X-Plane to send right back to you
to drive your visual system. So send “RADR_10_”, where the _ is a null, to have X-Plane send you 10 radar data points per frame.

NOTE: X-Plane will send the message right back to the IP address and port number you sent the RADR command FROM!

This is in the settings menu, internet settings screen, right-most tab for data output.

And here is the data that will come to you, with no annoying struct-alignment issues: The data is all perfectly tightly packed with no spacing.

the four chars RADR, and a fifth byte that is internal-use.
float lon longitude of the scan point, which X-Plane will walk around the area
float lat latitude of the scan point, which X-Plane will walk around the area
float bases_meters the cloud basees in meters MSL
float tops_meters the cloud tops in meters MSL
float clouds_ratio clouds present at this lat and lon, as seen from top looking down, ratio
float precip_ratio precip present at this lat and lon, as seen from top looking down, ratio

9 comments on “Weather Radar Data

  1. Would it be possible to explain the meaning of “vertex-centered” and “cell-centered” in the following code comment?

    // we send a scanline of 61 vertices of weather, spaced 1 minute x 1 minute of lon/lat! cool!
    // 61 to get both edges of the degree, since this is vertex-centered not cell-centered
    // vertex-centered not cell-centered is needed to plot radar without it looking blocky

    I’m trying to extract weather data and show it on an external weather display. What would be the practical implications of this comment? Does it mean we have an offset of half a minute in lat/lon?

  2. Would it be possible to explain the following comment in the code?

    // we send a scanline of 61 vertices of weather, spaced 1 minute x 1 minute of lon/lat! cool!
    // 61 to get both edges of the degree, since this is vertex-centered not cell-centered
    // vertex-centered not cell-centered is needed to plot radar without it looking blocky

    I’m trying to extract weather data and show it on an external display. What’s the meaning of “vertex-centered” and “cell-centered”?
    Does it mean we have an offset of half a minute for each transmitted value?

    1. It’s quite a late answer, but here is my interpretation.

      Imagine a lattice grid covering the space to plot the weather data . The eyes of the lattice are called cells and the nodes are vertices. Since x-plane divides the weather scan space into 60 cells, the total number of vertices is 61. The weather data can be stored either at the vertices or at the cell centres. X-plane chose to store the data at the vertices to avoid a blocky weather radar graphics.

  3. Hello,
    I am confused by provided snipped of X-Plane code as it unfortunately disagree with what is written in X-plane included “documentation” Exchanging Data with X-Plane.rtfd.

    This snippet above producer xRAD message while by docs you shall get RADR message both in different radar data format.

    So there is either discrepancy in documentation, or there are two different methods to get radar data, in which case it would be nice to get some comparison/explanation.

  4. Hi,
    How can I get the positions of lighting strikes in order do develop a custom stormscope. Is there a way I can do that?

  5. I have implemented this in my B737 external glass cockpit and it works fine.
    However, I now realize that I can only send the WXR data to a single IP (which currently is the rasperry driving my captain NAV display).

    Would it be possible to add the possibility to send the WXR data to multiple IP’s? I could then send it also to the first officer NAV display (on another rasperry pi)?

    Or even simpler: would it be possible to access the 61×61 WXR returns from a char array dataref (having 3721 elements) plus the lon/lat location of the upper left corner?

    Reto

  6. I am searching for which weather radar is being used in xplane and how to use that to show bad weather condition on EFIS display. If there is any document and complete information can you please share to us.

  7. I am developing a new version of Concorde Performance System which will include Colimata Concorde addon.
    I need to get weather at departure (METAR), destination (METAR) and enroute until 59000 ft.
    Would you tell me how to do that please?
    I’m using Delphi for information.
    Regards
    Pierre

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do not report bugs in the blog comments.
Only bugs reported via the X-Plane Bug Reporter are tracked.

Meta

Topic:

  • Weather

Article type:

  • Guide