Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set sim/weather #272

Closed
krao-MIT opened this issue Jan 13, 2022 · 1 comment
Closed

Unable to set sim/weather #272

krao-MIT opened this issue Jan 13, 2022 · 1 comment

Comments

@krao-MIT
Copy link

krao-MIT commented Jan 13, 2022

I'm using Windows 10, Matlab 2021a, and XP11 Version 11.55 (OpenGL).
I'm trying to change aspects about the simulated weather using XPC. For example:

disp('Setting up Simulation');
Socket = openUDP('127.0.0.1', 49009);

sendDREFs( {'sim/weather/wind_speed_kt'} , single(5) , Socket) % <- Doesn't work
result = getDREFs('sim/weather/wind_speed_kt', Socket)

I can change the weather using the GUI in XP11 and I can read the resulting weather based on those changes from the GUI. But I can't seem to make those same changes from XPC. Documentation online states that the variables are "Writeable" (https://developer.x-plane.com/datarefs/).

Any help in determining how to manipulate weather using XPC would be appreciated.

@AlvaroSierra
Copy link

X-Plane 11 does weather in layers so I recommend you edit these layers individually. For this use the DREFs with a [0], [1] or [2] at the end of the property and then you can define the speed, direction and altitude (note that if you want it to be acting on the aircraft it must be set at the same altitude).

In your case you would use the sim/weather/wind_speed_kt[0] DREF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants