Fr/A local weather system: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 86: Line 86:
=== METAR et variation continuelle des paramètres météo  ===
=== METAR et variation continuelle des paramètres météo  ===


If METAR info is available, this (rather than default tile center info) should be used to set parameters like visibility, pressure or temperature. To avoid discontinuous jumps, the info should be linearly interpolated in time for each nearby position from which a METAR is available. If METAR is updated every 10 minutes, one can use the information at startup for each position for the first 10 minutes of flight, then as soon as the next METAR is available slowly change the value (at each position) within the next 10 minutes to the values just fetched, and continue to do so (in essence creating a 10 minute offset from real to simulated weather).
Si l'info METAR est récupérable, elle devrait être utilisée pour régler certains paramètres météo, comme (plutôt que les paramètres par défaut)la visibilité, la pression, ou la température. Pour éviter certains sauts discontinus, l'information météo devrait être interpolée linéairement dans le temps pour chaque position où un METAR est disponible. Si le METAR est mis à jour toutes les dix minutes,on peut utiliser l'information au début de chaque position des premières dix minutes de vol, puis faire de même au prochain METAR en changeant lentement la valeur ( à chaque position) dans les prochaines dix minutes, et ainsi de suite ( il ya essentiellement un décalage de dix minutes par rapport au temps réel).


To interpolate in space, in principle a simple algorithm with inverse distance weighting can be used (there are more accurate but also more complicated solutions): If, say, the pressure ''p'' is known at ''n'' positions, such that the pressure at position ''i'' is ''p_i'' and the distance between aircraft and ''i'' is ''d_i'', then a good approximation of the local pressure is
Pour interpoler dans l'espace, un simple algorithme avec une pondération des distances peut être utilisé (d'autres solutions plus précises mais plus compliquées existent): Si la pression "p" est connue à la position "n", de telle sorte que la pression à la position "i" est "p_i" et la distance entre l'avion et "i" est "d_i", alors une bonne approximation de la pression locale peut être exprimée comme ceci:


p = (sum p_i (1/d_i)) / (sum 1/d_i)
p = (sum p_i (1/d_i)) / (sum 1/d_i)


as this will make the pressure at position ''i'' equal to ''p_i'' and lead to the average of the individual pressures if the distance to all METAR stations is the same.
Cela rendrait la pression à la position "i" egale à "p_i" et conduirait à la moyenne des pressions du système si la distance de toutes les stations METAR est la même.
 
== Discussions relatives ==
(en)


== Related Discussions ==
* [http://www.flightgear.org/forums/viewtopic.php?f=5&t=8365 Weather algorithms] (06/2010)
* [http://www.flightgear.org/forums/viewtopic.php?f=5&t=8365 Weather algorithms] (06/2010)
* [http://www.flightgear.org/forums/viewtopic.php?f=5&t=8137 A smart cloud altitude algorithm] (05/2010)
* [http://www.flightgear.org/forums/viewtopic.php?f=5&t=8137 A smart cloud altitude algorithm] (05/2010)
Line 102: Line 104:
* [http://flightgear.org/forums/viewtopic.php?f=5&t=7358 A local weather system] (03/2010)
* [http://flightgear.org/forums/viewtopic.php?f=5&t=7358 A local weather system] (03/2010)


== Connection with the Multiplayer system ==
== Connection avec le système Multijoueurs ==


(should be written by someone who knows what the Multiplayer system can and cannot do)
(devrait être écrit par quelqu'un qui connait les fonctions et limites du système multijoueurs)


== Development ==
== Dévelopemment ==


* Some users have expressed having problems when using the reset/new location facility, the local weather system should probably register listeners to /sim/signals/* and suspend/reset itself accordingly, so that all operations are gracefully interrupted? This may include releasing registered times and listeners, as well as terminating worker threads (once being used) [http://flightgear.org/forums/viewtopic.php?f=5&t=7358&st=0&sk=t&sd=a&start=165#p94765]
* Some users have expressed having problems when using the reset/new location facility, the local weather system should probably register listeners to /sim/signals/* and suspend/reset itself accordingly, so that all operations are gracefully interrupted? This may include releasing registered times and listeners, as well as terminating worker threads (once being used) [http://flightgear.org/forums/viewtopic.php?f=5&t=7358&st=0&sk=t&sd=a&start=165#p94765]
32

edits