Added more flight phases from ADREP

This commit is contained in:
Nabeel Shahzad 2018-04-16 09:33:45 -05:00
parent 63c5d69e10
commit 2319a8c9f4
2 changed files with 69 additions and 46 deletions

View File

@ -6,42 +6,59 @@ use App\Interfaces\Enum;
/** /**
* Tied to the ACARS statuses/states. * Tied to the ACARS statuses/states.
* Corresponds to values from AIDX * Corresponds to values from AIDX and ICAO ADREP
* https://www.skybrary.aero/index.php/Flight_Phase_Taxonomy
* @package App\Models\Enums * @package App\Models\Enums
*/ */
class PirepStatus extends Enum class PirepStatus extends Enum
{ {
public const INITIATED = 'INI'; public const INITIATED = 'INI';
public const SCHEDULED = 'SCH'; public const SCHEDULED = 'SCH';
public const BOARDING = 'BST'; public const BOARDING = 'BST';
public const RDY_START = 'RDT'; public const RDY_START = 'RDT';
public const DEPARTED = 'OFB'; // Off block public const PUSHBACK_TOW = 'PBT';
public const RDY_DEICE = 'DIR'; public const DEPARTED = 'OFB'; // Off block
public const STRT_DEICE = 'DIC'; public const RDY_DEICE = 'DIR';
public const GRND_RTRN = 'GRT'; public const STRT_DEICE = 'DIC';
public const AIRBORNE = 'TKO'; public const GRND_RTRN = 'GRT'; // Ground return
public const DIVERTED = 'DV'; public const TAXI = 'TXI'; // Taxi
public const APPROACH = 'TEN'; public const TAKEOFF = 'TOF';
public const ON_FINAL = 'FIN'; public const INIT_CLIM = 'ICL';
public const LANDED = 'LAN'; public const AIRBORNE = 'TKO';
public const ARRIVED = 'ONB'; // On block public const ENROUTE = 'ENR';
public const CANCELLED = 'DX'; public const DIVERTED = 'DV';
public const APPROACH = 'TEN';
public const APPROACH_ICAO = 'APR';
public const ON_FINAL = 'FIN';
public const LANDING = 'LDG';
public const LANDED = 'LAN';
public const ARRIVED = 'ONB'; // On block
public const CANCELLED = 'DX';
public const EMERG_DECENT = 'EMG';
protected static $labels = [ protected static $labels = [
PirepStatus::INITIATED => 'system.pireps.status.initialized', PirepStatus::INITIATED => 'system.pireps.status.initialized',
PirepStatus::SCHEDULED => 'system.pireps.status.scheduled', PirepStatus::SCHEDULED => 'system.pireps.status.scheduled',
PirepStatus::BOARDING => 'system.pireps.status.boarding', PirepStatus::BOARDING => 'system.pireps.status.boarding',
PirepStatus::RDY_START => 'system.pireps.status.ready_start', PirepStatus::RDY_START => 'system.pireps.status.ready_start',
PirepStatus::DEPARTED => 'system.pireps.status.departed', PirepStatus::PUSHBACK_TOW => 'system.pireps.status.push_tow',
PirepStatus::RDY_DEICE => 'system.pireps.status.ready_deice', PirepStatus::DEPARTED => 'system.pireps.status.departed',
PirepStatus::STRT_DEICE => 'system.pireps.status.deicing', PirepStatus::RDY_DEICE => 'system.pireps.status.ready_deice',
PirepStatus::GRND_RTRN => 'system.pireps.status.ground_ret', PirepStatus::STRT_DEICE => 'system.pireps.status.deicing',
PirepStatus::AIRBORNE => 'system.pireps.status.enroute', PirepStatus::GRND_RTRN => 'system.pireps.status.ground_ret',
PirepStatus::DIVERTED => 'system.pireps.status.diverted', PirepStatus::TAXI => 'system.pireps.status.taxi',
PirepStatus::APPROACH => 'system.pireps.status.approach', PirepStatus::TAKEOFF => 'system.pireps.status.takeoff',
PirepStatus::ON_FINAL => 'system.pireps.status.final_appr', PirepStatus::INIT_CLIM => 'system.pireps.status.initial_clb',
PirepStatus::LANDED => 'system.pireps.status.landed', PirepStatus::AIRBORNE => 'system.pireps.status.enroute',
PirepStatus::ARRIVED => 'system.pireps.status.arrived', PirepStatus::ENROUTE => 'system.pireps.status.enroute',
PirepStatus::CANCELLED => 'system.pireps.status.cancelled', PirepStatus::DIVERTED => 'system.pireps.status.diverted',
PirepStatus::APPROACH => 'system.pireps.status.approach',
PirepStatus::APPROACH_ICAO => 'system.pireps.status.approach',
PirepStatus::ON_FINAL => 'system.pireps.status.final_appr',
PirepStatus::LANDING => 'system.pireps.status.landing',
PirepStatus::LANDED => 'system.pireps.status.landed',
PirepStatus::ARRIVED => 'system.pireps.status.arrived',
PirepStatus::CANCELLED => 'system.pireps.status.cancelled',
PirepStatus::EMERG_DECENT => 'system.pireps.status.emerg_decent',
]; ];
} }

View File

@ -70,21 +70,27 @@ return [
'draft' => 'Draft', 'draft' => 'Draft',
], ],
'status' => [ 'status' => [
'initialized' => 'Initiated', 'initialized' => 'Initiated',
'scheduled' => 'Scheduled', 'scheduled' => 'Scheduled',
'boarding' => 'Boarding', 'boarding' => 'Boarding',
'ready_start' => 'Ready for start', 'ready_start' => 'Ready for start',
'departed' => 'Departed', 'push_tow' => 'Pushback/towing',
'ready_deice' => 'Ready for de-icing', 'departed' => 'Departed',
'deicing' => 'De-icing in progress', 'ready_deice' => 'Ready for de-icing',
'ground_ret' => 'Ground return', 'deicing' => 'De-icing in progress',
'enroute' => 'Enroute', 'ground_ret' => 'Ground return',
'diverted' => 'Diverted', 'taxi' => 'Taxi',
'approach' => 'Approach', 'takeoff' => 'Takeoff',
'final_appr' => 'Final approach', 'initial_clb' => 'Initial Climb',
'landed' => 'Landed', 'enroute' => 'Enroute',
'arrived' => 'Arrived', 'diverted' => 'Diverted',
'cancelled' => 'Cancelled', 'approach' => 'Approach',
'final_appr' => 'Final approach',
'landing' => 'Landing',
'landed' => 'Landed',
'arrived' => 'Arrived',
'cancelled' => 'Cancelled',
'emerg_decent' => 'Emergency decent',
] ]
], ],