Jump to content
The simFlight Network Forums

Get "N,S,E,W" letter out of the FS to a SIOC variable


Recommended Posts

Hello,

 

I am trying to get from the latitude an longitude from my current position onto an LCD Display from Opencockpits.

But, I am only interested in the leading letter N or S and E or W.

Can someone help me to archive this? What FS offset I must read to get those information ?

 

Thanks a lot,

Mark

Link to comment
Share on other sites

Hello,

 

I am trying to get from the latitude an longitude from my current position onto an LCD Display from Opencockpits.

But, I am only interested in the leading letter N or S and E or W.

Can someone help me to archive this? What FS offset I must read to get those information ?

 

Thanks a lot,

Mark

 

As per the offsets documentation in your FSUIPC Documents folder (did you look?), the latitude and longitude values are available in two places: 

 

0560, latitude in FS units as a 64-bit integer

0568, longitude in FS units as a 64-bit integer

6010, latitude from GPS in 64-bit floating point format.

6018, longitude from GPS in 64-bit floating point format.

 

Pete

 

Link to comment
Share on other sites

As per the offsets documentation in your FSUIPC Documents folder (did you look?), the latitude and longitude values are available in two places: 

 

0560, latitude in FS units as a 64-bit integer

0568, longitude in FS units as a 64-bit integer

6010, latitude from GPS in 64-bit floating point format.

6018, longitude from GPS in 64-bit floating point format.

 

Pete

Hi Pete,

 

yes I looked at the provided Offset PDF, but I am not shure how to get only the letters in text not the numbers in one variable to be displayed on the LCD screen.

Or maybe this calculation must be done within SIOC. If its negateive than write "S" to the variable, if we won't get the text direct out of the FS.

 

Mark

Link to comment
Share on other sites

Hi Pete,

 

yes I looked at the provided Offset PDF, but I am not shure how to get only the letters in text not the numbers in one variable to be displayed on the LCD screen.

Or maybe this calculation must be done within SIOC. If its negateive than write "S" to the variable, if we won't get the text direct out of the FS.

 

Correct. There are no "letters" provided by FS. You need only to interpret the sign. If -ve it is S or W, if +ve it is N or E. 

 

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.