TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
379 stars 250 forks source link

weather map integration #115

Closed alialshaqah closed 4 years ago

alialshaqah commented 6 years ago

Hi Guys, I need to integrate the weather data and visualize it with blue sky interface, how I can do such thing.

jooste commented 6 years ago

Hi! What kind of weather data would you want to visualize? Wind fields, or weather cells? The first could be a set of gl lines, whereas the second probably requires a texture. Also important, of course, is where you want to get the weather data from: should it be actual historical data, or generated? We already have a windfield model in BlueSky, although it is not visualized on the gui yet.

alialshaqah commented 6 years ago

Hey Jooste, Many thanks for your prompt reply, I would like to integrate the perception level, I can get the NEXRAD level 3 data from ftp://tgftp.nws.noaa.gov/ open access. this type of data can be read by Py-ART, the idea is the evaluate the ATC performance in the severe weather, so I highly appreciate if you could help me handle this issue. when I get the data I need it to appear in the active interface as levels not dbz, but i can give you the levels ranges and colors as per FAA standards.

jooste commented 6 years ago

Ok, I would then implement this as a textured surface. There are a couple of steps involved. The simulation and the gui are decoupled in BlueSky, and communicate through TCP. The weather data would be loaded as part of a simulation scenario, and then sent to the gui for visualization. The required additions to bluesky would be:

  1. Code that loads weather data from a file, which can be called from the BlueSky command stack (this can be done in a plugin)
  2. Code that sends this data from the sim to the gui, and on the gui side some additions to be able to receive the data
  3. Code on the gui side to
    • create a textured rectangle
    • draw the rectangle
    • upload the incoming weather data to the GPU's memory as a texture. Step 1 is relatively straightforward, especially if you make this into a plugin. Step 3 would be straightforward if we already had gui-side plugins :) This might be a nice reason to start making them.. Step 2 is a bit cumbersome in the current main version, but should be easier in the version under development in the bluesky-zmq branch.