Jump to content
The simFlight Network Forums

How to get payload weight from stations ?


Recommended Posts

Hi to all,

I need get payload weight from stations. I use offset 1400. When I set for station1 payload weight 1LBS (in FS), I get result 1072693248 , when I set 2LBS, I get result 1073741824. I need get result 1 as 1LBS or 2 as 2LBS and so on. Can anyone help me ?

Thanks. Milan

Link to comment
Share on other sites

Hi Milan,

First check that payloads stations are defined in your aircraft.cfg file in the [Weight_and_balance] section, otherwise FS and FSUIPC will not be able to write/retrieve any. Definitions of stations are for example:

station_load.0 = 170.0, 46.3,-1.5,0.0

station_load.1 = 120.0, 46.3, 1.5,0.0

Then, check that you can read 170 lbs at offset &H1400 and 120 at offset &H1430. These are doubles and you will need to provide a corresponding 8 bytes value for read/write (I don't know which language you use for that)

Check for changes after you write and process new values at the same offsets

Hope, it will help

Hervé

Link to comment
Share on other sites

Hi,

you get that kind of values when you not read with correct variable types. As Herves wrote u need to read with a "double".... (you can use FS Interrogate for analyse it first)

+++

But i have another problem on this topic. Maybe somebody knows the answer:

I read the payload stations correct. But when i write them then they are writen into the single stations and they show correct values within the FS payload window, but the ZFW (zero fuel weight) does not change!!!

Pete is writing in the SDK that for FS2004 this is done by FS automatically.

But that is not the case (i use original FS2004 without Patch, FSUIPC is 3.72).

Also when i try to overwrite the ZFW with a calculated value that is ignored by FS.

It seems that there is a kind of activation missing. Like when you press OK button in the FS menue.

Is there any trick on it?

Regards

Roland

Link to comment
Share on other sites

Roland,

I monitored &H3BFC offset that appears to work correctly when payload is changed within FS. I didn't test it after directly changing payload weights at assigned FSUIPC offsets &H1400 and following. May be there is a dysfunction here and Pete will surely check that. Writing at &H3BFC has little sense (even if it's marked OK in the SDK) since this offset adds total payload weight to basic empty weight (a fixed aircraft.cfg value)

Regards

Hervé

PS: Zero fuel weight at &H3BFC (marked ?) doesn't appear to work correctly in FSX. It only reports basic empty weight and doesn't add payload

Edit:PS

Link to comment
Share on other sites

I read the payload stations correct. But when i write them then they are writen into the single stations and they show correct values within the FS payload window, but the ZFW (zero fuel weight) does not change!!!

Pete is writing in the SDK that for FS2004 this is done by FS automatically.

But that is not the case (i use original FS2004 without Patch, FSUIPC is 3.72).

Where are you reading that in the SDK. In my copy it clearly states, in the details for offset 1400:

These loadings can be changed, and this does have some effect, but such changes are not being promulgated to the overall weights (offsets 30C0, 30C8, 3BFC) nor balance (2EF8), and it looks like they have to refreshed, as FS overrides them from time to time. It has also been reported that FS can crash if a lot of changes are made here, so care and full testing is needed.

Regards

Pete

Link to comment
Share on other sites

  • 2 weeks later...
i readed it at Offset 3BFC....
In FS2004 this changes as the payload is adjusted.

but that unfortunatly not the case

But it is the case, when the payload is changed in FS2004 dialogues. As documented for the payloads in the FSUIPC Offsets list, and quoted above, this is not so by directly writing to the internal values.

In Fs2002 and before there was no payload facilities, hence the comments. In those days folks had to adjust payload by adjusting fuel load!

Regards

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.