Alright, first off let me say that I'm no expert in C++, and I may very well be making a huge beginner's mistake, so bear with me.
I'm building an application (for personal use for now, but I'm thinking about freewaring it in the future) which will report to a specified email address (eg. my cell phone's email address) at specific intervals the status of a long haul flight that I've left running in Flight Simulator. In preparation for a possible freeware release I want to be able to retrieve a variety of different values, such as groundspeed, airspeed, altitude, distance to next waypoint, etc. I'm using FSUIPC to retrieve the values.
Now here's the rub. I can retrieve altitude and airspeed fine. The rest of the values I want to retrieve, however, all come up zero when I know they shouldn't be. The value I'm working on at the moment is the distance to next waypoint. I'm using the following code to retrieve the distance value:
if(!FSUIPC_Read(0x6040,sizeof(double),&distance,&FSUIPCError))
MessageBox(hWnd,"Error: " + FSUIPCError,"Error",0);
This is the same procedure that I'm using to get my altitude, airspeed, and all other variables I'm looking for that currently return 0, using the appropriate variable sizes (int, short, etc).
I looked through the FSUIPC logs contained in /modules and found that FSUIPC was, in fact, returning 0 as distance, as well as my other problematic values, ruling out a programming error (for the most part anyway... ?).
FSUIPC Version 3.1 - Unregistered (Would this be a problem??)
FS2004
I think I've described the problem to the best of my ability but if you need more information just hollar. I also fear I'm making a foolish beginner's mistake so be gentle ;). Sorry if this has been posted & remedied before.
Thanks for a great utility Pete!
~lurk