FlightAirMap icon indicating copy to clipboard operation
FlightAirMap copied to clipboard

Weather support

Open Ysurac opened this issue 8 years ago • 33 comments

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

Ysurac avatar Oct 23 '17 12:10 Ysurac

Clouds are now available. Planned:

  • [x] change clouds colors with the time of the day
  • [ ] add rain (if possible)
  • [ ] add snow (if possible ?)
  • [ ] add lightning
  • [ ] use others weather sources
  • [ ] add wind support (this can move clouds)
  • [ ] add hurricane support

Ysurac avatar Nov 14 '17 16:11 Ysurac

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

Ysurac avatar Nov 20 '17 18:11 Ysurac

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 avatar Nov 24 '17 06:11 Ysurac

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

Ysurac avatar Nov 24 '17 07:11 Ysurac

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

tonkepen100 avatar Nov 30 '17 20:11 tonkepen100

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.

Ysurac avatar Nov 30 '17 20:11 Ysurac

  1. how & where to activate the clouds?

Geoneer avatar Dec 01 '17 08:12 Geoneer

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 avatar Dec 01 '17 09:12 Ysurac

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

Ysurac avatar Dec 01 '17 11:12 Ysurac

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 avatar Dec 01 '17 16:12 Geoneer

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

afbeelding

Geoneer avatar Dec 01 '17 16:12 Geoneer

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.

Ysurac avatar Dec 01 '17 16:12 Ysurac

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?

Geoneer avatar Dec 01 '17 16:12 Geoneer

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

Ysurac avatar Dec 01 '17 17:12 Ysurac

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.)

Geoneer avatar Dec 01 '17 18:12 Geoneer

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...

Ysurac avatar Dec 01 '17 18:12 Ysurac

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 avatar Dec 03 '17 01:12 Geoneer

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 avatar Dec 03 '17 01:12 Geoneer

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. :-)

Geoneer avatar Dec 03 '17 02:12 Geoneer

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.

Ysurac avatar Dec 03 '17 06:12 Ysurac

the winds do not change, every certain hour.

Dusterka avatar Dec 03 '17 06:12 Dusterka

Winds data are updated every 6 hours

Ysurac avatar Dec 03 '17 07:12 Ysurac

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

Dusterka avatar Dec 03 '17 07:12 Dusterka

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

Ysurac avatar Dec 03 '17 07:12 Ysurac

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 avatar Dec 03 '17 22:12 Geoneer

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 avatar Dec 03 '17 23:12 Geoneer

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

Geoneer avatar Dec 03 '17 23:12 Geoneer

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.

Dusterka avatar Dec 04 '17 08:12 Dusterka

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

Ysurac avatar Dec 04 '17 14:12 Ysurac

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

Geoneer avatar Dec 04 '17 16:12 Geoneer