Page 1 of 1

IWeatherSystem Service issue

Posted: Fri Nov 29, 2019 3:46 am
by tauseefAhmed
Hello,
Its been a few days since I started working on PDK IWeatherSystem service. I've followed the other samples to learn how to Query a service and use it.
I'm able to query the service successfully using the following line.

Code: Select all

CComPtr<IWeatherSystemV430> m_spWeatherSystem; PdkServices->GetPdk()->QueryService(SID_WeatherSystem, IID_WeatherSystem, (void**)&m_spWeatherSystem);
Then I called

Code: Select all

m_spWeatherSystem->SetMetarData(metar String)
.
At first, it applied the weather when I built the dll. But when I did the same for the second time, It didn't work.
I tried other functions as well but all of them return false. There's no error log as well. Just the function returning False everytime.

Note: I can remember during my R&D on this a few weeks back, SetMetarData was working fine. It's just a random behavior I think. Sometimes it works, sometimes it won't.

Can someone from Lockheed Martin take a look at this issue? Am I the only one facing the problem or others have also run into this one. Is this a SDK issue or something I need to check at my application side?


Thank you very much for your time.

Re: IWeatherSystem Service issue

Posted: Fri Nov 29, 2019 2:47 pm
by BenBaron
Hi Ahmed,

I don't know if that helps, but why do you query for the legacy IID_IWeatherSystem and not directly for the current version IID_IWeatherSystemV430 of the interface?

Greets, Benny

Re: IWeatherSystem Service issue

Posted: Fri Nov 29, 2019 5:25 pm
by tauseefAhmed
Hello Benny,

Thank you for your answer.
I forgot to mention in the post but I've tried it with IID_WeatherSystemV430 but it didn't help.

Re: IWeatherSystem Service issue

Posted: Wed Dec 04, 2019 12:19 am
by Clifton Crane
Hi tauseefAhmed,

Can you post an example METAR string? Are you near the weather station you are trying to set? Are you passing in a valid Unicode string into the function?

Thanks.

Re: IWeatherSystem Service issue

Posted: Wed Mar 04, 2020 3:47 am
by tauseefAhmed
Hello Clifton,

I am using the Metar provided within the P3D. I'm usimg GLOB as the weather station for this METAR to be a Global one and not specific to a particular Weather station.

GLOB 030405Z 27007KT 15SM SKC 17/13 A2992