IWeatherSystem Service issue

tauseefAhmed
Posts: 15
Joined: Wed Jul 31, 2019 4:56 pm

IWeatherSystem Service issue

Postby tauseefAhmed » Fri Nov 29, 2019 3:46 am

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.

BenBaron
Posts: 75
Joined: Fri Jan 16, 2015 7:51 am

Re: IWeatherSystem Service issue

Postby BenBaron » Fri Nov 29, 2019 2:47 pm

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

tauseefAhmed
Posts: 15
Joined: Wed Jul 31, 2019 4:56 pm

Re: IWeatherSystem Service issue

Postby tauseefAhmed » Fri Nov 29, 2019 5:25 pm

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.

Clifton Crane
Lockheed Martin
Posts: 998
Joined: Tue Sep 25, 2012 2:34 pm

Re: IWeatherSystem Service issue

Postby Clifton Crane » Wed Dec 04, 2019 12:19 am

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.
Clifton Crane
Prepar3D® Software Engineer Sr.


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 1 guest