Jump to content
The simFlight Network Forums
sxa1376

Help setting aircraft payload and fuel needed

Recommended Posts

Dear Pete,

I am trying to create a small utility to read my aircraft weight and fuel stations and then to write new weight and fuel.

The aircraft i am using is a standard airbus a320 of the "project airbus" team and the stations i want to manipulate are these:

 

[WEIGHT_AND_BALANCE]
//Cebu Pacific A320-214  RP-C3241 config
     
 

//Pax Zonings
station_load.0= "7605.9, 21.24, 0.000, 0.000,  CAB OA (60)" 
station_load.1= "7149.6,  -3.33, 0.000, 0.000,  CAB OB (60)"  
station_load.2= "6541.1, -26.34, 0.000, 0.000, CAB OC (59)"
-ok

//Cargo & Baggage
station_load.3= "2921.1,  22.10, 0.000, 0.000, CPT 1"   //Compartment 1 (7500lbs)
station_load.4= "3086.5, -11.99, 0.000, 0.000,  CPT 3"   //Compartment 3 (5349lbs)
station_load.5= "1190.5, -22.67, 0.000, 0.000, CPT 4"   //Compartment 4 (4652lbs)
station_load.6= "171.96, -33.11, 0.000, 0.000,  CPT 5"   //Compartment 5 (3300lbs)

and

[fuel]
Center1=   4.15,   0.0, -4.00, 2179.6, 8.0
LeftMain=  3.31, -19.6,  1.40, 1829.6, 5.0   //3.45
LeftAux=  -4.80, -36.4,  2.20,  232.5, 5.0
RightMain= 3.31,  19.6,  1.40, 1829.6, 5.0   //3.45
RightAux= -4.80,  36.4,  2.20,  232.5, 5.0

 

I am using C# and i need some help in order of which offsets i must use for this to work and if possible a quick sample just for one station of weight and one station of fuel.

Many thanks in advance.

George.

 

 

Share this post


Link to post
Share on other sites
4 hours ago, sxa1376 said:

I am using C# and i need some help in order of which offsets i must use for this to work and if possible a quick sample just for one station of weight and one station of fuel.

Sorry, I've no idea about C#, and really cannot do the programming for you. I can answer specific questions about FSUIPC and its offsets, but first you need to find them in the Offsets Status document (in your FSUIPC Documents subfolder) and read what it says about them.

Are you using Paul Henty's .NET DLL for your application? Because you should. It makes things easier for such languages. And he has his own support in a subforum above.

Pete

 

Share this post


Link to post
Share on other sites

Dear sxa1376

We agree with Pete. We programm in VB6. However it is the same in C++.
We assume you have FSUIPC4 Offsets Status.pdf open to your hands.

Fuel
You need to change the Percentage-Level of the tanks, start with offset
&H0B74,   4 bits,    Fuel: centre tank level, % * 128 * 65536.
100% = 8'388'607 (= 128 * 65536), equals at 50% to 4'194'303 to be written into the 4 bits

Payload
It depends of your aircraft.cfg file.
Start to research on offsett &H1400. Each Station has 48 Bites.
Write the weight in lbs into &H1400 + 0 = &H1400, a double of 8 bits.
Next station:
 &H1400 + 48 bits equals to &H1400 + &H30 = &H1430.
Write the weight in lbs into &H1430 + 0 = &H1430, a double of 8 bits.
And so on until you have all stations set.

By the way you can put as much you want and make your Cessna 172  1'000'000 pounds heavy.

Best regards from Switzerland
Peter

Share this post


Link to post
Share on other sites

Dear Pete and Peter,

Thank you very much for yoyr answers, i will try the offset 1400 and i hope i make it work.

 

Best Regards

George

 

 

Share this post


Link to post
Share on other sites

Dear Peterk54,

I tried with offset 1400 and worked fine until offset 1520. Which means that I can load only five payload stations. after that (offsets 1550 & 1580) are inoperable. Not only that but offset 1520 loads the final (seventh) station instead of the fifth.

Do you have any suggestions for what am I doing wrong?

Thank you very much in advance

Best Regards 

George

Share this post


Link to post
Share on other sites
20 minutes ago, sxa1376 said:

I tried with offset 1400 and worked fine until offset 1520. Which means that I can load only five payload stations. after that (offsets 1550 & 1580) are inoperable. Not only that but offset 1520 loads the final (seventh) station instead of the fifth.

1400 to 1520 inclusive covers 7 stations: 1400, 1430, 1460, 1490, 14C0, 14F0, and 1520. How do you count only 5?

BTW FSUIPC simply handles these with SimConnect using payload station numbers, 1 - n, where n si the number of paystations supported by the currently loaded aircraft, as supplied in offset 13FC. FSUIPC does not process this data at all. What you get/set is just what FS and SimConnect provide and allow.

Pete

 

Share this post


Link to post
Share on other sites

To sx1376

Pete is correct, you should receive 7 tanks from offset 1400 to 1520. I write exactly to these offsets: Upper Deck, Section A to E. Payload in 1550 and 1580.

A) Wrong offsets increase
1400 to 1430 ar steps of 30 (in hex) , 48 (in dec). You mixed up ?

B) Wrong definitions
Check read 4 bytes at offset 13FC. Do you get equal or more of your total PAX sections and payload ? Check your aircraft.cfg. Only one line of "max_number_of_stations=n" ?
Sample:
max_number_of_stations=9
station_name.0
...
station_name.8
station_load.0
...
station_load.8

C) No more ideas, wait your feedback !

Best regards
Peter
 

Share this post


Link to post
Share on other sites

Thank you very much!!!  In fact I got confused indeed with the hexadecimal values. 

Works like a charm!  Thanks again!!! 

Best regards

George 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • 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.