Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<?php
$NNC = "NONE";
$RWY = "POOR";
$max_manual = convert("5310 510/-500 160/160 -340 1330 380 -260 130 -130 380 1050 4780");
$auto_max = convert("5310 510/-490 160/160 -330 1310 380 -250 130 -130 390 1060 4820");
$auto_3 = convert("5310 520/-510 160/160 -340 1320 360 -240 130 -130 410 1090 4830");
$auto_2 = convert("5530 530/-540 170/170 -350 1360 340 -250 140 -140 410 870 4550");
$auto_1 = convert("5660 570/-570 180/180 -360 1390 390 -270 150 -150 400 1060 4510");
$aircraft_type = "737-500_CFM56";
$flaps = 40;
$ref_weight = 45000;
$SPD_BRKS_MAN= "49";
$SPD_BRKS_AUT= "49";
//LBS to METER CONVERSION
$max_manual = convertLineToMeter($max_manual);
$auto_max = convertLineToMeter($auto_max);
$auto_3 = convertLineToMeter($auto_3);
$auto_2 = convertLineToMeter($auto_2);
$auto_1 = convertLineToMeter($auto_1);
$result_1 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'MAX MANUAL', {$ref_weight}, ".$max_manual.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_2 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE MAX', {$ref_weight}, ".$auto_max.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_3 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 3', {$ref_weight}, ".$auto_3.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_4 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 2', {$ref_weight}, ".$auto_2.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_5 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 1', {$ref_weight}, ".$auto_1.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
echo $result_1."<br>".$result_2."<br>".$result_3."<br>".$result_4."<br>".$result_5."<br>";
function convert($str){
$str = str_replace(" ", ", ", $str);
$str = str_replace("/", ", ", $str);
return $str;
}
function removeDouble($str){
return str_replace(", ,", ",", $str);
}
function convertToMeter($value){
return round($value * 0.3048, 0, PHP_ROUND_HALF_UP);
}
function convertLineToMeter($line){
$items = explode(", ", $line);
$newline = "";
foreach ($items as $item){
$newline .= convertToMeter($item) . ", ";
}
return $newline;
}
?>
<?php
$NNC = "NONE";
$RWY = "POOR";
$UNFACTORED=1; //1 for YES 0 for NO
//NE PAS OUBLIER D'AJOUTER LES COLONNES MANQUANTES
$max_manual = convert("6790 520/-510 220/220 -420 1630 570 -380 180 -190 460 1110 2940");
$auto_max = convert("7070 520/-510 220/220 -420 1620 580 -360 180 -190 480 1120 2960");
$auto_3 = convert("7070 530/-520 220/220 -420 1620 550 -350 180 -190 510 1130 2970");
$auto_2 = convert("7250 550/-530 230/230 -440 1670 530 -360 190 -200 520 940 2650");
$auto_1 = convert("6940 520/-520 220/220 -350 1210 190 -210 200 -190 510 550 800");
$aircraft_type = "737-900_CFM56";
$flaps = 40;
$ref_weight = 60000;
$SPD_BRKS_MAN = 58;
$SPD_BRKS_AUT = 58;
if ($UNFACTORED==1 && ($RWY=="GOOD" || $RWY == "MEDIUM" || $RWY == "POOR")){
$SPD_BRKS_MAN = round($SPD_BRKS_MAN * 1.15, 0, PHP_ROUND_HALF_UP);
$SPD_BRKS_AUT = round($SPD_BRKS_AUT * 1.15, 0, PHP_ROUND_HALF_UP);
}
//LBS to METER CONVERSION
$max_manual = convertLineToMeter($max_manual, $RWY, $UNFACTORED);
$auto_max = convertLineToMeter($auto_max, $RWY, $UNFACTORED);
$auto_3 = convertLineToMeter($auto_3, $RWY, $UNFACTORED);
$auto_2 = convertLineToMeter($auto_2, $RWY, $UNFACTORED);
$auto_1 = convertLineToMeter($auto_1, $RWY, $UNFACTORED);
$result_1 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'MAX MANUAL', {$ref_weight}, ".$max_manual.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_2 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE MAX', {$ref_weight}, ".$auto_max.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_3 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 3', {$ref_weight}, ".$auto_3.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_4 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 2', {$ref_weight}, ".$auto_2.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
$result_5 = removeDouble("('{$aircraft_type}', '{$NNC}', {$flaps}, '{$RWY}', 'AUTOBRAKE 1', {$ref_weight}, ".$auto_1.", {$SPD_BRKS_MAN}, {$SPD_BRKS_AUT}),");
//$result_5 = "";
echo $result_1."<br>".$result_2."<br>".$result_3."<br>".$result_4."<br>".$result_5."<br>";
function convert($str){
$str = str_replace(" ", ", ", $str);
$str = str_replace("/", ", ", $str);
return $str;
}
function removeDouble($str){
return str_replace(", ,", ",", $str);
}
function convertToMeter($value){
return round($value * 0.3048, 0, PHP_ROUND_HALF_UP);
}
function convertLineToMeter($line, $RWY, $UNFACTORED){
$items = explode(", ", $line);
$newline = "";
foreach ($items as $item){
$newValue = convertToMeter($item);
if ($UNFACTORED==1 && ($RWY=="GOOD" || $RWY == "MEDIUM" || $RWY == "POOR")){
$newValue = round($newValue * 1.15, 0, PHP_ROUND_HALF_UP);
}
$newline .= $newValue . ", ";
}
return $newline;
}
?>