Calculations Incorrect

Please report Bugs and Problems here
Post Reply
alasizon
FSAirlines DB and Wiki Admin
Posts: 865
Joined: Tue Apr 08, 2008 2:08 am
Location: PHX

Calculations Incorrect

Post by alasizon » Sat Sep 13, 2008 6:58 pm

While my math tends to be spotty every so often, I think the math is off slightly

Finances
Income from tickets: PAX (10) x Ticketprice (59v$) 590v$
Fuel costs: Fuelprice (1.54v$) x 1.234 x Fuel bought (400kg / 882lbs) -760v$
Crew & catering costs: -50v$
Cargo income: 1.41v$/100nm x Distance (64nm) x Cargo (10kg / 22lbs) 9v$
Bonus 0v$
Pilot salary: Airline Income x Pilot salary percentage 0v$

Gross profit: -68v$
x Multiplier (1000) -68.000v$

and

Finances
Income from tickets: PAX (547) x Ticketprice (99v$) 54.153v$
Fuel costs: Fuelprice (1.45v$) x 1.234 x Fuel bought (70kg / 154lbs) -125v$
Crew & catering costs: -2.735v$
Cargo income: 1.09v$/100nm x Distance (325nm) x Cargo (547kg / 1206lbs) 1.931v$
Bonus 2.565v$
Pilot salary: Airline Income x Pilot salary percentage 0v$

Gross profit: 51.317v$
x Multiplier (50) 2.565.850v$

Both are off by a bit (much larger on the second one)

Not to mention the cargo stats are the pax numbers?? I think cargo calcs went wrong somewhere
Matt-FSAirlines DB Admin
Image

User avatar
DaKurt
FSAirlines Developer
Posts: 452
Joined: Tue Nov 15, 2005 3:49 pm
Location: Munich

Re: Calculations Incorrect

Post by DaKurt » Sat Sep 13, 2008 7:04 pm

thank you for reporting that.

I just had a look at our calculation and saw, that the pilot salary was deducted from the profit, even if the profit is negative and thus the salary was 0.

F.e.:

If the Profit is -20.000 (negative)
The Salary (10%) is -2000

then the Salary had been subtracted from the profit =>
Profit = -20.000 - (-2000) = -18.000

I just changed this bug. The salary is now beeing set to 0 before subtracting it from the profit.
Claudio - FSAirlines Programming

alasizon
FSAirlines DB and Wiki Admin
Posts: 865
Joined: Tue Apr 08, 2008 2:08 am
Location: PHX

Re: Calculations Incorrect

Post by alasizon » Sat Sep 13, 2008 7:07 pm

Claudio,

I understand that for the first one but I don't see how it applies to the second one, the salary is set as 0% and the profit was positive, did it still subtract it??
Matt-FSAirlines DB Admin
Image

User avatar
DaKurt
FSAirlines Developer
Posts: 452
Joined: Tue Nov 15, 2005 3:49 pm
Location: Munich

Re: Calculations Incorrect

Post by DaKurt » Sat Sep 13, 2008 7:21 pm

why is your salary 0 if you had a postive profit. have you set the salary percentage to 0%?
Claudio - FSAirlines Programming

alasizon
FSAirlines DB and Wiki Admin
Posts: 865
Joined: Tue Apr 08, 2008 2:08 am
Location: PHX

Re: Calculations Incorrect

Post by alasizon » Sat Sep 13, 2008 7:24 pm

Yes, at the time it was set to that to maximize profit. The profits are still off though.
Matt-FSAirlines DB Admin
Image

Post Reply