![]() |
|
|||||||
| Register | Wiki | Downloads | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
| SimConnect Use this forum for all your SimConnect related discussions |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
SimConnect Weather
I was playing around, trying to learn more about the Weather calls in SimConnect and I came up with this little 'add-on' to facilitate discussion on the SimConnect FSX Weather API calls.
Note: This is written entirely in SimConnect using C# and .Net 2.0. http://www.innergears.com/InnerGears.zip I think it's useful for anyone wanting to learn more about FSX and their form of METAR information. I.E. What kind of data is available? In another thread I was talking about a METAR translator, well... This uses and displays a sort of FSX METAR translator to learn from. It's also useful in-flight to see what weather conditions your in and winds at varying altitudes. If you try it, I'd like to see if you note the same thing as I. When I first start FSX, the FSX weather returned is sometimes really basic and out-of-date (look at the METAR time-stamp), but then slowly becomes more complete. It's like weather stations within the aircraft range bubble get filled in quickly, but world-wide weather slowly gets added. Of course, a manual call to Jeppesen for a real-world-weather update fills in the aircraft range bubble more quickly and if I let the Flight Sim run for a couple hours, it gets hard to find an airport that doesn't have weather. Anyway. About the program: It's written as an external application, so if anything happens, it's not likely to take your FSX with it. Start FSX first, then the application. The application will minimize itself on startup, because it's just for debugging. The Add-On menu should appear in FSX for the actual testing/viewing. If you exit FSX, the Weather Add-On should automatically end itself as well. Ok, then once FSX is started and the Weather Add-On is started and assuming that everything is set-up correctly, you should see an 'InnerGears Weather' menu item. It will be under FSUIPC if you have FSUIPC for FSX installed. There are two items in the sub-menu. NOAA Weather: which will popup a window allowing you to enter a known NOAA Weather ICAO, like KIAH (my favorite) This will link to a Web-Service I wrote a long time ago, and which sits on my Server in California. And, it will return a standard METAR line from NOAA. If you pull the window downward, you will see a translation of the METAR into plain English. I'm a METAR noob, so I need the translation. Notice also the Opacity up/down control which allows you to see through the control, in case you want to use it in-flight.The other sub-menu option is: FSX Weather: FSX Weather has two interesting buttons. One calls for the Nearest Weather, and lets FSX figure out where you are and the nearest reporting weather station. Kinda kool. The other button allows you to type in any ICAO in the World (like NOAA Weather) but uses the FSX Weather API to get the Weather METAR. At the bottom I display the Actual FSX METAR line that FSX gives me, and then like NOAA Weather, if you pull down the Window, you should see a translation of the FSX METAR into plain English. Like NOAA Weather, there is also an Opacity control. Try entering in an ICAO (Airport code) near you and far away. See the Data update gaps? Then try moving your aircraft to another airport in the world, do a weather update (FSX: World/Weather/Real-World Weather) and look at the data again. Anyway, I'd like to hear what you think about FSX Weather and meanwhile, I'm going to go see if I can make another sub-menu item to alter the FSX METAR and feed it back in. Kind of like Active Sky. FlapsOut Last edited by FlapsOut; 06 Jun 2007 at 10:40. |
|
#2
|
|||
|
|||
|
New Discoveries in Weather
Now this is kind of interesting.
I was looking at the WeatherCreateStation API call and I added another sub-menu item called "New Weather Station". The window that popsup allows you to enter an new ICAO (anything you like as long as it's not an existing weather station), A descriptive name, and the Latitude, Longitude and Altitude of your new weather station. To understand the Latitude, Longitude and Altitude variables (not knowing how to calculate them yet), I added a button, so the text boxes will be filled in wherever you aircraft is at the time. Try going to an airport that you KNOW does not have a weather station, like some po-dunk lil airport like U09. Create a weather station there. I called it U09 with a description of 'Ft. Belnap Agency'. Then close the window and check out the nearest weather station or enter 'U09'. You have your own little weather station and can feed it data! I bet you could even put one out at sea and presto! Hurricane weather! Download using the same link as above (new version of the .zip). I'm changing it from time to time. Hey, I bet this would be cool for mission creators too. Hmmm, Missions... FlapsOut Last edited by FlapsOut; 06 Jun 2007 at 13:50. |
|
#3
|
|||
|
|||
|
Code Frags
Unlike some peeps?
I have no problem sharing code, so if anyone needs a Code Frag on how to do this stuff? Please let me know ![]() Maybe? We can make a really kool weather program right here on FSDev. FlapsOut |
|
#4
|
|||
|
|||
|
Add Weather to Stations
Hmmm,
I worked with Adding Weather to a Station. Docs say, just give a valid METAR and the weather will be added by the METAR Header to the correct station... In other words, if my METAR starts with "KIAH...". It should all be good. Problem, Some weather takes, and some is just ignored...Try a Blowing DustStorm...Does not work. >.< I dunno what the prob is yet, so I didn't update the .zip. I can have a Clear Sky and say KIAH +TSRA, and suddenly? It rains from a clear Blue Sky...dunno. It Seems to switch to Custom Weather when I do that tho...thats a plus. Kind of like when Active Sky takes over...AS6 for noobsters ![]() But, I do NOT see proper cloud switching, etc... Another thing. You would think that with my other Add-On, that goes to any World Station and Gets the FSX METAR? That you could copy and paste that METAR into your nearest weather station...But? It tells you 'INVALID METAR"! But? If you delete the &A altitude info directly after the ICAO Code? I.E. "KIAH&A340 ...etc" and change it to "KIAH ...etc"? Everything is taken and works fine...hmmm FSX Weather Set? Not ready for Prime-Time? One last detail...If I go and get the REAL METAR from NOAA Weather? It ALWAYS accepts it with no problem...go figure. FlapsOut |
|
#5
|
|||
|
|||
|
On 2nd thought
I know...I was disappointed with the Set Weather on Station, but on the other hand...If anyone wants me to update my .zip file and help me figure out whats wrong?
Let me know... Thanks, FlapsOut |
|
#6
|
||||
|
||||
|
Ok, that is fascinationg information.
![]() First of all I'd be interested how difficult it would be to create such a tool and how to do it. ![]() Then, is it possible now to create new weather stations or is it not? I'd apreciate any progress on your work.
__________________
Regards, Thorsten ![]() |
|
#7
|
|||
|
|||
|
Quote:
If you look at the METAR documentation in the SimConnect SDK you will see some of the extensions and so on added. Quote:
Regards Pete |
|
#8
|
|||
|
|||
|
Quote:
These things were a problem in FS9 and before but could be overcome by the direct control over local wind, pressure and visibility provided through the likes of FSUIPC. Such direct control is not possible in FSX -- at least it isn't currently, though I am hopeful for the future. ASX uses the weather station creation facility nicely to deal with ocen weather, to provide proper coverage for transAtlantic and transPacific flights, for example. Regards Pete |
|
#10
|
||||
|
||||
|
Hi Folks
Flapsout - Finally got round to having a play with this, excellent work. Works nicely for creating very localised weather. However, and I understand this is an FS issue, transitions from one area to another, are instant. i.e. Setting localised self created wx station to be heavy rain, & limited visibility (2miles), then fly towards IRL airport, with RWW, hot, unlimited vis, & sunny. Visibility clears instantly on moving into the next cell. Travelling in the opposite direction, I can see clearly for miles, the next instant, I'm in whiteout conditions. Rate at which weather changes over time, apparently has no effect here, i.e. doesn't affect cell boundaries. Is there any way of smoothing transitions ? PS How do we delete any self created test weather stations ? EDIT Stations are not persistent, and disappear when innergears session is closed. ATB Paul
__________________
![]() ODG Preview I've never felt so frustrated,
died so frequently/spectacularly/or needlessly, yet had so much fun, in a long time. Flight's Landing Challenges FLIGHT - Earn your wings ! Last edited by BASys; 08 Jun 2007 at 07:40. |
|
#11
|
|||
|
|||
|
Hi BaSys
I've observed the same things that you described.
If I understand FSUIPC correctly, I think that Peter Dowson has weather-smoothing already built into FSUIPC. You might ask him about that? Also, remember that the program isn't a fully functional application, but rather one to play with, test, and most importantly have a point of reference when we discuss, in this case, the Weather calls to the API. It's not even a Beta, it's just a 'test-bed'. There is of course, an API call to delete stations that you made, and by the way, it can ONLY delete stations that you made. However, if you leave the Application then the temporary stations go away anyway. Now, if someone wants to take any of this and expand it into a working application? Then, I'd more than will to help. ![]() In the meatime, now that I kinda understand the weather calls, I'm playing with the Facilities API calls to see what they can (and cannot) do. Which is the subject of my next Thread. FlapsOut |
|
#12
|
|||
|
|||
|
Hi FlapsOut,
Is the source code still available? I realize that I am reviving a very old thread, but still hoping ![]() Thanks, |
|
#13
|
||||
|
||||
|
I've just started pulling weather data from FS for my flight planner. In the process I'm translating it back as closely as I can to "proper" METAR format, although some of the subtleties of the real METAR are lost (is there any way of determining fog and mist conditions - FG and BR, other than guessing from the visibility and temp-dewpoint spread?)
The main problem I'm having though is with weather outside the range bubble. Very often the destination airport will be out of range and so won't return any data. Is there a way of forcing FS to read the weather, or if I wait long enough, will FS get to it eventually? Obviously knowing the destination weather is quite important to the planning process, and if FS isn't going to come up with t he goods, I'll need to resort to something like NOAA (can NOAA also deliver TAFs?) Finally, can FS be made to identify the nearest weather station to a given lat/long? Obviously it can return the nearest weather, but if that's not available, and my destination happens not to be a weather station in its own right, it'd be handy to know the nearest. Thx
|
|
#14
|
|||
|
|||
|
Quote:
Quote:
Regards Pete |
|
#15
|
|||
|
|||
|
Quote:
Geoff |
|
#16
|
||||
|
||||
|
My test case is a direct route from Bergen ENBR to Inverness EGPE. (330nm). I'm calling WeatherRequestObservationAtNearestStation (this is using the Managed code wrapper in C#), and passing the lat/lon of the airport reference points. With the plane at Bergen, I get back the local weather, but for Inverness I get a WEATHER_UNABLE_TO_GET_OBSERVATION exception. Similarly, with the plane at Inverness, I get the Scottish weather and the exception for Norway.
Even after half an hour, I still get the exception for the destination airport. Code:
13:51:26 PLAN WX OBSERVATION: %sENBR&A50 111131Z 28003KT&D304NG 200V360 02511KT&A864LG 02511KT&A1778NG 02512KT&A2693NG 03114KT&A3607NG 03520KT&A5436NG 35828KT&A7265NG 00232KT&A9094NG 35927KT&A10313NG 35414KT&A11837LG 80KM&B-1550&D2312 1ST025&ST001FLMN000N 18/11 08/00&A864 06/00&A1778 00/-2&A2693 -5/-13&A3607 -17/-32&A5436 -30/-37&A7265 -44/-49&A9094 -49/-49&A10313 -46/-49&A11837 Q1003 @@@ 30 8 25 11 | 60 6 25 11 | 90 0 25 12 | 120 -5 31 14 | 180 -17 35 20 | 240 -30 358 28 | 300 -44 2 32 | 340 -49 359 27 | 390 -46 354 14 |
Last edited by Tim_A; 12 Jul 2009 at 06:50. |
|
#17
|
|||
|
|||
|
Quote:
Can you read the destination weather via the weather map (in the weather menu's dialogue)? If not, that suggests it isn't being downloaded. If you can, but SimConnect won't supply it, that suggests some sort of bug. Please also try my WeatherSet2 program. You can read weather for any ICAO or Lat/Lon through that. It uses FSUIPC4, of course, which in turn uses SimConnect just like you. I'm loading up FSX without ActiveSky right now, to have a look myself. Regards Pete |
|
#18
|
|||
|
|||
|
Quote:
Asked WeatherSet2 to give me weather for JFK. It did. Not the same as EGCC and not "default" either. Looked in FSX's weather map at JFK -- the data all matched. I also saw that all other other weather stations in the neighbourhood had their own distinct weather too. This was whilst my aircraft was still parked at EGCC. So, I thought maybe it's to do with the weather at a Lat/Lon, so I chose something a ways from KJFK and entered its Lat/Lon in Weatherset2. It came up with another distinct weather, which, when I checked, matched reasonably an interpolation of what FSX said on its map. Now WeatherSet2 doesn't use the "Nearest Station" call to Simconnect, only the Weather At and ICAO, and the Interpolated weather, so it may be that there's a bug in that Nearest Station call only. I suggest you get the weather for your destination using the Interpolated call. If the call I suggested is broken, I'm not sure how you can get the nearest WX station except by scanning the list yourself, working it out from the Lat/Lons. Alternatively, pretend the airport does have its own ATIS and use its ICAO id. This is what some other programs do, like, for instance, RC I think. Regards Pete |
|
#19
|
||||
|
||||
|
Thanks Pete. Had to "enjoy the sunshine" with the family this afternoon, so haven't investigated further yet. I think your first comment today and my edit must have crossed, and that answered your question -- in Map view (and also the load weather dialog) I was able to see weather at both departure and destination airports, and the call in my program returned both stations.
I haven't changed my program, so I don't know why it should be different today, unless the act of looking at the map (which I hadn't done before) acted as a trigger. I'll take a look at your WeatherSet2, and I'll also try the Interpolated weather call. Active Sky is injecting its weather into FS, so if that's running, the only difference should be that the METAR data has come from AS's server rather than the FS/Jeppesen server, yes? It may well be doing lots of fancy things with additional levels of complexity, but a call to WeatherRequestObservation... should still get me back something recognisable (I hope) Anyhow, I wanted to have things all tickety boo with the default wx before playing around with the fancy stuff! Thanks again ![]() Tim |
|
#20
|
|||
|
|||
|
Quote:
I have noticed in the past that FSX's downloaded weather isn't always complete. Quote:
Regards Pete |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Simconnect with Multiplayer - Collection RADIUS & Gamespy Name | Geoff_D | SimConnect | 21 | 24 Mar 2011 05:19 |
| Weather Generation | Jetliner | Mission Development | 20 | 09 Jun 2007 01:52 |
| Ideas for Dialog / GUI Features in SimConnect | DocMoriarty | SimConnect | 1 | 08 Jan 2007 18:06 |
| SimConnect and weather | Neutron | SimConnect | 1 | 01 Dec 2006 13:22 |
| About FSX and SimConnect? | guodah | SimConnect | 3 | 10 Oct 2006 03:04 |