Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

Weather support #363

Open Ysurac opened 6 years ago

Ysurac commented 6 years ago

Like Flightgear, can be 3D clouds models and billboard using METAR as weather source.

Ysurac commented 6 years ago

Clouds are now available. Planned:

Ysurac commented 6 years ago

Winds display support is now added for 2D mode. This use data from NOAA GFS model.

Ysurac commented 6 years ago

what do you mean by quantum ? Winds are updated every 6 hours, it's using NOAA GFS model. For clouds it's updated every hours, it's using airports METAR info for now. It's not really available for the sea, I will need to find an other source.

Ysurac commented 6 years ago

At 0:15, 6:15, 12:15 and 18:15 for the wind.

tonkepen100 commented 6 years ago

In the 3D options, you do not see the weather, which you wanted, in your new SailAway project.

Ysurac commented 6 years ago

Winds and ocean wave are not available in 3D mode. Clouds can't work on sea: It's using airport METAR, if airport is too far from the sea it's not available for now.

Geoneer commented 6 years ago
  1. how & where to activate the clouds?
Ysurac commented 6 years ago

You need to have METAR enabled (Activate METAR support in install script or $globalMETAR in require/settings.php) and METAR cycle enabled too (Activate METAR cycle support in install script or $globalMETARcycle in require/settings.php).

If it's enabled (and scripts/update_db.php was run) you should see Display weather on 3D map checkbox when you are in 3D mode in the sidebar. If there is an airport with METAR info not too far, you should see clouds.

I will change weather source asap to use something else than METAR.

Ysurac commented 6 years ago

When METAR is not available, I will try to use TCDC from NOMAD GFS gib2 files if possible...

Geoneer commented 6 years ago

ok. So I have to install the whole package on my own server? I was looking in the website of FlightAirMap. Is it visible there also?

Geoneer commented 6 years ago

mmm... can't access the realflight website anymore... :(

afbeelding

Ysurac commented 6 years ago

Yes it's available on the demo website too. This work when you zoom enough on a selected flight and you are near an airport that give METAR info.

I increases some distance parameters...

The website should work now, I was working on it.

Geoneer commented 6 years ago

ok! You're working on it now :-). That's great!

clouds:

I was thinking about to merge Three.js & Cesium together like it's done here:

https://cesium.com/blog/2017/10/23/integrating-cesium-with-threejs/

Then I will randomly let Three.js render some clouds above and around moutain area's like this is done in Zwift cycling app / Grand Theft Auto / etc etc...

afbeelding

Real time clouds is very nice, but this is giving lot's of problems in a chain with lot of weak links. You allready got them I understand. So maybe also a nice advice for you to use Three with clouds?

Ysurac commented 6 years ago

I want "real" clouds with real weather. But yes I can add some random clouds above moutain. I don't need threejs for that.

Geoneer commented 6 years ago

I can fully understand why you want 'real' clds! Also real weather conditions is very nice. I'm busy with this also, like in 3D games, but then in de CesiumJS globe with rain, snow, 3d tiles, etc etc.... #bigthings

check my project here => https://www.facebook.com/smrtmps

(It's not live yett.)

Ysurac commented 6 years ago

Nice project.

My biggest problem is to get weather data using only latitude/longitude everywhere in the world (and for free). It's why I try to use GFS GRIB2 files...

Geoneer commented 6 years ago

yes.. I understand your situation. It's a big issue you're working on with real time visualization of real time weather situation on lat / lon locations. I do use http://api.openweathermap.org/data/2.5/ to get the current weather a lat / lon.

But yeah.. that's not with cloud covering on the globe.

Geoneer commented 6 years ago

Another part I did implement is real time KML data from NASA about rainclouds:

try { var kml = 'https://trmm.gsfc.nasa.gov/trmm_rain/Events/3B42_rain_accumulation_3hr.kml'; var options = { camera: viewer.scene.camera, canvas: viewer.scene.canvas, proxy: new Cesium.DefaultProxy(proxyurl), clampToGround: false, }; var data = Cesium.KmlDataSource.load(kml, options); viewer.dataSources.add(data); //wait 2000ms to show the weather map. Hopefully the data is loaded before this timeout ends. Otherwise find another option to avoid the grey map over the globe. } catch (ex) { error(ex); }

Geoneer commented 6 years ago

it's possible to show the KML data as a 'cloud' in the air above the Globe. I've used it a few weeks, but I was not satisfied with this. So maybe the KML can be 'rebuild' like a Elipsoid to create a 'raincloud' from out of this free data.... just think about it.

I'm digging through your code now how you create the clouds. :-)

Ysurac commented 6 years ago

Thanks for the info, I will check if I can do something with that. The code is in js/map.3d.js, It's the create_clouds function. It's not really clean but it's not finished yet. I create some billboards and models at random points. I also change the color of clouds based on humidity. There is also a try to display rain commented, but it's really bad.

Dusterka commented 6 years ago

the winds do not change, every certain hour.

Ysurac commented 6 years ago

Winds data are updated every 6 hours

Dusterka commented 6 years ago

in my airflightmap it does not change me, and I have been observing for 24 hours.

Ysurac commented 6 years ago

True. NOAA is very very slow to generate GFS. The last run is 00:00... I always use last available run now.

Geoneer commented 6 years ago

I found your code. I like the proof of concept of it very much! I will rebuild your methods in a more stable productive code. I will share it here also.

And indeed I want to use highlight of the clouds in the way the 3D games do it.

check : https://www.clicktorelease.com/blog/how-to-make-clouds-with-css-3d/

Geoneer commented 6 years ago

The above link is nice principle, but does not work inside cesium 3D scenes / canvas. The way you did it is the right way. But I just wanted to show a nice working example how to render the clouds inside a div.

Geoneer commented 6 years ago

check https://github.com/Geoneer/smrtmps/files/1484324/RTCloudsForGames_HarrisGDC2002.pdf

Dusterka commented 6 years ago

True. NOAA is very very slow to generate GFS. The last run is 00:00... I always use last available run now.

Effectively, yesterday I changed when you said it, but I was attentive throughout the day, and not changed at the current time, that is, 24 hours. is rare.

Ysurac commented 6 years ago

wind is now updated correctly, GFS was really too slow.

Geoneer commented 6 years ago

did you try this for clouds:

https://github.com/AnalyticalGraphicsInc/cesium/wiki/Particle-System-Details

I think I will use particles to create weatherstuff. Sounds ok for Cesium. So let's find out about this. I did use part of your code, but the model is not being show inside my viewer.entities.

I used similar technologie with billboards, but this was a hell of a job. So for the weather stuff I will try the link https://github.com/AnalyticalGraphicsInc/cesium/wiki/Particle-System-Details

Ysurac commented 6 years ago

It's nice to make smoke, but for clouds I don't think it's usable and if it is, this will be really slow if we have many clouds. I think billboard is the easiest for clouds, and model for some clouds. It's the way it's done in the Flightgear simulator.

dextercai commented 4 years ago

I am very curious about the GFS GRIB2 files... Is there any data or source code about the GRIB2 processing?

Ysurac commented 4 years ago

It's in require/class.weather.php, I use grib2json so it's converted to a JSON file.