SimCommect_WeatherSetObservation is not working.

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
kimpaul
Posts: 6
Joined: Thu May 25, 2017 11:40 am

SimCommect_WeatherSetObservation is not working.

Post by kimpaul »

Hello,

I want to stop a time of day.

So I using SimCommect_WeatherSetObservation API to assign same time forever.

But not changed anything.

I expected the "KSEA 0000Z" value make the night time of seattle.

But still day time is running.

I tested miles of visibility with 1SM and 15SM and working well.

Because any lights of airport were turn on and turn off due to visibility.

Please advise to me.

Thank you!
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: SimCommect_WeatherSetObservation is not working.

Post by obinder »

Hello,

You cannot set the time with this function. The "hhmmZ" time is only an information when the METAR was taken, nothing more.

To influence the time in the simulator you have to trigger the proper events, "ZULU_YEAR_SET", "ZULU_DAY_SET", "ZULU_HOURS_SET", "ZULU_MINUTES_SET"


Best regards
Oliver Binder
Lorby-SI
ppp333ddd_
Posts: 58
Joined: Fri Aug 18, 2017 1:04 am

Re: SimCommect_WeatherSetObservation is not working.

Post by ppp333ddd_ »

Hi Oliver,

Which function or API should be used for ZULU_DAY_SET, simconnect.TransmitClientEvent, simconnect.SetDataOnSimObject or another?

Thanks,

Jeff
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: SimCommect_WeatherSetObservation is not working.

Post by obinder »

Hello Jeff,

TransmitClientEvent

(SetDataOnSimobject can only set simulator variables - Event IDs are an entirely different matter)

Check out the samples "SendEventA/B/C". They are C++ but it works just the same in C#.

Best regards
Oliver Binder
Lorby-SI
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: SimCommect_WeatherSetObservation is not working.

Post by WarpD »

You can not set time of day via SimConnect.
Ed Wilson
Senior Developer
Mindstar Aviation
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: SimCommect_WeatherSetObservation is not working.

Post by obinder »

Hello Ed,

beg to differ. Sure you can, nothing to it. I am using this in 4 of my addons.

Best regards
Oliver Binder
Lorby-SI
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: SimCommect_WeatherSetObservation is not working.

Post by WarpD »

You're using events that have existed prior to SimConnect. They're actually part of the gauge support that's been around for a long time. So... SImConnect doesn't have it's own API to control date/time... and I guess I should have been more specific.
Ed Wilson
Senior Developer
Mindstar Aviation
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: SimCommect_WeatherSetObservation is not working.

Post by obinder »

Hello Ed,

sorry, I am probably missing the point.

From my perspective I am using an API function call to make use of a feature of the app that is offering the API. Whatever the internals of that feature are doesn't matter to me. As long as it is working according to spec and the platform provider doesn't remove it some day.

Best regards
Oliver Binder
Lorby-SI
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: SimCommect_WeatherSetObservation is not working.

Post by WarpD »

Except.. the events work inside of a gauge, without SimConnect. To you there may be no difference, but to me there is. Hence why I responded as I did.
Ed Wilson
Senior Developer
Mindstar Aviation
Locked