From 12d00713601c767d0ecd62a6db3a123072b30ee5 Mon Sep 17 00:00:00 2001 From: Ryan Zink Date: Sun, 25 Aug 2024 20:54:08 -0700 Subject: [PATCH 01/10] Adds MESAT-1 linear transponder --- assets/json/satellite_data.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/json/satellite_data.json b/assets/json/satellite_data.json index 38d876eb..434a2600 100644 --- a/assets/json/satellite_data.json +++ b/assets/json/satellite_data.json @@ -327,6 +327,18 @@ ] } }, + "MESAT-1":{ + "Modes":{ + "V/U":[ + { + "Uplink_Mode":"LSB", + "Uplink_Freq":"145925000", + "Downlink_Mode":"USB", + "Downlink_Freq":"435825000" + } + ] + } + }, "MO-112":{ "Modes":{ "V/U":[ From 522ab44cd5512dedf41364c385db522014534b04 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 8 Oct 2024 16:43:33 +0100 Subject: [PATCH 02/10] [QRZ] Mismatch of login data when session expired --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 02dae33f..afbed063 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4599,7 +4599,7 @@ class Logbook_model extends CI_Model // if we got nothing, it's probably because our session key is invalid, try again if (($callbook['callsign'] ?? '') == '') { - $qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password')); + $qrz_session_key = $this->qrz->session($this->session->userdata('callbook_username'), $decrypted_password); $this->session->set_userdata('qrz_session_key', $qrz_session_key); $callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname); // if we still got nothing, and it's a compound callsign, then try a search for the base call From 5dbe8b238c819812e5adf15c6a09d689e060b0c2 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 8 Oct 2024 16:46:46 +0100 Subject: [PATCH 03/10] HamQTH - Correctly handle session key resets --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index afbed063..1eb99b36 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4628,7 +4628,7 @@ class Logbook_model extends CI_Model // If HamQTH session has expired, start a new session and retry the search. if ($callbook['error'] == "Session does not exist or expired") { - $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password')); + $hamqth_session_key = $this->hamqth->session($this->session->userdata('callbook_username'), $decrypted_password); $this->session->set_userdata('hamqth_session_key', $hamqth_session_key); $callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key')); } From 050de7730f4f0d5a4164a8d8d36ec0d8c9bfc22e Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 30 Oct 2024 16:40:20 +0000 Subject: [PATCH 04/10] Fix workflow for ui testing --- .github/workflows/cypress-tests.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index 85d00363..ec991695 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -5,10 +5,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Cache Node modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: | + npm- + + - name: Install dependencies + run: npm install - name: Cache Cypress - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache/Cypress key: cypress-${{ hashFiles('package-lock.json') }} @@ -19,7 +30,7 @@ jobs: run: npm install cypress - name: Cache .env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .env key: .env-${{ hashFiles('.env.sample') }} @@ -36,10 +47,15 @@ jobs: run: docker-compose up -d - name: Wait for services to start - run: sleep 5 + run: | + for i in `seq 1 30`; do + curl -s http://localhost:80 > /dev/null && break + echo "Waiting for services to start..." + sleep 5 + done - name: Populate dxcc_entities table run: curl "http://localhost/index.php/update/dxcc" - name: Run Cypress tests - run: npx cypress run + run: npx cypress run \ No newline at end of file From fb90a571045af8b226e60570d9e76e7f7432fe43 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 30 Oct 2024 16:43:16 +0000 Subject: [PATCH 05/10] Update cypress-tests.yml --- .github/workflows/cypress-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index ec991695..157f54cd 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -1,4 +1,3 @@ -name: Cypress Tests on: [pull_request, workflow_dispatch] jobs: cypress-e2e-tests: @@ -43,6 +42,11 @@ jobs: cp .env.sample .env fi + - name: Install Docker Compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Build Docker services run: docker-compose up -d From 0292ba56f793d6981b41f2174cd0b449026c48b0 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 21 May 2025 16:47:57 +0100 Subject: [PATCH 06/10] If Clublog returns 403 disable upload --- application/controllers/Clublog.php | 8 ++++++++ application/models/Clublog_model.php | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index 8472b5da..74801237 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -107,6 +107,14 @@ class Clublog extends CI_Controller { } else { echo "Error ".$response; log_message('error', 'Clublog upload for '.$station_row->station_callsign.' failed reason '.$response); + + // If Clublog responds with a 403 + if ($info['http_code'] == 403) { + $this->load->model('clublog_model'); + echo "Clublog API access denied for ".$station_row->station_callsign."
"; + log_message('error', 'Clublog API access denied for '.$station_row->station_callsign); + $this->clublog_model->reset_clublog_user_fields($station_row->user_id); + } } // Delete the ADIF file used for clublog diff --git a/application/models/Clublog_model.php b/application/models/Clublog_model.php index 009b5412..8aa157fe 100644 --- a/application/models/Clublog_model.php +++ b/application/models/Clublog_model.php @@ -17,6 +17,17 @@ class Clublog_model extends CI_Model { return $row = $query->row_array(); } + // function to reset clublog fields for the user in the auth table + function reset_clublog_user_fields($user_id) { + $data = array( + 'user_clublog_name' => null, + 'user_clublog_password' => null, + ); + + $this->db->where('user_id', $user_id); + $this->db->update($this->config->item('auth_table'), $data); + } + function mark_qsos_sent($station_id) { $data = array( 'COL_CLUBLOG_QSO_UPLOAD_DATE' => date('Y-m-d'), From bf43158f7e211cb2e4f8c65bfe9e159bfb9bc7be Mon Sep 17 00:00:00 2001 From: Rodrigo Freire Date: Thu, 10 Jul 2025 23:23:23 -0300 Subject: [PATCH 07/10] DXCC database: Fix Brazilian data There's a number of issues in Brazilian DXCC entities, namely: - Misspeled state names - Wrong time zone - Wrong ITU zone - Wrong callsign assignment plan This commit addresses these issues, while allowing for a full reversion of the old data, by using UPDATE statements, changing the database to a minimum and being as safe as possible. --- application/config/migration.php | 2 +- .../migrations/200_fix_brazil_dxcc_data.php | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 application/migrations/200_fix_brazil_dxcc_data.php diff --git a/application/config/migration.php b/application/config/migration.php index 2eb36735..39ced0cf 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 199; +$config['migration_version'] = 200; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/200_fix_brazil_dxcc_data.php b/application/migrations/200_fix_brazil_dxcc_data.php new file mode 100644 index 00000000..c8b25e77 --- /dev/null +++ b/application/migrations/200_fix_brazil_dxcc_data.php @@ -0,0 +1,68 @@ +db->query("UPDATE `dxcc_master` SET TimeZone = 3 WHERE CountryCode = 108 AND DXCCSort = 1;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PP1, PU1[A-I], ZV1[A-I], ZW1[A-I], ZX1[A-I], ZY1[A-I], ZZ1[A-I]', location = 'Espirito Santo ' WHERE CountryCode = 108 AND DXCCSort = 12;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PP2, PU2[F-H], Z[V-Z]2F, Z[V-Z]2G, Z[V-Z]2H', location = 'Goias ' WHERE CountryCode = 108 AND DXCCSort = 22;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PP5, PU5[A-L], ZV5[A-L], ZW5[A-L], ZX5[A-L], ZY5[A-L], ZZ5[A-L]', location = 'Santa Catarina ' WHERE CountryCode = 108 AND DXCCSort = 52;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PP6, PU6[A-I], ZV6[A-I], ZW6[A-I], ZX6[A-I], ZY6[A-I], ZZ6[A-I]', location = 'Sergipe ' WHERE CountryCode = 108 AND DXCCSort = 62;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PP7, PU7[A-D], Z[V-Z]7A, Z[V-Z]7B, Z[V-Z]7C, Z[V-Z]7D', location = 'Alagoas ' WHERE CountryCode = 108 AND DXCCSort = 72;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PP8, PU8[A-C], Z[V-Z]8A, Z[V-Z]8B, Z[V-Z]8C', location = 'Amazonas ' WHERE CountryCode = 108 AND DXCCSort = 82;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PQ2, PU2[I-J], Z[V-Z]2I, Z[V-Z]2J', location = 'Tocantins ' WHERE CountryCode = 108 AND DXCCSort = 23;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PQ8, PU8[G-I], Z[V-Z]8G, Z[V-Z]8H, Z[V-Z]8I', location = 'Amapa ' WHERE CountryCode = 108 AND DXCCSort = 83;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PR7, PU7[E-H], Z[V-Z]7E, Z[V-Z]7F, Z[V-Z]7G, Z[V-Z]7H', location = 'Paraiba ' WHERE CountryCode = 108 AND DXCCSort = 73;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PR8, PU8[M-O], Z[V-Z]8M, Z[V-Z]8N, Z[V-Z]8O', location = 'Maranhao ' WHERE CountryCode = 108 AND DXCCSort = 84;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PS7, PU7[I-L], Z[V-Z]7I, Z[V-Z]7J, Z[V-Z]7K, Z[V-Z]7L', location = 'Rio Grande do Norte ' WHERE CountryCode = 108 AND DXCCSort = 74;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PS8, PU8[P-S], Z[V-Z]8P, Z[V-Z]8Q, Z[V-Z]8R, Z[V-Z]8S', location = 'Piaui ' WHERE CountryCode = 108 AND DXCCSort = 85;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PT2, PU2[A-E], Z[V-Z]2A, Z[V-Z]2B, Z[V-Z]2C, Z[V-Z]2D, Z[V-Z]2E', location = 'Brasilia ' WHERE CountryCode = 108 AND DXCCSort = 24;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PT7, PU7[M-P], Z[V-Z]7M, Z[V-Z]7N, Z[V-Z]7O, Z[V-Z]7P', location = 'Ceara ' WHERE CountryCode = 108 AND DXCCSort = 75;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 5, ITUZone = 12, PrefixList = 'PT8, PU8[J-L], Z[V-Z]8J, Z[V-Z]8K, Z[V-Z]8L', location = 'Acre ' WHERE CountryCode = 108 AND DXCCSort = 86;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 12, PrefixList = 'PV8, PU8[T-V], Z[V-Z]8T, Z[V-Z]8U, Z[V-Z]8V', location = 'Roraima ' WHERE CountryCode = 108 AND DXCCSort = 87;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 12, PrefixList = 'PW8, PU8[D-F], Z[V-Z]8D, Z[V-Z]8E, Z[V-Z]8F', location = 'Rondonia ' WHERE CountryCode = 108 AND DXCCSort = 88;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PT9, PU9[A-N], Z[V-Z]9', location = 'Mato Grosso do Sul ' WHERE CountryCode = 108 AND DXCCSort = 92;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PY1, PU1[J-Y], Z[V-Z]1', location = 'Rio de Janeiro ' WHERE CountryCode = 108 AND DXCCSort = 11;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PY2, PU2[K-Y], Z[V-Z]2', location = 'Sao Paulo ' WHERE CountryCode = 108 AND DXCCSort = 21;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'P[P-Y]3, Z[V-Z]3', location = 'Rio Grande do Sul ' WHERE CountryCode = 108 AND DXCCSort = 31;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'P[P-Y]4, Z[V-Z]4', location = 'Minas Gerais ' WHERE CountryCode = 108 AND DXCCSort = 41;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PY5, PU5[M-Y], Z[V-Z]5', location = 'Parana ' WHERE CountryCode = 108 AND DXCCSort = 51;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PY6, PU6[J-Y], Z[V-Z]6', location = 'Bahia ' WHERE CountryCode = 108 AND DXCCSort = 61;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PY7, PU7[R-Y], Z[V-Z]7', location = 'Pernambuco ' WHERE CountryCode = 108 AND DXCCSort = 71;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PY8, PU8[W-Y], Z[V-Z]8', location = 'Para ' WHERE CountryCode = 108 AND DXCCSort = 81;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PY9, PU9[O-Y], ZV9[O-Z], ZW9[O-Z], ZX9[O-Z], ZY9[O-Z], ZZ9[O-Z]', location = 'Mato Grosso ' WHERE CountryCode = 108 AND DXCCSort = 91;"); + } + + public function down(){ + $this->db->query("DELETE FROM `dxcc_master` WHERE CountryCode = 108;"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',1,108,'P[P-Y], Z[V-Z]','Brazil','Brazil','SA','11',NULL,NULL,4.0,-15.8,-47.9167,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',22,108,'PP2, PU2[F-H], Z[V-Z]2F, Z[V-Z]2G, Z[V-Z]2H','Brazil','Goias ','SA','11','',NULL,5.0,-15.8,-50.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',12,108,'PP1, PU1[A-I], ZV1[A-I], ZW1[A-I], ZX1[A-I], ZY1[A-I], ZZ1[A-I]','Brazil','Esprito Santo ','SA','11','15',NULL,4.0,-20.0,-40.6,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',75,108,'PT7, PU7[M-P], Z[V-Z]7M, Z[V-Z]7N, Z[V-Z]7O, Z[V-Z]7P','Brazil','Ceara ','SA','11','15',NULL,4.0,-5.6,-37.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',52,108,'PP5, PU5[A-L], ZV5[A-L], ZW5[A-L], ZX5[A-L], ZY5[A-L], ZZ5[A-L]','Brazil','Santa Catarina ','SA','11','15',NULL,4.0,-27.0,-50.6,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',62,108,'PP6, PU6[A-I], ,ZV6[A-I], ZW6[A-I], ZX6[A-I], ZY6[A-I], ZZ6[A-I]','Brazil','Sergipe ','SA','11','13',NULL,4.0,-10.7,-37.3,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',72,108,'PP7, PU7[A-D], Z[V-Z]7A, Z[V-Z]7B, Z[V-Z]7C, Z[V-Z]7D','Brazil','Algonas ','SA','11','13',NULL,4.0,-9.8,-36.6,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',82,108,'PP8, PU8[A-C], Z[V-Z]8A, Z[V-Z]8B, Z[V-Z]8C','Brazil','Amazonas ','SA','11','',NULL,4.0,-3.9,-65.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',86,108,'PT8, PU8[J-L], Z[V-Z]8J, Z[V-Z]8K, Z[V-Z]8L','Brazil','Acre ','SA','11','12',NULL,4.0,-9.0,-70.3,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',11,108,'P[Q-Y]1, Z[V-Z]1','Brazil','Rio de Janeiro ','SA','11','15',NULL,4.0,-22.75,-43.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',21,108,'PR2,PS2,P[U-Y]2, Z[V-Z]2','Brazil','Sao Paulo ','SA','11','15',NULL,4.0,-22.6,-48.3,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',31,108,'P[P-Y]3, Z[V-Z]3','Brazil','Rio Grande do Sul ','SA','11','15',NULL,4.0,-29.8,-53.5,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',41,108,'P[P-Y]4, Z[V-Z]4','Brazil','Minas Gerias ','SA','11','',NULL,4.0,-18.8,-45.2,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',51,108,'P[Q-Y]5, Z[V-Z]5','Brazil','Parana ','SA','11','15',NULL,4.0,-24.8,-52.2,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',61,108,'P[Q-Y]6, Z[V-Z]6','Brazil','Bahia ','SA','11','',NULL,4.0,-12.2,-42.1,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',71,108,'PQ7, P[U-Y]7, Z[V-Z]7','Brazil','Pernambuco ','SA','11','13',NULL,4.0,-8.5,-37.7,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',81,108,'P[X-Y]8, PU8[W-Y], Z[V-Z]8','Brazil','Para ','SA','11','13',NULL,4.0,-3.3,-52.7,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',91,108,'P[P-S]9, P[U-Y]9, ZV9[O-Z], ZW9[O-Z], ZX9[O-Z], ZY9[O-Z], ZZ9[O-Z]','Brazil','Mato Grosso ','SA','11','',NULL,4.0,-13.3,-56.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',23,108,'PQ2, PU2[I-J], Z[V-Z]2I, Z[V-Z]2J','Brazil','Tocantins ','SA','11','13',NULL,4.0,-10.4,-48.4,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',84,108,'PR8, PU8[M-O], Z[V-Z]8M, Z[V-Z]8N ,Z[V-Z]8O','Brazil','Maranhao ','SA','11','15',NULL,4.0,-4.9,-45.2,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',24,108,'PT2, PU2[A-E], Z[V-Z]2A, Z[V-Z]2B, Z[V-Z]2C, Z[V-Z]2D, Z[V-Z]2E','Brazil','Brasilia ','SA','11','15',NULL,4.0,-15.9,-47.9,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',83,108,'PQ8, PU8[G-I], Z[V-Z]G ,Z[V-Z]8H, Z[V-Z]8I','Brazil','Amapa ','SA','11','13',NULL,4.0,1.62,-52.1,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',73,108,'PR7, PU7[E-H], Z[V-Z]7E, Z[V-Z]7F, Z[V-Z]7G, Z[V-Z]7H','Brazil','Paraiba ','SA','11','13',NULL,4.0,-7.1,-36.3,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',85,108,'PS8, PU8[P-S], Z[V-Z]8P, Z[V-Z]8Q, Z[V-Z]8R, Z[V-Z]8S','Brazil','Piaui ','SA','11','13',NULL,4.0,-7.4,-42.4,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',74,108,'PS7, PU7[I-L], Z[V-Z]7I, Z[V-Z]7J, Z[V-Z]7K, Z[V-Z]7L','Brazil','Rio Grande del Norte ','SA','11','12',NULL,4.0,-5.8,-36.7,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',87,108,'PV8, PU8[T-V], Z[V-Z]8T, Z[V-Z]8U, Z[V-Z]8]V','Brazil','Roraima ','SA','11','',NULL,4.0,2.0,-62.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',88,108,'PW8, PU8[D-F], Z[V-Z]8D, Z[V-Z]8E, Z[V-Z]8F','Brazil','Rondonia ','SA','11','12',NULL,4.0,-10.8,-63.0,NULL,NULL);"); + $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',92,108,'PT9, PU9[A-N], Z[V-Z]9','Brazil','Mato Grosso do Sul ','SA','11','15',NULL,4.0,-20.7,-55.0,NULL,NULL);"); + } +} From c7a21a355c1ae1c9c17a57f0373cf2cb745511a9 Mon Sep 17 00:00:00 2001 From: Rodrigo Freire Date: Thu, 10 Jul 2025 23:41:39 -0300 Subject: [PATCH 08/10] Brazilian DXCC fix: Fixes the class name --- application/migrations/200_fix_brazil_dxcc_data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/200_fix_brazil_dxcc_data.php b/application/migrations/200_fix_brazil_dxcc_data.php index c8b25e77..54aef3f2 100644 --- a/application/migrations/200_fix_brazil_dxcc_data.php +++ b/application/migrations/200_fix_brazil_dxcc_data.php @@ -1,6 +1,6 @@ Date: Thu, 10 Jul 2025 23:47:55 -0300 Subject: [PATCH 09/10] Brazilian DXCC data: Minor adjustements - Fixes a cosmethic ordering entry - Also adds comments giving references --- application/migrations/200_fix_brazil_dxcc_data.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/migrations/200_fix_brazil_dxcc_data.php b/application/migrations/200_fix_brazil_dxcc_data.php index 54aef3f2..d615914d 100644 --- a/application/migrations/200_fix_brazil_dxcc_data.php +++ b/application/migrations/200_fix_brazil_dxcc_data.php @@ -4,6 +4,8 @@ class Migration_fix_brazil_dxcc_data extends CI_Migration { public function up() { + // Fixes Brazilian DXCC data: Typos, ITU zone, + // Callsign assignment plan, time zone $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3 WHERE CountryCode = 108 AND DXCCSort = 1;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PP1, PU1[A-I], ZV1[A-I], ZW1[A-I], ZX1[A-I], ZY1[A-I], ZZ1[A-I]', location = 'Espirito Santo ' WHERE CountryCode = 108 AND DXCCSort = 12;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PP2, PU2[F-H], Z[V-Z]2F, Z[V-Z]2G, Z[V-Z]2H', location = 'Goias ' WHERE CountryCode = 108 AND DXCCSort = 22;"); @@ -20,9 +22,9 @@ class Migration_fix_brazil_dxcc_data extends CI_Migration { $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PT2, PU2[A-E], Z[V-Z]2A, Z[V-Z]2B, Z[V-Z]2C, Z[V-Z]2D, Z[V-Z]2E', location = 'Brasilia ' WHERE CountryCode = 108 AND DXCCSort = 24;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 13, PrefixList = 'PT7, PU7[M-P], Z[V-Z]7M, Z[V-Z]7N, Z[V-Z]7O, Z[V-Z]7P', location = 'Ceara ' WHERE CountryCode = 108 AND DXCCSort = 75;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 5, ITUZone = 12, PrefixList = 'PT8, PU8[J-L], Z[V-Z]8J, Z[V-Z]8K, Z[V-Z]8L', location = 'Acre ' WHERE CountryCode = 108 AND DXCCSort = 86;"); + $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PT9, PU9[A-N], Z[V-Z]9', location = 'Mato Grosso do Sul ' WHERE CountryCode = 108 AND DXCCSort = 92;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 12, PrefixList = 'PV8, PU8[T-V], Z[V-Z]8T, Z[V-Z]8U, Z[V-Z]8V', location = 'Roraima ' WHERE CountryCode = 108 AND DXCCSort = 87;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 12, PrefixList = 'PW8, PU8[D-F], Z[V-Z]8D, Z[V-Z]8E, Z[V-Z]8F', location = 'Rondonia ' WHERE CountryCode = 108 AND DXCCSort = 88;"); - $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PT9, PU9[A-N], Z[V-Z]9', location = 'Mato Grosso do Sul ' WHERE CountryCode = 108 AND DXCCSort = 92;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PY1, PU1[J-Y], Z[V-Z]1', location = 'Rio de Janeiro ' WHERE CountryCode = 108 AND DXCCSort = 11;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'PY2, PU2[K-Y], Z[V-Z]2', location = 'Sao Paulo ' WHERE CountryCode = 108 AND DXCCSort = 21;"); $this->db->query("UPDATE `dxcc_master` SET TimeZone = 3, ITUZone = 15, PrefixList = 'P[P-Y]3, Z[V-Z]3', location = 'Rio Grande do Sul ' WHERE CountryCode = 108 AND DXCCSort = 31;"); @@ -34,7 +36,10 @@ class Migration_fix_brazil_dxcc_data extends CI_Migration { $this->db->query("UPDATE `dxcc_master` SET TimeZone = 4, ITUZone = 13, PrefixList = 'PY9, PU9[O-Y], ZV9[O-Z], ZW9[O-Z], ZX9[O-Z], ZY9[O-Z], ZZ9[O-Z]', location = 'Mato Grosso ' WHERE CountryCode = 108 AND DXCCSort = 91;"); } - public function down(){ + public function down() + { + // Reverts to the original content + // (from 105_create_dxcc_master_tables.php) $this->db->query("DELETE FROM `dxcc_master` WHERE CountryCode = 108;"); $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',1,108,'P[P-Y], Z[V-Z]','Brazil','Brazil','SA','11',NULL,NULL,4.0,-15.8,-47.9167,NULL,NULL);"); $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',22,108,'PP2, PU2[F-H], Z[V-Z]2F, Z[V-Z]2G, Z[V-Z]2H','Brazil','Goias ','SA','11','',NULL,5.0,-15.8,-50.0,NULL,NULL);"); From d80acebb432b8c216fe4afd6bc70db5674a6f5cc Mon Sep 17 00:00:00 2001 From: Rodrigo Freire Date: Thu, 10 Jul 2025 23:50:00 -0300 Subject: [PATCH 10/10] Brazilian DXCC fix: Fixes indentation --- application/migrations/200_fix_brazil_dxcc_data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/200_fix_brazil_dxcc_data.php b/application/migrations/200_fix_brazil_dxcc_data.php index d615914d..5241961c 100644 --- a/application/migrations/200_fix_brazil_dxcc_data.php +++ b/application/migrations/200_fix_brazil_dxcc_data.php @@ -40,7 +40,7 @@ class Migration_fix_brazil_dxcc_data extends CI_Migration { { // Reverts to the original content // (from 105_create_dxcc_master_tables.php) - $this->db->query("DELETE FROM `dxcc_master` WHERE CountryCode = 108;"); + $this->db->query("DELETE FROM `dxcc_master` WHERE CountryCode = 108;"); $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',1,108,'P[P-Y], Z[V-Z]','Brazil','Brazil','SA','11',NULL,NULL,4.0,-15.8,-47.9167,NULL,NULL);"); $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',22,108,'PP2, PU2[F-H], Z[V-Z]2F, Z[V-Z]2G, Z[V-Z]2H','Brazil','Goias ','SA','11','',NULL,5.0,-15.8,-50.0,NULL,NULL);"); $this->db->query("INSERT INTO `dxcc_master` (DXCCPrefix,DXCCSearch,DXCCMap,DXCCSort,CountryCode,PrefixList,DXCCName,Location,Continent,CQZone,ITUZone,IOTA,TimeZone,Latitude,Longitude,StartDate,EndDate) VALUES ('PY','PY','PY',12,108,'PP1, PU1[A-I], ZV1[A-I], ZW1[A-I], ZX1[A-I], ZY1[A-I], ZZ1[A-I]','Brazil','Esprito Santo ','SA','11','15',NULL,4.0,-20.0,-40.6,NULL,NULL);");