Potential new maintenance formula
#4
It does take size into consideration when calculating cycles, hours and mileage. I just updated the formulas today:



PHP Code:
// For larger aircraft
if($aircraft->max_seats >= 250) {
// How many miles has the aircraft flown?
$miles $years*(rand(4000,8000)*365); // 4000-8000 miles per day

// How many hours has the aircraft flown?
$hours $years*(rand(16,20)*365); // 16-20 hours per day

// How many cycles has the plane had?
$cycles $years*(rand(1,2)*365); // 1-2 flights per day
}

// For medium aircraft
if($aircraft->max_seats >= 100 AND $aircraft->max_seats 250) {
// How many miles has the aircraft flown?
$miles $years*(rand(2000,4000)*365); // 2000-4000 miles per day

// How many hours has the aircraft flown?
$hours $years*(rand(12,18)*365); // 12-18 hours per day

// How many cycles has the plane had?
$cycles $years*(rand(3,5)*365); // 3-5 flights per day
}

// For smaller aircraft
if($aircraft->max_seats 100) {
// How many miles has the aircraft flown?
$miles $years*(rand(1000,2000)*365); // 1000-2000 miles per day

// How many hours has the aircraft flown?
$hours $years*(rand(12,18)*365); // 12-18 hours per day

// How many cycles has the plane had?
$cycles $years*(rand(5,7)*365); // 5-7 flights per day

I am the developer of Airline Enterprise
Reply


Messages In This Thread
Potential new maintenance formula - by Unknown98 - 07-14-2019, 03:09 PM
RE: Potential new maintenance formula - by Carde - 07-14-2019, 04:19 PM
RE: Potential new maintenance formula - by Unknown98 - 07-14-2019, 11:07 PM
RE: Potential new maintenance formula - by gaff85 - 07-15-2019, 11:03 AM
RE: Potential new maintenance formula - by gaff85 - 07-18-2019, 10:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)

About Airline Enterprise

Welcome to the official message boards of Airline Enterprise. Feel free to join the discussions, ask for help or just browse!

              Quick Links

              User Links