plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


question

QWErnie avatar image
QWErnie asked QWErnie answered

wasm GPS_INFO

Is GpsInfo supposed to work in C++/Wasm ?

The header is included in the legacy section. I'm trying to read the current active GPS FlightPlan, like can be done in FSX/P3D.

...

#include <MSFS\Legacy\gps_info.h>

...

static GPS_INFO* gpsinfo = NULL;

static GPS_INFO* gpsrequest = NULL;

....

if (!gpsinfo)

{

MODULE_VAR var;

initialize_var_by_name(&var, GPS_INFO_PANEL_VARIABLE_NAME);

gpsinfo = (GPS_INFO*)var.var_ptr;

}

if (gpsinfo)

{

size = gpsinfo->dwSize;

num_wpts = gpsinfo->lWpCounts;

}

The gpsinfo pointer is assigned a value when using initialize_var_by_name(). But as soon as I try to get the size or number of waypoints from it, the gauge just freezes in the sim.

If this is supposed to work, can it be put on the to-do list to be fixed in the next update ?

wasm
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Boris_ avatar image
Boris_ answered

Hello @QWErnie ,

Indeed, this is a known issue on our side that will be fixed.


Thanks for reporting ;)

Regards,
Boris

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

QWErnie avatar image
QWErnie answered

Great !

Thanks Boris.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.