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
