Closed vamshichittaluri closed 3 years ago
Sooo I figured out i can access the function through:
sim.dll.WeatherSetObservation(sim.hSimConnect, 2, "CYXU METAR 271700Z 320002KTS 9999M R24R/5203FT R24L/420340 SCT006 OVC019 -02/-03 Q1021")
but i get the following error: ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type
I am guessing my first argument is wrong? Any idea on where I am loosing it?
Kind Regards Vamshi
Needs to be byte string aka
sim.dll.WeatherSetObservation(sim.hSimConnect, 2, b"CYXU METAR 271700Z 320002KTS 9999M R24R/5203FT R24L/420340 SCT006 OVC019 -02/-03 Q1021")
or
msg = "CYXU METAR 271700Z 320002KTS 9999M R24R/5203FT R24L/420340 SCT006 OVC019 -02/-03 Q1021"
sim.dll.WeatherSetObservation(sim.hSimConnect, 2, msg.encode())
Ahh! Awesome! Thanks Odwdinc! Works now.
Hello all,
Hope you are all well. I know through SimVars we cannot set the weather for the simulator. However, as seen in the attributes.py and simconnect function, i saw that we should be able to set METAR string weather(c++) implementation.
Can anyone guide me how to send the METAR string, i dont mean the actual string format, but synatx etc.
Kind Regards Vamshi