Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Dear Pete,

I am facing a problem when reading the data for NAV1 and NAV2

NAV1 has a compact block of 16 Bytes starting at 0x0c48.

NAV2 starts at 0c59

Localiser needle is identical for both NAVs (Byte0)

But Byte 1 (0c49/0c5a are of different meaning.

For NAV1 ist means "Glideslope needle", for NAV2 it means Backcourse flags, while the glideslope is completely diffenet at 0c6e

This makes it hard to process the data with the same set of functions.

Is it possible to "push" the data for NAV2 in the same structure as NAV1 , so they look identical?

Maybe there are several other places where multiple instances ae needed (I think of COM1-2, Engine1-4)

Posted

NAV1 has a compact block of 16 Bytes starting at 0x0c48.

NAV2 starts at 0c59

More luck than judgement I suspect, as different parts were discovered at different times. Mostly the NAV1 items date back to FS98 or even before, whereas some of the NAV2 facilities came later.

This makes it hard to process the data with the same set of functions.

Just read them all and rearrange them to suit your code, if you wish.

Is it possible to "push" the data for NAV2 in the same structure as NAV1 , so they look identical?

Well, I cannot change the offsets after they've mostly been that way for about 7 years -- it would break a lot of programs.

Obviously, after you've read the data you can sort it however you like. In fact it isn't actually that hard to write the list of FSUIPC_Reads to read them into your structures in the exact order you want, irrespective of actual offset values. Just think of the offsets as "names" or "tags" rather than numerical positions.

Regards

Pete

Posted
Of course this is possible - but the routines for NAV1 and NAV2 have to be different

The programming routines can be identical if you read the data into your own structures, as I said. You don't have to read the data in offsets en bloc. The list of Reads can place them values where you like.

If you care to bypass the FSUIPC_Read and FSUIPC_Write procedures you can even simply pre-define the read and write data structures for copying directly into the memory-mapped file area. I use this technique in several of my programs. The FSUIPC_ series of calls are only wrappers to make things easier. The sources are all provided, so you have the ultimate flexibility in how you do things.

I cannot move stuff around for you without breaking all the other programs which have been reading this stuff for that last 7+ years. You must surely see that?

Regards

Pete

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.