Skip to content

Commit

Permalink
Airac 201910 (#48)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AndyTWF authored Sep 14, 2019
1 parent c97209a commit 9ac0d39
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

use App\Models\Airfield;
use App\Models\Sid;
use Illuminate\Database\Migrations\Migration;

class UpdateGatwickDepartures extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$gatwick = Airfield::where('code', 'EGKK')->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]);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

use App\Models\Squawks\Range;
use App\Models\Squawks\SquawkUnit;
use Illuminate\Database\Migrations\Migration;

class UpdateCambridgeSquawkRange extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$cambridge = SquawkUnit::where('unit', 'EGSC')->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,
],
]
);
}
}
30 changes: 28 additions & 2 deletions storage/app/public/dependencies/airfield-ownership.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -13,6 +13,7 @@
"EGAC": [
"EGAC_TWR",
"EGAC_APP",
"EGAA_R_APP",
"STC_A_CTR",
"SCO_R_CTR",
"SCO_W_CTR",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
],
Expand All @@ -343,13 +361,15 @@
"EGPD_TWR",
"EGPD_APP",
"EGPD_F_APP",
"SCO_S_CTR",
"SCO_E_CTR",
"SCO_CTR"
],
"EGPE": [
"EGPE_TWR",
"EGPE_R_APP",
"EGPE_APP",
"SCO_N_CTR",
"SCO_E_CTR",
"SCO_CTR"
],
Expand All @@ -362,6 +382,7 @@
"STC_CTR",
"SCO_D_CTR",
"SCO_WD_CTR",
"SCO_S_CTR",
"SCO_CTR"
],
"EGPH": [
Expand All @@ -372,6 +393,7 @@
"STC_CTR",
"SCO_D_CTR",
"SCO_WD_CTR",
"SCO_S_CTR",
"SCO_CTR"
],
"EGPK": [
Expand All @@ -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"
],
Expand Down
56 changes: 46 additions & 10 deletions storage/app/public/dependencies/controller-positions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"EGAA_APP": {
"frequency": 120.9,
"top-down": [
"EGAA",
"EGAC"
"EGAA"
]
},
"EGAA_GND": {
Expand All @@ -15,7 +14,8 @@
"EGAA_R_APP": {
"frequency": 128.5,
"top-down": [
"EGAA"
"EGAA",
"EGAC"
]
},
"EGAA_TWR": {
Expand Down Expand Up @@ -774,10 +774,6 @@
"frequency": 119.7,
"top-down": []
},
"EGPC_ATIS": {
"frequency": 119.7,
"top-down": []
},
"EGPC_TWR": {
"frequency": 119.7,
"top-down": []
Expand Down Expand Up @@ -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": []
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1440,6 +1451,10 @@
"EGPM"
]
},
"SCO_C_CTR": {
"frequency": 127.27,
"top-down": []
},
"SCO_D_CTR": {
"frequency": 135.85,
"top-down": [
Expand All @@ -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": [
Expand All @@ -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": [
Expand Down Expand Up @@ -1494,7 +1530,7 @@
]
},
"STC_CTR": {
"frequency": 124.82,
"frequency": 126.3,
"top-down": [
"EGNC",
"EGPF",
Expand All @@ -1510,7 +1546,7 @@
]
},
"STC_W_CTR": {
"frequency": 121.37,
"frequency": 124.82,
"top-down": [
"EGPF",
"EGPK"
Expand Down

0 comments on commit 9ac0d39

Please sign in to comment.