paul-henri Posted May 14, 2013 Report Share Posted May 14, 2013 Hello,I want to use FSUIPC to write some METAR for fixed airports in FSX. I have read the FSUIPC4 Offsets Status.pdf document which gives some information about the area where to copy data, but i'm not sure to fully understand... Suppose I want to send the following METAR: KSEA 030405Z 27007KT 15SM SKC 17/13 A2992. I copy this string is into a string variables named Metar[]. Should I use the following API at the following 0xB000 offset ? FSUIPC_Write(0xB000, 42, (void *)Metar, &dwResult); FSUIPC_Process(&dwResult); Or am I completly wrong ? Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 15, 2013 Report Share Posted May 15, 2013 Hello,I want to use FSUIPC to write some METAR for fixed airports in FSX. I have read the FSUIPC4 Offsets Status.pdf document which gives some information about the area where to copy data, but i'm not sure to fully understand... Suppose I want to send the following METAR: KSEA 030405Z 27007KT 15SM SKC 17/13 A2992. I copy this string is into a string variables named Metar[]. Should I use the following API at the following 0xB000 offset ? FSUIPC_Write(0xB000, 42, (void *)Metar, &dwResult); FSUIPC_Process(&dwResult); Or am I completly wrong ? I'd use "strlen(Metar)+1" instead of 42. The length must include the zero terminator. For the METAR format needed, please refer to the SImConnect SDK -- function SimConnect_WeatherSetObservation. FSUIPC simply passes your string to that function. I think you might get away with: KSEA METAR 030405Z 270007KT 15SM SKC 17/13 A2992 Don't forget, if you are writing a lot, do the Writes first with one Process at the end. Regards Pete Link to comment Share on other sites More sharing options...
paul-henri Posted May 15, 2013 Author Report Share Posted May 15, 2013 Hello Pete, Thank you very much for your answer. I was not sure to have fully understood the way to proceed to write a METAR. I think I was missing the zero terminator.... Best regards. Paul-Henri 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