Jump to content
The simFlight Network Forums

Daniel Kraemer

Members
  • Posts

    2
  • Joined

  • Last visited

About Daniel Kraemer

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

Daniel Kraemer's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Pete! :D OK, it was my fault :oops: For the whole community - This is my solution: Fsuipc fs = new Fsuipc(); int fsToken = 0; int fsResult = 0; long latRead = 0; double latConv = 0; int latDegrees = 0; double latMinutes = 0; const int FSUIPC_LATITUDE_OFFSET = 0x0560; const int FSUIPC_LATITUDE_LENGTH = 8; const double FSUIPC_LATITUDE_FACTOR = 2.095109e-015; /* 90.0 / (10001750.0 * 65536.0 * 65536.0) */ const double FS2004_MINUTE_FACTOR = 60; fs.FSUIPC_Initialization(); fs.FSUIPC_Open(0, ref fsResult); fs.FSUIPC_Read( FSUIPC_LATITUDE_OFFSET, FSUIPC_LATITUDE_LENGTH, ref fsToken, ref fsResult); fs.FSUIPC_Process(ref fsResult); fs.FSUIPC_Get(ref fsToken, ref latRead); fs.FSUIPC_Close(); /* Convert to degrees * Example: * readLat = 24282851155509248 * convLat = 50.875220001567826 */ latConv = latRead * FSUIPC_LATITUDE_FACTOR; /* "full" degrees * latDegrees = 50 */ latDegrees = (int) latConv ; /* Multiply by 60 and * Round to 4 digits (good accuracy for most applications) * latMinutes = 52.5132 */ latMinutes = (latConv - latDegrees) * FS2004_MINUTE_FACTOR; latMinutes = Math.Round(latMinutes, 4); /* Explanation: N50* 52.51 is the latitude from EDDK - Gate E10 ;-) */ Regards, Daniel
  2. Hi folks! I registered FSUIPC a few days ago. :D Because I know a little bit C#, I've tried out the FSUIPC SDK. My first simple program reads the latitude data from FSUIPC, converts it into degrees (with the factor from SDK) and shows the result in a MessageBox. To examine if my result is correct i used FSInterrogate2. Everything was fine. My problem: To verify my data I use the Flight Simulator's "debug line" (the line with lat, long, kias... accessible via keystroke CTRL-Z). The latitude displayed by FS2004 always(!) differs from the value I've read through FSUIPC. The FSInterrogate2 value read from offset 0x6010 (FS2004 GPS Latitude in degrees) equals to my programs value, but differs from FS2004's one. Example: FS2004 shows N50.45... FSInterrogate2 and my prog shows 50.72... :shock: The latitude value always differs with a factor from 0.2 to 0.5 degrees! I've tested this behaviour on two different PC's, so I think it's not my fault :wink: My config: - WinXP SP2 - FS2004 German with update to version 9.1 - FSUIPC 3.50 (registered) - FSUIPC SDK Aug 05 Has anybody an idea what the problem is? Or maybe who to solve? THX a lot, Daniel Kraemer P.S.: Sorry for my bad english but my native language is German 8)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.