PDA

View Full Version : Question about fuel consumed in fly.



HR_Grainovich
Jun-22-2013, 13:04
Hi comrades!!

I have a question about the CloDs API, I would appreciate any help, please ;)

Before all, the scenario is a dedicated server, and I'm trying to calculate the fuel consumption after the mission.

So, I know the total amount of fuel of an aircraft with:


aircraft.getParameter(-1, part.ParameterTypes.S_FuelReserve);

This code return all kgs of fuel in the all tanks of the plane (it's supposed...), but... when you are flying along the mission and execute the same code, the amount is equals!

May be... the program not discount the fuel consumption?? , it's impossible to know the fuel consumption with this function?

I cant use the I_parameter because in dedicated server return zero.

Thank you very much for your help! ;)

ps: Sorry about my english.

Salmo
Jun-22-2013, 22:37
Is your aircraft.getParameter(-1, part.ParameterTypes.S_FuelReserve); code correct? Shouldn't the code be:



double current_fuel = aircraft.getParameter(part.ParameterTypes.S_FuelRe serve, -1);

HR_Grainovich
Jun-23-2013, 05:44
Yes Salmo, you are right!, it's a writing mistake ;) , but the result its the same, I cant know the fuel consumption... :(