key = $key; $this->chart = $chart; } function a() { a($this->chart, $this->key); } } class FromDestBlock { public $chock = null; public $ad = null; public $bay = null; public $taxi = null; public $rwy = null; public $proc = null; public $metar = null; public $atis = null; public function __construct($chock, $ad, $bay, $taxi, $rwy, $proc, $metar, $atis) { $this->chock = $chock; $this->ad = $ad; $this->bay = $bay; $this->taxi = $taxi; $this->rwy = $rwy; $this->proc = $proc; $this->metar = $metar; $this->atis = $atis; } public static function parse($row, $key_chock, $key_prefix) { return new FromDestBlock( $row[$key_chock], new Charted($row[$key_prefix . 'ad'], $row[$key_prefix . 'ad_chart']), new Charted($row[$key_prefix . 'bay'], $row[$key_prefix . 'bay_chart']), new Charted($row[$key_prefix . 'taxi'], $row[$key_prefix . 'taxi_chart']), $row[$key_prefix . 'rwy'], new Charted($row[$key_prefix . 'proc'], $row[$key_prefix . 'proc_chart']), $row[$key_prefix . 'metar'], $row[$key_prefix . 'atis'], ); } function p_ad() { w(''); $this->ad->a(); w(' '); $this->bay->a(); w('
'); a(null, $this->rwy); w(' '); $this->proc->a(); w('
'); w('Chock: ' . (is_null($this->chock) ? '?' : (strval($this->chock) . 'Z'))); w(''); } function p_taxi() { w(''); if (is_null($this->taxi->key)) { w('?'); } else { w('
Taxi'); $this->taxi->a(); w('
'); } w(''); } function p_weather() { w(''); if (is_null($this->metar)) { w('METAR ?'); } else { w('
METAR' . $this->metar . '
'); } if (is_null($this->atis)) { if (is_null($this->metar)) { w('
'); } w('ATIS ?'); } else { w('
ATIS' . $this->atis . '
'); } w(''); } function p() { $this->p_ad(); $this->p_taxi(); $this->p_weather(); } } class Aircraft { public $type = null; public $reg = null; public $link = null; public function __construct($type, $reg, $link) { $this->type = $type; $this->reg = $reg; $this->link = candidate($link, 'https://www.flightradar24.com/data/aircraft/' . strtolower($reg)); } public static function parse($row) { return new Aircraft($row['aircraft'], $row['registration'], $row['aircraft_link'] ); } function p() { w(''); w($this->type . '
'); a($this->link, $this->reg); w(''); } } class Flight { public $date = null; // Flight public $airline = null; public $flight_no = null; public $fr24_link = null; public $fa_link = null; // Aircraft public $aircraft = null; // From public $clearance = null; public $from = null; // Dest public $dest = null; // Seat public $cabin = null; public $seat = null; public $seat_type = null; public $embark = null; public $disembark = null; // Enroute public $duration = null; public $distance = null; public $route = null; public $crz_alt = null; public $crz_speed = null; // Performance public $takeoff_weight = null; public $pax = null; public $payload = null; public $fuel = null; public $fuel_trip = null; public $v1 = null; public $vr = null; public $v2 = null; public $vref = null; // MISC public $notes = null; } class DB extends SQLite3 { private const STMT_SEL_ALL = " select datetime, airline, flight_no, fr24_link, fa_link, aircraft, registration, aircraft_link, from_ad, from_ad_chart, from_atis, from_metar, off_chock, from_bay, from_bay_chart, from_taxi, from_taxi_chart, from_rwy, from_proc, from_proc_chart, dest_ad, dest_ad_chart, dest_atis, dest_metar, on_chock, dest_bay, dest_bay_chart, dest_taxi, dest_taxi_chart, dest_rwy, dest_proc, dest_proc_chart, cabin, seat, seat_type, embark, disembark, duration, distance, route, clearance, crz_alt, crz_speed, takeoff_weight, pax, payload, fuel, fuel_trip, v1, vr, v2, vref, notes from flights;"; private $stmt_sel_all; function __construct() { $this->open('./flights.sqlite', SQLITE3_OPEN_READONLY); $this->stmt_sel_all = $this->prepare(self::STMT_SEL_ALL); } function map($row) { $r = new Flight(); $r->date = $row['datetime']; $r->airline = $row['airline']; $r->flight_no = $row['flight_no']; $r->fr24_link = $row['fr24_link']; $r->fa_link = $row['fa_link']; $r->aircraft = Aircraft::parse($row); $r->clearance = $row['clearance']; $r->from = FromDestBlock::parse($row, 'off_chock', 'from_'); $r->dest = FromDestBlock::parse($row, 'on_chock', 'dest_'); $r->cabin = $row['cabin']; $r->seat = $row['seat']; switch ($row['seat_type']) { case "WINDOW": $r->seat_type = SeatType::Window; break; case "MIDDLE": $r->seat_type = SeatType::Middle; break; case "AISLE": $r->seat_type = SeatType::Aisle; break; default: $r->seat_type = SeatType::Other; break; } switch ($row['embark']) { case "BRIDGE": $r->embark = EmbarkType::Bridge; break; case "STAIRS": $r->embark = EmbarkType::Stairs; break; default: $r->embark = EmbarkType::Other; break; } switch ($row['disembark']) { case "BRIDGE": $r->disembark = EmbarkType::Bridge; break; case "STAIRS": $r->disembark = EmbarkType::Stairs; break; default: $r->disembark = EmbarkType::Other; break; } $r->duration = $row['duration']; $r->distance = $row['distance']; $r->route = $row['route']; $r->crz_alt = $row['crz_alt']; $r->crz_speed = $row['crz_speed']; $r->takeoff_weight = $row['takeoff_weight']; $r->pax = $row['pax']; $r->payload = $row['payload']; $r->fuel = $row['fuel']; $r->fuel_trip = $row['fuel_trip']; $r->v1 = $row['v1']; $r->vr = $row['vr']; $r->v2 = $row['v2']; $r->vref = $row['vref']; $r->notes = $row['notes']; return $r; } function getAll() { $res = $this->stmt_sel_all->execute(); $ra = array(); while ($r = $res->fetchArray()) { $d = $this->map($r); array_push($ra, $d); } $res->finalize(); return $ra; } } $db = new DB(); ?> Flights

Flights

This web page lists Yuuta's flights.

*/ function w($text) { echo "\t" . $text . "\n"; } function a($link, $text) { if (is_null($link)) { if (is_null($text)) { w("?"); } else { w($text); } } else { if (is_null($text)) { w('?'); } else { w('' . $text . ''); } } } function candidate(...$c) { foreach ($c as &$i) { if (!is_null($i)) { return $i; } } } function p_flight($data) { w(''); } function p_embark($data) { w(''); } function p_seat($data) { w(''); } function p_enr_distance($data) { w(''); } function p_enr_route($data) { w(''); } function p_dest_ad($data) { w(''); w(''); } function p_dest_taxi($data) { w(''); } function p_dest_weather($data) { w(''); } function p_perf_alt($data) { w(''); } function p_perf_weight($data) { w(''); } function p_perf_fuel($data) { w(''); } function p_perf_speed($data) { w(''); } function p($data) { w(''); p_flight($data); $data->aircraft->p(); p_embark($data); p_seat($data); $data->from->p(); p_enr_distance($data); p_enr_route($data); $data->dest->p(); p_perf_alt($data); p_perf_weight($data); p_perf_fuel($data); p_perf_speed($data); w(''); } foreach ($db->getAll() as &$data) { p($data); } ?>
Flight Seat From Enroute Dest Performance
Flight Aircraft Embark Seat Aerodrome Taxi Weather Distance Route Aerodrome Taxi Weather Crz Alt Weight Fuel / Trip Speed
20240510L
ACA63
B77W
C-FIUR
Bridge
Bridge
Class Y
31A
Window
CYVR bay 52
RWY 26L VIA YVR2
Off chock: ?
METAR: METAR CYVR 102200Z 29006KT 20SM SCT220 20/13 A3008 RMK CI4 SLP187 DENSITY ALT 500FT=
ATIS: ?
10:23
4804NM
UQQ YZT KATCH B757 HMPTN B757 NULUK R220 NANDY R220 NODAN R220 NANAC R220 IXE Y88 TEPEX Y16 SAPRA Y685 GUKDO RKSI bay ?
RWY 15R VIA GUKDO2H
On chock: ?
METAR: METAR RKSI 110830Z 21017KT 4000 RA SCT004 BKN025 OVC070 15/15 Q1008 NOSIG=
ATIS: ?
FL320 Takeoff Weight: 311700kg
PAX: 394
Payload: ?
Total fuel: 99800kg
Trip fuel: 85300kg
V1: 164kt
Vr: 168kt
V2
173kt
Vref: ?
'); w($data->date . 'L
'); if (is_null($data->airline) || is_null($data->flight_no)) { w('?'); } else { $flight_str = $data->airline . strval($data->flight_no); a('https://www.flightaware.com/live/flight/' . $flight_str, $flight_str); } w('
'); a($data->fr24_link, "FR24"); w(' '); a($data->fa_link, "FA"); w('
'); a(null, $data->embark->value); w('
'); a(null, $data->disembark->value); w('
'); w('Class '); a(null, $data->cabin); w('
'); a(null, $data->seat); w('
'); a(null, $data->seat_type->value); w('
'); w('
'); if (is_null($data->duration)) { w('Duration ?'); } else { w(strval(intdiv($data->duration, 60)) . ':' . strval($data->duration % 60)); } w('
'); if (is_null($data->distance)) { w('Distance ?'); } else { w(strval($data->distance) . 'NM'); } w('
'); if (is_null($data->route)) { w('Route ?'); } else { w('
Route' . $data->route . '
'); } if (is_null($data->clearance)) { if (is_null($data->route)) { w('
'); } w('Clearance ?'); } else { w('
Clearance' . $data->clearance . '
'); } w('
'); $data->dest_ad->a(); w(' '); $data->dest_bay->a(); w('
'); a(null, $data->dest_rwy); w(' '); $data->dest_proc->a(); w('
'); w('On: ' . (is_null($data->off_chock) ? '?' : (strval($data->off_chock) . 'Z')) . '
'); if (is_null($data->dest_taxi->key)) { w('?'); } else { w('
Taxi'); $data->dest_taxi->a(); w('
'); } w('
'); if (is_null($data->dest_metar)) { w('METAR ?'); } else { w('
METAR' . $data->dest_metar . '
'); } if (is_null($data->dest_atis)) { if (is_null($data->dest_metar)) { w('
'); } w('ATIS ?'); } else { w('
ATIS' . $data->dest_atis . '
'); } w('
'); a(null, $data->crz_alt); w(''); w('Takeoff: ' . (is_null($data->takeoff_weight) ? '?' : strval($data->takeoff_weight) . 'T') . '
'); w('PAX: ' . (is_null($data->pax) ? '?' : strval($data->pax)) . '
'); w('Payload: ' . (is_null($data->payload) ? '?' : strval($data->payload) . 'T')); w('
'); w((is_null($data->fuel) ? '?' : strval($data->fuel) . 'T') . '
'); w('' . (is_null($data->fuel_trip) ? '?' : strval($data->fuel_trip) . 'T')); w('
'); w('V1: ' . (is_null($data->v1) ? '?' : strval($data->v1) . 'kt') . '
'); w('Vr: ' . (is_null($data->vr) ? '?' : strval($data->vr) . 'kt') . '
'); w('V2: ' . (is_null($data->v2) ? '?' : strval($data->v2) . 'kt') . '
'); w('Vref: ' . (is_null($data->vref) ? '?' : strval($data->vref) . 'kt')); w('

More Actions

Yuuta 2024 - 2025: All rights reserved.