From 9ac0d3985125b760e5271202852876e07dd24c4f Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Sat, 14 Sep 2019 17:20:25 +0100 Subject: [PATCH] Airac 201910 (#48) * Update EGAA Positions Fix top-down order. Add AA INT as top down for EGAC. * Change EGCC Ownership To MAN_W The documents lied. * Add Wallasey Sector Top-down for CC and GP over MAN_W * Add REDFA and SABER splits for TC East * Update Scottish TMA Frequencies * Add EGPC and EGPA, Add EGPB APP To Top Down * Add Scottish North Sector * Add Scottish South Sector * Add Scottish Central Sector No top down. * Update Gatwick Non-RNAV Departures Update the identifiers. * Update Cambridge Squawk Ranges * Remove Duplicate EGPB Key --- ...09_14_094017_update_gatwick_departures.php | 61 ++++++++++++++++ ...4_094914_update_cambridge_squawk_range.php | 70 +++++++++++++++++++ .../dependencies/airfield-ownership.json | 30 +++++++- .../dependencies/controller-positions.json | 56 ++++++++++++--- 4 files changed, 205 insertions(+), 12 deletions(-) create mode 100644 database/migrations/2019_09_14_094017_update_gatwick_departures.php create mode 100644 database/migrations/2019_09_14_094914_update_cambridge_squawk_range.php diff --git a/database/migrations/2019_09_14_094017_update_gatwick_departures.php b/database/migrations/2019_09_14_094017_update_gatwick_departures.php new file mode 100644 index 000000000..8d261a634 --- /dev/null +++ b/database/migrations/2019_09_14_094017_update_gatwick_departures.php @@ -0,0 +1,61 @@ +firstOrFail()->id; + + $sids = [ + 'LAM5M' => 'LAM6M', + 'LAM5V' => 'LAM6V', + 'CLN9M' => 'CLN1M', + 'CLN9V' => 'CLN1V', + 'DVR9M' => 'DVR1M', + 'DVR9V' => 'DVR1V', + ]; + + foreach ($sids as $old => $new) { + $this->updateSid($gatwick, $old, $new); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $gatwick = Airfield::where('code', 'EGKK')->firstOrFail()->id; + + $sids = [ + 'LAM6M' => 'LAM5M', + 'LAM6V' => 'LAM5V', + 'CLN1M' => 'CLN9M', + 'CLN1V' => 'CLN9V', + 'DVR1M' => 'DVR9M', + 'DVR1V' => 'DVR9V', + ]; + + foreach ($sids as $old => $new) { + $this->updateSid($gatwick, $old, $new); + } + } + + private function updateSid(int $gatwickAirfieldId, string $oldIdentifier, string $newIdentifier) : void + { + Sid::where('airfield_id', $gatwickAirfieldId) + ->where('identifier', $oldIdentifier) + ->update(['identifier' => $newIdentifier]); + } +} diff --git a/database/migrations/2019_09_14_094914_update_cambridge_squawk_range.php b/database/migrations/2019_09_14_094914_update_cambridge_squawk_range.php new file mode 100644 index 000000000..617b12aba --- /dev/null +++ b/database/migrations/2019_09_14_094914_update_cambridge_squawk_range.php @@ -0,0 +1,70 @@ +firstOrFail(); + + // Delete the old ranges + $cambridge->ranges->each(function (Range $range) { + $range->delete(); + }); + + // Add new ranges + + Range::create( + [ + 'squawk_range_owner_id' => $cambridge->rangeOwner->id, + 'start' => '6160', + 'stop' => '6175', + 'rules' => 'A', + 'allow_duplicate' => false, + ] + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $cambridge = SquawkUnit::where('unit', 'EGSC')->firstOrFail(); + + // Delete the old ranges + $cambridge->ranges->each(function (Range $range) { + $range->delete(); + }); + + // Add new ranges + Range::insert( + [ + [ + 'squawk_range_owner_id' => $cambridge->rangeOwner->id, + 'start' => '6160', + 'stop' => '6176', + 'rules' => 'A', + 'allow_duplicate' => false, + ], + [ + 'squawk_range_owner_id' => $cambridge->rangeOwner->id, + 'start' => '6171', + 'stop' => '6177', + 'rules' => 'A', + 'allow_duplicate' => false, + ], + ] + ); + } +} diff --git a/storage/app/public/dependencies/airfield-ownership.json b/storage/app/public/dependencies/airfield-ownership.json index d9a99fd49..1043829c5 100644 --- a/storage/app/public/dependencies/airfield-ownership.json +++ b/storage/app/public/dependencies/airfield-ownership.json @@ -2,8 +2,8 @@ "EGAA": [ "EGAA_GND", "EGAA_TWR", - "EGAA_R_APP", "EGAA_APP", + "EGAA_R_APP", "STC_A_CTR", "SCO_R_CTR", "SCO_W_CTR", @@ -13,6 +13,7 @@ "EGAC": [ "EGAC_TWR", "EGAC_APP", + "EGAA_R_APP", "STC_A_CTR", "SCO_R_CTR", "SCO_W_CTR", @@ -57,7 +58,8 @@ "EGCC_F_APP", "EGCC_S_APP", "EGCC_N_APP", - "MAN_E_CTR", + "MAN_WL_CTR", + "MAN_W_CTR", "MAN_CTR", "LON_N_CTR", "LON_CTR" @@ -333,8 +335,24 @@ "LON_SC_CTR", "LON_CTR" ], + "EGPA": [ + "EGPA_TWR", + "EGPA_APP", + "SCO_N_CTR", + "SCO_E_CTR", + "SCO_CTR" + ], "EGPB": [ "EGPB_TWR", + "EGPB_APP", + "SCO_N_CTR", + "SCO_E_CTR", + "SCO_CTR" + ], + "EGPC": [ + "EGPC_TWR", + "EGPC_APP", + "SCO_N_CTR", "SCO_E_CTR", "SCO_CTR" ], @@ -343,6 +361,7 @@ "EGPD_TWR", "EGPD_APP", "EGPD_F_APP", + "SCO_S_CTR", "SCO_E_CTR", "SCO_CTR" ], @@ -350,6 +369,7 @@ "EGPE_TWR", "EGPE_R_APP", "EGPE_APP", + "SCO_N_CTR", "SCO_E_CTR", "SCO_CTR" ], @@ -362,6 +382,7 @@ "STC_CTR", "SCO_D_CTR", "SCO_WD_CTR", + "SCO_S_CTR", "SCO_CTR" ], "EGPH": [ @@ -372,6 +393,7 @@ "STC_CTR", "SCO_D_CTR", "SCO_WD_CTR", + "SCO_S_CTR", "SCO_CTR" ], "EGPK": [ @@ -383,23 +405,27 @@ "STC_CTR", "SCO_D_CTR", "SCO_WD_CTR", + "SCO_S_CTR", "SCO_CTR" ], "EGPM": [ "EGPM_TWR", "EGPM_APP", + "SCO_N_CTR", "SCO_E_CTR", "SCO_CTR" ], "EGPN": [ "EGPN_TWR", "EGPN_APP", + "SCO_S_CTR", "SCO_E_CTR", "SCO_CTR" ], "EGPO": [ "EGPO_TWR", "EGPO_APP", + "SCO_N_CTR", "SCO_E_CTR", "SCO_CTR" ], diff --git a/storage/app/public/dependencies/controller-positions.json b/storage/app/public/dependencies/controller-positions.json index 70f84984c..1eebdac21 100644 --- a/storage/app/public/dependencies/controller-positions.json +++ b/storage/app/public/dependencies/controller-positions.json @@ -2,8 +2,7 @@ "EGAA_APP": { "frequency": 120.9, "top-down": [ - "EGAA", - "EGAC" + "EGAA" ] }, "EGAA_GND": { @@ -15,7 +14,8 @@ "EGAA_R_APP": { "frequency": 128.5, "top-down": [ - "EGAA" + "EGAA", + "EGAC" ] }, "EGAA_TWR": { @@ -774,10 +774,6 @@ "frequency": 119.7, "top-down": [] }, - "EGPC_ATIS": { - "frequency": 119.7, - "top-down": [] - }, "EGPC_TWR": { "frequency": 119.7, "top-down": [] @@ -1336,6 +1332,14 @@ "frequency": 129.6, "top-down": [] }, + "LTC_ER_CTR": { + "frequency": 133.52, + "top-down": [] + }, + "LTC_ES_CTR": { + "frequency": 135.42, + "top-down": [] + }, "LTC_NE_CTR": { "frequency": 118.82, "top-down": [] @@ -1392,16 +1396,23 @@ "MAN_W_CTR": { "frequency": 128.05, "top-down": [ + "EGCC", "EGGP", "EGNR", "EGNH", "EGNS" ] }, + "MAN_WL_CTR": { + "frequency": 125.95, + "top-down": [ + "EGCC", + "EGGP" + ] + }, "MAN_E_CTR": { "frequency": 133.8, "top-down": [ - "EGCC", "EGNM", "EGNJ", "EGNC", @@ -1440,6 +1451,10 @@ "EGPM" ] }, + "SCO_C_CTR": { + "frequency": 127.27, + "top-down": [] + }, "SCO_D_CTR": { "frequency": 135.85, "top-down": [ @@ -1458,6 +1473,17 @@ "EGPM" ] }, + "SCO_N_CTR": { + "frequency": 129.220, + "top-down": [ + "EGPA", + "EGPB", + "EGPC", + "EGPE", + "EGPM", + "EGPO" + ] + }, "SCO_R_CTR": { "frequency": 129.1, "top-down": [ @@ -1466,6 +1492,16 @@ "EGAE" ] }, + "SCO_S_CTR": { + "frequency": 134.77, + "top-down": [ + "EGPD", + "EGPF", + "EGPH", + "EGPK", + "EGPN" + ] + }, "SCO_WD_CTR": { "frequency": 133.2, "top-down": [ @@ -1494,7 +1530,7 @@ ] }, "STC_CTR": { - "frequency": 124.82, + "frequency": 126.3, "top-down": [ "EGNC", "EGPF", @@ -1510,7 +1546,7 @@ ] }, "STC_W_CTR": { - "frequency": 121.37, + "frequency": 124.82, "top-down": [ "EGPF", "EGPK"