July 22, 201312 yr If one of you guys could tweak the logic to make it more realistic... Well I found this pdf with a nice graph at the end ("VISIBILITY VERSUS PRECIPITATION RATE AND RELATIVE HUMIDITY"): https://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCoQFjAA&url=https%3A%2F%2Fams.confex.com%2Fams%2Fpdfpapers%2F113177.pdf&ei=v5vsUYOENunJ4ASQiYHIDg&usg=AFQjCNE6hJ4r8jk9yr_zQ0HM9kYXyPFpCw&sig2=IUgbylEoYzqjnEmiUDB2RQ&bvm=bv.49478099,d.bGE Seems perfect to tune the plugin! I'll see tomorrow what can I do. "Society has become so fake that the truth actually bothers people".
July 22, 201312 yr Well I found this pdf with a nice graph at the end ("VISIBILITY VERSUS PRECIPITATION RATE AND RELATIVE HUMIDITY"): https://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCoQFjAA&url=https%3A%2F%2Fams.confex.com%2Fams%2Fpdfpapers%2F113177.pdf&ei=v5vsUYOENunJ4ASQiYHIDg&usg=AFQjCNE6hJ4r8jk9yr_zQ0HM9kYXyPFpCw&sig2=IUgbylEoYzqjnEmiUDB2RQ&bvm=bv.49478099,d.bGE Seems perfect to tune the plugin! I'll see tomorrow what can I do. Good source. ELITE uses a similar algorithm since it doesn't even model precipitation graphically but rather in the form of visibility. In real life, for instance, there's a difference between the conditions that favor the formation of mist vs haze, the later being associated with situation where the relative humidity exceeds 70% in the classical texts... sometimes higher values for other authors. I'll try to find some time to think about it too, but the base in this source is already very good. Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 22, 201312 yr I can't pretend to understand what you need to do, but thanks for your work anyway! i910900k, RTX 3090, 32GB DDR4 RAM, AW3423DW, Ruddy girt big mug of Yorkshire Tea
July 22, 201312 yr Another good source for choosing an appropriate conversion between T / Td and RH http://journals.ametsoc.org/doi/pdf/10.1175/BAMS-86-2-225 Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 22, 201312 yr Here's the modified code: HIGH_MAX_VIS = 60000.0 # meters at high altitude (float) def FlightLoopCallback(self, elapsedMe, elapsedSim, counter, refcon): visibility = XPLMGetDataf(self.VisibilityDataRef) maxVis = HIGH_MAX_VIS diff = XPLMGetDatai(self.TemperatureSL) - XPLMGetDatai(self.DewPointSL) RH = 100 - 5 * diff if (RH > 50) : maxVis = ( - 0.0177 * RH ^ 2 + 1.462 * RH + 30.8 ) * 1000 if (maxVis > HIGH_MAX_VIS) : maxVis = HIGH_MAX_VIS if (visibility > maxVis): XPLMSetDataf(self.VisibilityDataRef, maxVis) # Return 1.0 to indicate that we want to be called again in 1 second. return 1.0 Now, the plugin smoothly varies visibility with T-Td, according to empirical equations. A max visibility of 60 miles is reached for T-Td > 10. If you think 60 miles is too much and causes too low FPS on your system, just lower the HIGH_MAX_VIS value. E.g. if you set HIGH_MAX_VIS = 30000.0, the max visibility will be 30 miles, reached when T-Td > 3.4. The modified version does not consider altitude, since X-Plane should automatically increase visibility with altitude. It also does not lower visibility according to precipitation rate. I think that could be easily implemented, but I don't have time right now... Marco "Society has become so fake that the truth actually bothers people".
July 22, 201312 yr Here's the modified code: HIGH_MAX_VIS = 60000.0 # meters at high altitude (float) def FlightLoopCallback(self, elapsedMe, elapsedSim, counter, refcon): visibility = XPLMGetDataf(self.VisibilityDataRef) maxVis = HIGH_MAX_VIS diff = XPLMGetDatai(self.TemperatureSL) - XPLMGetDatai(self.DewPointSL) RH = 100 - 5 * diff if (RH > 50) : maxVis = ( - 0.0177 * RH ^ 2 + 1.462 * RH + 30.8 ) * 1000 if (maxVis > HIGH_MAX_VIS) : maxVis = HIGH_MAX_VIS if (visibility > maxVis): XPLMSetDataf(self.VisibilityDataRef, maxVis) # Return 1.0 to indicate that we want to be called again in 1 second. return 1.0 Now, the plugin smoothly varies visibility with T-Td, according to empirical equations. A max visibility of 60 miles is reached for T-Td > 10. If you think 60 miles is too much and causes too low FPS on your system, just lower the HIGH_MAX_VIS value. E.g. if you set HIGH_MAX_VIS = 30000.0, the max visibility will be 30 miles, reached when T-Td > 3.4. The modified version does not consider altitude, since X-Plane should automatically increase visibility with altitude. It also does not lower visibility according to precipitation rate. I think that could be easily implemented, but I don't have time right now... Marco Great work Marco! Thx a lot! Tell Austin - he will certainly like to know, and since you and the original author did most of the work already, he has the material required to implement it into a future release of X-Plane10. I am also talking to a colleague here at the aeronautical meteorology dept because she did precisely a study on visibility determination for aviation weather forecasts. We may end with even more material including various type of precipitation and it's impact on visibility. Of course we will not be able to go as far as to take into account aerosols and pollution, but, X-Plane's World is not polluted!!!!! :-) Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 23, 201312 yr Hmmm, tried it but there's something wrong? First I had to replace the "^" operator by a call to "pow"... because it was generating an error... Then, there is always very low vis ? I'll have a look at it again... That nasty effect of clearing the downloaded weather is still the reason I had to disable it... It zeroed winds, turned everything to ISA... Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 23, 201312 yr Yeah there are a couple of stupid errors I made in the code! D'oh! Unfortunately I couldn't try it since I should install Python etc. Here's the corrected code, this time it should work, except for the problem of clearing the downloaded weather that you mentioned. I don't know the reason for that. HIGH_MAX_VIS = 60000.0 # meters at high altitude (float) def FlightLoopCallback(self, elapsedMe, elapsedSim, counter, refcon): visibility = XPLMGetDataf(self.VisibilityDataRef) maxVis = HIGH_MAX_VIS diff = XPLMGetDatai(self.TemperatureSL) - XPLMGetDatai(self.DewPointSL) RH = (100 - (5 * diff) ) / 100 if (RH > 50) : maxVis = ( (- 0.0177 * RH * RH) + (1.462 * RH) + 30.8 ) * 1000 if (maxVis > HIGH_MAX_VIS) : maxVis = HIGH_MAX_VIS if (visibility > maxVis): XPLMSetDataf(self.VisibilityDataRef, maxVis) # Return 1.0 to indicate that we want to be called again in 1 second. return 1.0 Marco "Society has become so fake that the truth actually bothers people".
July 23, 201312 yr Another little error.. ehm... Instead of:RH = (100 - (5 * diff) ) / 100It was correct as in the first version, so delete "/ 100":RH = (100 - (5 * diff) ) Now if it doesn't work, the error must be in the original code, not my modifications. "Society has become so fake that the truth actually bothers people".
July 26, 201312 yr So is this creating a better effect and if so can you tell us how to insert the code into the plugin? edit - actually I think I'm going to stop using the plugin as it is. I really like the haze effect but getting a bit tired with it continually reverting back to set weather uniformly and deleting the real weather. It seems like it might be a problem with Python rather than the script itself, as the problem only goes away when I stopped Python, not when I simply disabled the script. Is the author aware of this? i910900k, RTX 3090, 32GB DDR4 RAM, AW3423DW, Ruddy girt big mug of Yorkshire Tea
July 28, 201312 yr Oh, looks like the author is aware of the issue and is using it with this real world weather plugin: http://forums.x-plane.org/index.php?app=downloads&showfile=15453 Jcomm, I know you're a weather geek, any thoughts on this plugin? i910900k, RTX 3090, 32GB DDR4 RAM, AW3423DW, Ruddy girt big mug of Yorkshire Tea
July 28, 201312 yr Oh, looks like the author is aware of the issue and is using it with this real world weather plugin: http://forums.x-plane.org/index.php?app=downloads&showfile=15453 Jcomm, I know you're a weather geek, any thoughts on this plugin? Hmmm, I didn't know about it, but will investigate ;-) Thx for the link! Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 28, 201312 yr Well, first tests of the NOAA GFS plugin are VERY POSITIVE!!!! I installed Python 2.7, and then the NOAA GFS plugin only. Set the METAR altitude to FL060 (sector for LPPT) and went flying. All I can tell you is that this is a true MUST HAVE for X-Plane 10!!!!! Get it!!!! Very plausible winds and cloud cover above, also temperature! I could I have been missing this on :-/ Flying gliders since 1980 Flightsimming since 1992 AMD Ryzen 5600x, 32GB RAM, GPU Nvidia RTX 3060 Ti 8 GB, 1 TB and 500 GB nvme2 SSD drives, HP 27" 60Hz LED monitor @ 1920x1080, T16000, Hotas from old X52 Pro, Saitek Combat Rudder Pro (2010 model)
July 28, 201312 yr Whoa... Never even heard of this gem. Will have to test it tomorrow but sounds like a must-have if it works!
July 29, 201312 yr Author Great! The good thing is that the NOAA plugin automatically sets X-Plane to METAR auto-download mode bellow a parametrized altitude (FL), so that it solves the problem on the visibility plugin (which can't restore the METAR auto-download mode by itself). Well, first tests of the NOAA GFS plugin are VERY POSITIVE!!!! I installed Python 2.7, and then the NOAA GFS plugin only. Set the METAR altitude to FL060 (sector for LPPT) and went flying. All I can tell you is that this is a true MUST HAVE for X-Plane 10!!!!! Get it!!!! Very plausible winds and cloud cover above, also temperature! I could I have been missing this on :-/
Create an account or sign in to comment