Jump to content
Sign in to follow this  
Damlimey

LINDA and the payload offset.

Recommended Posts

Hi all,

I had a crazy thought the other day about using LINDA to change the weight value of a particular payload station in FSX. The offsets list has an entry (0x1400) and using the tracer, I could read by default the value of the weight at station 1. However, reading from the offets list, I do not understand how to interogate any subsequent station so my first question is how do I trace 0x1400 station 2 or 3 etc?

Then I thought about using 'ipc.write' to change that weight value but 'ipc.writeDBL(0x1400, 200)' didn't work. I get the feeling that actually, you can't write values into FSX using this method but I wonder if there is a way that someone here has either used or thinks might work.

It strikes me that this is probably a dead end idea but if I don't ask...

Share this post


Link to post
Share on other sites

I was wrong!

'ipc.writeDBL(0x1400, 200)' does write 200 lbs into payload station 1 so, what I am asking now is how do I write to station 2 or 3?

Yippee!

Share this post


Link to post
Share on other sites

You need to study the FSUIPC Offsets Status document (in /modules/fsuipc documents).

Offset 0x13FC (4 bytes) contains the count of the payload stations (n).

Offset 0x1400 (48 x n bytes) contains sets of payload data for each station. That 48 bytes per station with the start position calculated the payload station (n-1) multiplied by 48 (ie. station 2 offset is 0x1400 + ((2-1) * 48).

Also will see that each 48 byte entry contains a number of values each of 8 bytes length.

I will leave you to play with that. 


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

I got it working by luck rather than maths. I found that 0x1400, 200 would write 200lbs to station 1 (station.0 in FSX) and just started adding numbers until I could add it to station 2. the magic number in this case was 30. So, 1430=2, 1460=3, 1490=4 etc. I did study the Offsets status doc but no matter how many times I read it, the only penny that dropped was that each station was a value of 1400+ something.

The document also says that the result needs checking in FSX which I assume somebody has done ages ago but in case not;

ipc.writeDBL(0x1430, 3000) puts 3000lbs into the second payload station, it appears as that in the FSX payload menu and switching it in makes my helicopter drop like a stone so it definately works.

I tried the same with: ipc.writeDBL(0x1448, 3000) but that didn't work although I think that is probably because I haven't coded it correctly?

Thank you for getting back to me on this, yet again you have taught me something new.

Share this post


Link to post
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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...