MartinMcTighe Posted April 23, 2008 Report Share Posted April 23, 2008 Hiya all, I previously developed a weather setting program for FS2004 using the new weather interface as explained in FSUIPC (weather.h). I have since moved onto using ESP (at the moment still very similar to FSX underneath) and have been having a problem where by when I set the weather I want ESP crashes. I have tried it on ESP using the latest ESPIPC and on FS using the latest FSUIPC. I've tried the same weather setting on FSX and the same thing happens. Has the weather setting changed for FSX/ESP? and if so what should I be looking into? Thanks, Martin McTighe Link to comment Share on other sites More sharing options...
Pete Dowson Posted April 23, 2008 Report Share Posted April 23, 2008 I previously developed a weather setting program for FS2004 using the new weather interface as explained in FSUIPC (weather.h). I have since moved onto using ESP (at the moment still very similar to FSX underneath) and have been having a problem where by when I set the weather I want ESP crashes. I have tried it on ESP using the latest ESPIPC and on FS using the latest FSUIPC. I've tried the same weather setting on FSX and the same thing happens. Hi Martin. The NWI is used by ActiveSky 6.5 and that works pretty well on FSX (for those who've not upgraded to ASX). I've not tried it on ESP, but there's really no difference in that regard. Has the weather setting changed for FSX/ESP? and if so what should I be looking into? No, no change, but FSUIPC4 and ESPIPC use SimConnect to set the weather, and have to convert it all to extended METAR strings. If FSX/ESP are crashing it could be a SimConnect problem on your installations. It is also possible, of course, that you have something which maybe not quite right in the NWI (or something I didn't think of) but which didn't have any adverse effect in FSUIPC3 but does in FSUIPC4. Your best bet is to use the Logging facilities provided in FSUIPC4. Please let's concentrate on FSX first, because it is far easier for me to get into it the way my development is set up. In fact, it would be best to log the exact same sequence in both FS2004 and FSX so that we can see where it goes wrong in context. Enable Weather logging and both IPC Read and Write logging in both. Turn off any weather options in both. Make sure you only have that one FSUIPC client to avoid extra large and confusing logging. It might also be a good idea, for FSX, to get a SimConnect log too (see the FSX Help announcement). Zip up all the logs, and the FSUIPC INI files and send them to me as email attachments. You know the address. BTW I'm going to be running very short of time soon. [LATER] I just ran ASV6.5 against FSX, using the latest FSUIPC4 (4.272), just to make sure I've not messed anything up, and it sets weather quite well, no problems. I also tested with WeatherSet2 (good for reading via the NWI, more difficult to use for writing). With the FSUIPC weather logging on and a program setting weather stations via the NWI you will get log entries like this one: 475484 NW_SET weather command received, ICAO=EBAW 475484 >NewSet: **** New Weather being set: ICAO=EBAW (Dyn=0) 475484 >NewSet: Pressure=1021.0, Drift=0.0 475484 >NewSet: Visibility[0]: range=1.2sm (1979m), from=-610ft, to=9880ft 475484 >NewSet: Temperature[0]: alt=36ft, Day=10 C, NightVar=0 C, DewPt=10 C 475484 >NewSet: Temperature[1]: alt=3000ft, Day=5 C, NightVar=0 C, DewPt=-1 C 475484 >NewSet: Temperature[2]: alt=5990ft, Day=-1 C, NightVar=0 C, DewPt=-7 C 475484 >NewSet: Temperature[3]: alt=9000ft, Day=-4 C, NightVar=0 C, DewPt=-10 C 475484 >NewSet: Temperature[4]: alt=12000ft, Day=-13 C, NightVar=0 C, DewPt=-19 C 475484 >NewSet: Temperature[5]: alt=18000ft, Day=-26 C, NightVar=0 C, DewPt=-32 C 475484 >NewSet: Temperature[6]: alt=24000ft, Day=-39 C, NightVar=0 C, DewPt=-45 C 475484 >NewSet: Temperature[7]: alt=30000ft, Day=-52 C, NightVar=0 C, DewPt=-62 C 475484 >NewSet: Temperature[8]: alt=34000ft, Day=-57 C, NightVar=0 C, DewPt=-67 C 475484 >NewSet: Temperature[9]: alt=39000ft, Day=-54 C, NightVar=0 C, DewPt=-69 C 475484 >NewSet: Temperature[10]: alt=50000ft, Day=-59 C, NightVar=0 C, DewPt=-74 C 475484 >NewSet: Temperature[11]: alt=82000ft, Day=-69 C, NightVar=0 C, DewPt=-89 C 475484 >NewSet: Surface wind: to alt=2040ft AMSL, dir=280T, vel=5.00, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 1: to alt=3000ft AMSL, dir=284T, vel=13.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 2: to alt=5990ft AMSL, dir=315T, vel=18.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 3: to alt=9000ft AMSL, dir=307T, vel=15.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 4: to alt=12000ft AMSL, dir=307T, vel=22.0, gust=0.0, turb=1, shear=0, var=0.0 475484 >NewSet: Wind layer 5: to alt=18000ft AMSL, dir=288T, vel=33.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 6: to alt=24000ft AMSL, dir=290T, vel=33.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 7: to alt=30000ft AMSL, dir=284T, vel=37.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 8: to alt=34000ft AMSL, dir=274T, vel=28.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 9: to alt=39000ft AMSL, dir=256T, vel=24.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 10: to alt=50000ft AMSL, dir=256T, vel=14.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Wind layer 11: to alt=82000ft AMSL, dir=256T, vel=7.0, gust=0.0, turb=0, shear=0, var=0.0 475484 >NewSet: Cloud[0]: type=9, from 364ft to 4410ft (+/- 66ft), cover=8, turb=2, topshape=0 475484 >NewSet: Precip=1, base=-120ft, rate=2, icing=1 475484 >NewSet: Cloud[1]: type=1, from 38960ft to 39130ft (+/- 100ft), cover=2, turb=0, topshape=0 475484 >NewSet: Precip=0, base=0ft, rate=0, icing=1 475484 >NewSet: **** End of New Weather details for ICAO=EBAW 475484 Setting Weather: "EBAW 240007Z 28005KT&D609NG 28413KT&A609NG 31518KT&A902NG 30715KT&A1814NG 30722KT&A2731OG 28833KT&A3646NG 29033KT&A5474NG 28437KT&A7303NG 27428KT&A9132NG 25624KT&A10351NG 25614KT&A11875NG 25607KT&A15228NG 1979&B-201&D3201 8CU003&CU040FLMR000T 2CI389&CI002FNVN000T 10/10&A0 05/M01&A902 M01/M07&A1814 M04/M10&A2731 M13/M19&A3646 M26/M32&A5474 M39/M45&A7303 M52/M62&A9132 M57/M67&A10351 M54/M69&A11875 M59/M74&A15228 M69/M89&A24982 Q1021 " The lines up till the "Setting weather" line is the received NWI command for a single station, and the long METAR-type string at the end is how this gets sent to SimConnect. With SimConnect logging enabled you'll see the same string there. I'm sure you'll be able to understand this, but what I'd be interested in is the comparison between FS2004 and FSx. Theoretically there should be nothing you can do via the FSUIPC IPC NWI interface to cause an FS crash, because the data all has to be checked and converted into that METAR string first, so rubbish shouldn't really get through. If the crash is actually happening in my code then of course i want to know, and fix it. Regards Pete Link to comment Share on other sites More sharing options...
MartinMcTighe Posted April 25, 2008 Author Report Share Posted April 25, 2008 I had a look into my software and I was using an older version of the newweather.h setup. It seems that when I set the weather I set the whole weather (including default values for any layers that arn't being used) so when I was using the version of the NWI with 26 cloud layers and swapped from FS2004 to FSX with it's different layout I was writting invalid values. This is what was causing the crash. After looking at this I assume I should only be setting the layers that I am actually updating rather than the whole lot. Ah well problem solved anyway. Thanks for your help pete. Oh when I changed the writting to use the new interface it worked on ESP as well as FSX :D Martin McTighe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now