From d9f27485c31377fc646ffd95441c47133e7a16ea Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 3 Mar 2023 17:14:56 +0000 Subject: [PATCH] Add Navtex transmitters and French DAB transmitters to Map --- plugins/feature/map/data/transmitters.csv | 185 ++++++++++++++++++++++ plugins/feature/map/mapgui.cpp | 46 ++++++ plugins/feature/map/mapgui.h | 1 + plugins/feature/map/mapsettings.cpp | 2 + plugins/feature/map/readme.md | 8 +- sdrbase/util/csv.cpp | 8 +- sdrbase/util/csv.h | 4 +- sdrbase/util/units.h | 19 +++ 8 files changed, 264 insertions(+), 9 deletions(-) diff --git a/plugins/feature/map/data/transmitters.csv b/plugins/feature/map/data/transmitters.csv index 1640a2a93..fb5425b19 100644 --- a/plugins/feature/map/data/transmitters.csv +++ b/plugins/feature/map/data/transmitters.csv @@ -3476,3 +3476,188 @@ DAB,Wolv'ton & Shrop 3702,Wolv'ton & Shrop,218640000,52.878444,-3.091941,305,0.6 DAB,Wolv'ton & Shrop 3708,Wolv'ton & Shrop,218640000,52.547739,-2.115424,225,0.6,37,08 DAB,Wolv'ton & Shrop 3709,Wolv'ton & Shrop,218640000,52.670935,-2.550228,396,1.95447,37,09 DAB,Wolv'ton & Shrop 3711,Wolv'ton & Shrop,218640000,52.496364,-2.048417,267,4,37,11 +DAB,Marseille intermédiaire 1 2310,Marseille intermédiaire 1,195936000,43.3878,5.41167,66,10,17,0a +DAB,Marseille intermédiaire 1 2302,Marseille intermédiaire 1,195936000,43.5272,5.40194,25,3.5,17,02 +DAB,Marseille intermédiaire 2 2410,Marseille intermédiaire 2,188928000,43.3839,5.42556,148,10,18,0a +DAB,Nice intermédiaire 2 1704,Nice intermédiaire 2,220352000,43.7217,7.32083,56,6,11,04 +DAB,Nice local 2 0404,Nice local 2,208064000,43.7675,7.29556,30,12,04,04 +DAB,Paris intermédiaire 1 1210,Paris intermédiaire 1,181936000,48.8853,2.42222,144,8,0c,0a +DAB,Paris local 2 2610,Paris local 2,204640000,48.8853,2.42222,144,8,1a,0a +DAB,Paris local 1 2210,Paris local 1,202928000,48.8872,2.34167,48,4,16,0a +DAB,Marseille local 3 0710,Marseille local 3,201072000,43.3878,5.41167,66,10,07,0a +DAB,Marseille local 2 1110,Marseille local 2,199360000,43.3892,5.4125,45,4,0b,0a +DAB,Paris local 3 2710,Paris local 3,216928000,48.8853,2.42222,144,4,1b,0a +DAB,Nice étendu 1 3104,Nice étendu 1,216928000,43.7142,7.30722,18,10,1f,04 +DAB,Nice local 3 0604,Nice local 3,201072000,43.7217,7.32083,38,2,06,04 +DAB,Lille local 1 0510,Lille local 1,192352000,50.6556,3.03056,70,7,05,0a +DAB,Douai-Lens local 1 2701,Douai-Lens local 1,222064000,50.4336,2.6075,30,4,1b,01 +DAB,Lille étendu 1 0010,Lille étendu 1,195936000,50.6425,3.12389,143,4,00,0a +DAB,Calais-Boulogne-sur-Mer local 1 0102,Calais-Boulogne-sur-Mer local 1,176640000,50.9506,1.89083,63,3,01,02 +DAB,Dunkerque local 1 0303,Dunkerque local 1,201072000,51.0331,2.35889,55,3,03,03 +DAB,Valenciennes local 1 2204,Valenciennes local 1,188928000,50.3394,3.57389,46,8,16,04 +DAB,Lille local 2 0610,Lille local 2,194064000,50.6425,3.12389,143,4,06,0a +DAB,Marseille local 2 1101,Marseille local 2,199360000,43.3586,5.57444,22,2,0b,01 +DAB,Lyon étendu 1 1710,Lyon étendu 1,181936000,45.8225,4.82083,32,13,11,0a +DAB,Lyon étendu 1 1704,Lyon étendu 1,181936000,45.965,4.70361,19,2.1,11,04 +DAB,Strasbourg local 2 0910,Strasbourg local 2,192352000,48.5867,7.74111,90,2.5,09,0a +DAB,Strasbourg étendu 1 6710,Strasbourg étendu 1,187072000,48.5867,7.74111,90,4,43,0a +DAB,Strasbourg étendu 1 6701,Strasbourg étendu 1,187072000,48.0767,7.32667,40,1.2,43,01 +DAB,Strasbourg étendu 1 6702,Strasbourg étendu 1,187072000,47.7344,7.34556,15,2.5,43,02 +DAB,Colmar local 1 1801,Colmar local 1,220352000,48.0786,7.33444,56,1,12,01 +DAB,Mulhouse local 1 1302,Mulhouse local 1,222064000,47.7503,7.31472,55,4,0d,02 +DAB,Bourg-en-Bresse local 1 1601,Bourg-en-Bresse local 1,187072000,46.1917,5.33833,32,1.5,10,01 +DAB,Bourgoin-Jallieu local 1 2802,Bourgoin-Jallieu local 1,178352000,45.5911,5.36583,35,3,1c,02 +DAB,Strasbourg local 1 0510,Strasbourg local 1,185360000,48.5806,7.76583,54,4,05,0a +DAB,Lyon local 2 2504,Lyon local 2,176640000,45.965,4.70361,19,1.8,19,04 +DAB,Lyon local 2 2510,Lyon local 2,176640000,45.8225,4.82083,32,6,19,0a +DAB,Nantes local 1 1710,Nantes local 1,190640000,47.2447,-1.60833,125,6,11,0a +DAB,La Roche-sur-Yon local 1 1902,La Roche-sur-Yon local 1,202928000,46.6892,-1.43722,47,6,13,02 +DAB,Saint-Nazaire local 1 1401,Saint-Nazaire local 1,201072000,47.3253,-2.40639,63,3,0e,01 +DAB,Saint-Nazaire local 1 1403,Saint-Nazaire local 1,201072000,47.1914,-2.07667,32,3,0e,03 +DAB,Nantes étendu 1 0801,Nantes étendu 1,180064000,47.3253,-2.40639,63,2,08,01 +DAB,Nantes étendu 1 0810,Nantes étendu 1,180064000,47.2447,-1.60833,125,9,08,0a +DAB,Nantes local 2 2010,Nantes local 2,223936000,47.2236,-1.615,98,4,14,0a +DAB,Rouen étendu 1 1610,Rouen étendu 1,209936000,49.4428,1.03306,66,10,10,0a +DAB,Rouen étendu 1 1601,Rouen étendu 1,209936000,49.5047,0.139722,49,10,10,01 +DAB,Rouen local 1 0410,Rouen local 1,206352000,49.4472,1.13667,63,6,04,0a +DAB,Rouen local 2 2310,Rouen local 2,213360000,49.4472,1.13667,63,6,17,0a +DAB,Le Havre local 1 2901,Le Havre local 1,215072000,49.5072,0.0894444,30,4,1d,01 +DAB,Paris intermédiaire 2 1310,Paris intermédiaire 2,187072000,48.8853,2.42222,144,8,0d,0a +DAB,Mâcon local 1 1401,Mâcon local 1,195936000,46.3517,4.78333,32,1.8,0e,01 +DAB,Bordeaux étendu 1 1310,Bordeaux étendu 1,199360000,44.8203,-0.505556,163,6,0d,0a +DAB,Bordeaux étendu 1 1301,Bordeaux étendu 1,199360000,44.4328,0.07,37,4,0d,01 +DAB,Bordeaux local 1 3010,Bordeaux local 1,188928000,44.8719,-0.515278,78,10,1e,0a +DAB,Bordeaux local 1 3010,Bordeaux local 1,188928000,44.8614,-0.558611,35,2,1e,0a +DAB,Bordeaux local 2 3110,Bordeaux local 2,197648000,44.8203,-0.505556,163,4,1f,0a +DAB,Arcachon local 1 2501,Arcachon local 1,220352000,44.6469,-1.16361,91,4,19,01 +DAB,Toulouse étendu 1 1810,Toulouse étendu 1,183648000,43.5589,1.44639,27,10,12,0a +DAB,Toulouse étendu 1 0301,Toulouse étendu 1,183648000,43.9875,1.35917,34,5,03,01 +DAB,Toulouse local 1 3010,Toulouse local 1,192352000,43.6058,1.46722,20,6,1e,0a +DAB,Toulouse local 2 3110,Toulouse local 2,199360000,43.5589,1.44639,27,5,1f,0a +DAB,métropole métropolitain 1 6708,métropole métropolitain 1,188928000,45.3156,4.74611,15,2.6,43,08 +DAB,métropole métropolitain 1 6706,métropole métropolitain 1,188928000,44.9642,4.80083,25,10,43,06 +DAB,métropole métropolitain 1 2701,métropole métropolitain 1,192352000,43.3586,5.57444,27,2.6,1b,01 +DAB,métropole métropolitain 1 0604,métropole métropolitain 1,208064000,47.1456,4.66167,52,2.6,06,04 +DAB,métropole métropolitain 1 0601,métropole métropolitain 1,208064000,47.0347,4.81389,42,4,06,01 +DAB,métropole métropolitain 1 0610,métropole métropolitain 1,208064000,47.3003,4.99056,29,5,06,0a +DAB,métropole métropolitain 1 0605,métropole métropolitain 1,208064000,47.485,4.1575,32,1.7,06,05 +DAB,métropole métropolitain 1 0606,métropole métropolitain 1,208064000,47.335,4.81083,21,2.6,06,06 +DAB,métropole métropolitain 1 0607,métropole métropolitain 1,208064000,47.3469,4.45889,45,1.7,06,07 +DAB,métropole métropolitain 1 0407,métropole métropolitain 1,211648000,44.6131,4.77917,26,3.6,04,07 +DAB,métropole métropolitain 1 0402,métropole métropolitain 1,211648000,44.1814,4.66222,47,4,04,02 +DAB,métropole métropolitain 1 1404,métropole métropolitain 1,185360000,48.0333,3.00278,78,1.5,0e,04 +DAB,métropole métropolitain 1 1910,métropole métropolitain 1,188928000,45.8225,4.82083,34,13,13,0a +DAB,métropole métropolitain 1 6705,métropole métropolitain 1,188928000,45.5325,4.80861,45,3.4,43,05 +DAB,métropole métropolitain 1 0602,métropole métropolitain 1,208064000,46.7364,4.665,27,6.5,06,02 +DAB,métropole métropolitain 1 1903,métropole métropolitain 1,188928000,46.2817,4.68056,76,10,13,03 +DAB,métropole métropolitain 1 1101,métropole métropolitain 1,185360000,48.88,2.28389,167,10,0b,01 +DAB,métropole métropolitain 1 1110,métropole métropolitain 1,185360000,48.8675,2.41528,139,14,0b,0a +DAB,métropole métropolitain 1 1403,métropole métropolitain 1,185360000,48.1647,2.88139,38,1.8,0e,03 +DAB,métropole métropolitain 1 1410,métropole métropolitain 1,185360000,48.4267,2.71083,46,5.6,0e,0a +DAB,métropole métropolitain 1 6702,métropole métropolitain 1,194064000,48.2911,2.68194,28,1.7,43,02 +DAB,métropole métropolitain 1 0405,métropole métropolitain 1,211648000,43.97,4.85972,88,4,04,05 +DAB,métropole métropolitain 1 0608,métropole métropolitain 1,208064000,47.5394,3.89389,20,5,06,08 +DAB,métropole métropolitain 1 1010,métropole métropolitain 1,208064000,47.8406,3.66639,101,7,0a,0a +DAB,métropole métropolitain 1 1401,métropole métropolitain 1,185360000,48.6,2.44278,86,3,0e,01 +DAB,métropole métropolitain 1 1402,métropole métropolitain 1,185360000,48.4783,2.42417,93,6,0e,02 +DAB,métropole métropolitain 2 0808,métropole métropolitain 2,190640000,45.3156,4.74611,15,2.6,08,08 +DAB,métropole métropolitain 2 0806,métropole métropolitain 2,190640000,44.9642,4.80083,25,5,08,06 +DAB,métropole métropolitain 2 2807,métropole métropolitain 2,197648000,43.6319,5.09611,23,1.9,1c,07 +DAB,métropole métropolitain 2 2808,métropole métropolitain 2,197648000,43.5403,5.23833,14,2,1c,08 +DAB,métropole métropolitain 2 0010,métropole métropolitain 2,206352000,47.1456,4.66167,52,2.6,00,0a +DAB,métropole métropolitain 2 1310,métropole métropolitain 2,206352000,47.0347,4.81389,42,4,0d,0a +DAB,métropole métropolitain 2 0001,métropole métropolitain 2,206352000,47.485,4.1575,32,1.7,00,01 +DAB,métropole métropolitain 2 0002,métropole métropolitain 2,206352000,47.3469,4.45889,45,1.7,00,02 +DAB,métropole métropolitain 2 0607,métropole métropolitain 2,213360000,44.6131,4.77917,26,4,06,07 +DAB,métropole métropolitain 2 0602,métropole métropolitain 2,213360000,44.1814,4.66222,47,4,06,02 +DAB,métropole métropolitain 2 0504,métropole métropolitain 2,199360000,48.0333,3.00278,78,4,05,04 +DAB,métropole métropolitain 2 2010,métropole métropolitain 2,190640000,45.8225,4.82083,34,10,14,0a +DAB,métropole métropolitain 2 0805,métropole métropolitain 2,190640000,45.5325,4.80861,45,10,08,05 +DAB,métropole métropolitain 2 2004,métropole métropolitain 2,190640000,45.965,4.70361,19,10,14,04 +DAB,métropole métropolitain 2 1302,métropole métropolitain 2,206352000,46.7364,4.665,27,6.5,0d,02 +DAB,métropole métropolitain 2 0101,métropole métropolitain 2,199360000,46.3517,4.78333,32,5,01,01 +DAB,métropole métropolitain 2 1301,métropole métropolitain 2,206352000,46.5656,4.87639,29,5,0d,01 +DAB,métropole métropolitain 2 0501,métropole métropolitain 2,199360000,48.88,2.28389,167,10,05,01 +DAB,métropole métropolitain 2 0510,métropole métropolitain 2,199360000,48.8675,2.41528,139,14,05,0a +DAB,métropole métropolitain 2 0505,métropole métropolitain 2,199360000,48.1647,2.88139,38,14,05,05 +DAB,métropole métropolitain 2 0506,métropole métropolitain 2,199360000,48.4286,2.54028,36,1.7,05,06 +DAB,métropole métropolitain 2 0507,métropole métropolitain 2,199360000,48.2911,2.68194,28,1.7,05,07 +DAB,métropole métropolitain 2 0605,métropole métropolitain 2,213360000,43.97,4.85972,88,4.2,06,05 +DAB,métropole métropolitain 2 0606,métropole métropolitain 2,213360000,43.8036,5.04694,39,4.2,06,06 +DAB,métropole métropolitain 2 0003,métropole métropolitain 2,206352000,47.5394,3.89389,20,2.6,00,03 +DAB,métropole métropolitain 2 0004,métropole métropolitain 2,206352000,47.8406,3.66639,101,7,00,04 +DAB,métropole métropolitain 2 0503,métropole métropolitain 2,199360000,48.6286,2.42806,52,7,05,03 +DAB,Dijon étendu 1 0410,Dijon étendu 1,204640000,47.3003,4.99056,29,7.5,04,0a +DAB,Dijon étendu 1 0402,Dijon étendu 1,204640000,46.7364,4.665,27,6.5,04,02 +DAB,Avignon étendu 1 2505,Avignon étendu 1,208064000,43.97,4.85972,88,7.7,19,05 +DAB,Avignon étendu 1 2502,Avignon étendu 1,208064000,44.1814,4.66222,47,6,19,02 +DAB,Paris étendu 1 0701,Paris étendu 1,218640000,48.88,2.28389,167,10,07,01 +DAB,Paris étendu 1 0710,Paris étendu 1,218640000,48.8675,2.41528,139,14,07,0a +DAB,Avignon local 1 3605,Avignon local 1,178352000,43.97,4.85972,88,4.6,24,05 +DAB,Dijon local 1 6710,Dijon local 1,218640000,47.315,4.98667,27,7.7,43,0a +DAB,Lille étendu 1 0001,Lille étendu 1,195936000,50.4186,2.65944,74,10.5,00,01 +DAB,Lyon local 1 2410,Lyon local 1,218640000,45.8181,4.90667,56,7,18,0a +DAB,Marseille étendu 1 3210,Marseille étendu 1,176640000,43.3839,5.42556,106,10,20,0a +DAB,Marseille étendu 1 3201,Marseille étendu 1,176640000,43.2747,5.30833,27,4,20,01 +DAB,Paris intermédiaire 2 1301,Paris intermédiaire 2,187072000,48.8025,2.20444,103,10,0d,01 +DAB,Nice intermédiaire 1 1004,Nice intermédiaire 1,218640000,43.7217,7.32083,53,8,0a,04 +DAB,Nice intermédiaire 1 1005,Nice intermédiaire 1,218640000,43.5783,7.03556,45,4,0a,05 +DAB,métropole métropolitain 1 2710,métropole métropolitain 1,192352000,43.3892,5.4125,71,20,1b,0a +DAB,Toulon local 1 0010,Toulon local 1,220352000,43.0531,5.84556,72,4,00,0a +DAB,Toulon étendu 1 2610,Toulon étendu 1,202928000,43.0531,5.84556,72,10,1a,0a +DAB,Toulon étendu 1 2601,Toulon étendu 1,202928000,43.3686,5.99194,49,4.8,1a,01 +DAB,Toulon étendu 1 2602,Toulon étendu 1,202928000,43.2814,6.29417,70,4.8,1a,02 +DAB,Toulon étendu 1 2603,Toulon étendu 1,202928000,43.1033,6.34889,22,5,1a,03 +DAB,métropole métropolitain 2 2810,métropole métropolitain 2,197648000,43.3892,5.4125,71,20,1c,0a +DAB,Orléans local 1 2310,Orléans local 1,178352000,47.9433,1.9275,89,6.4,17,0a +DAB,Poitiers local 1 1410,Poitiers local 1,192352000,46.5628,0.348889,74,8.2,0e,0a +DAB,Tours local 1 2610,Tours local 1,204640000,47.4144,0.684722,52,9.4,1a,0a +DAB,Saint-Étienne étendu 1 0510,Saint-Étienne étendu 1,185360000,45.4006,4.38778,62,10,05,0a +DAB,Saint-Étienne étendu 1 0501,Saint-Étienne étendu 1,185360000,45.9844,3.91944,21,5,05,01 +DAB,Nice intermédiaire 2 1705,Nice intermédiaire 2,220352000,43.5783,7.03556,46,4,11,05 +DAB,Nice intermédiaire 2 1706,Nice intermédiaire 2,220352000,43.6611,6.9175,17,3.5,11,06 +DAB,Nice local 2 0405,Nice local 2,208064000,43.5783,7.03556,46,4,04,05 +DAB,Nice local 2 0404,Nice local 2,208064000,43.7217,7.32083,54,5,04,04 +DAB,Paris intermédiaire 1 1201,Paris intermédiaire 1,181936000,48.8025,2.20444,103,10,0c,01 +DAB,Lille local 1 0505,Lille local 1,192352000,50.6897,3.1825,78,0.4,05,05 +DAB,Annecy étendu 1 1801,Annecy étendu 1,192352000,45.9164,6.17222,32,4,12,01 +DAB,Annecy étendu 1 1002,Annecy étendu 1,192352000,46.1453,6.18861,24,4,0a,02 +DAB,Annecy étendu 1 1803,Annecy étendu 1,192352000,45.66,5.82139,32,4,12,03 +DAB,Annemasse local 1 3402,Annemasse local 1,194064000,46.1681,6.21806,23,3,22,02 +DAB,Chambéry local 1 2103,Chambéry local 1,187072000,45.6633,5.82222,18,5,15,03 +DAB,Grenoble local 1 2601,Grenoble local 1,206352000,45.1508,5.665,37,6.7,1a,01 +DAB,Grenoble local 1 2602,Grenoble local 1,206352000,45.2603,5.54611,33,3.5,1a,02 +DAB,Saint-Étienne local 1 3610,Saint-Étienne local 1,195936000,45.4,4.39389,22,8.6,24,0a +DAB,Orléans étendu 1 0810,Orléans étendu 1,209936000,47.9433,1.9275,88,9,08,0a +DAB,Orléans étendu 1 0801,Orléans étendu 1,209936000,47.6083,1.30306,58,3,08,01 +DAB,Orléans étendu 1 0802,Orléans étendu 1,209936000,47.9983,2.74194,49,4,08,02 +DAB,Poitiers étendu 1 0110,Poitiers étendu 1,206352000,46.5914,0.3475,61,6,01,0a +DAB,Poitiers étendu 1 0101,Poitiers étendu 1,206352000,46.9047,0.526389,70,5.5,01,01 +DAB,Poitiers étendu 1 0102,Poitiers étendu 1,206352000,46.3489,-0.430556,82,4,01,02 +DAB,Tours étendu 1 2710,Tours étendu 1,185360000,47.4058,0.724167,36,10,1b,0a +DAB,Tours étendu 1 2701,Tours étendu 1,185360000,46.9644,0.684444,27,1.7,1b,01 +DAB,Tours étendu 1 2702,Tours étendu 1,185360000,47.1361,0.228333,20,2.6,1b,02 +DAB,Annecy local 1 3101,Annecy local 1,222064000,45.9161,6.16944,25,8,1f,01 +DAB,Grenoble étendu 1 0301,Grenoble étendu 1,180064000,45.1508,5.665,37,6.7,03,01 +DAB,Grenoble étendu 1 0302,Grenoble étendu 1,180064000,45.2603,5.54611,33,3.5,03,02 +DAB,Grenoble étendu 1 0303,Grenoble étendu 1,180064000,45.5578,5.45361,12,2.6,03,03 +DAB,Valenciennes local 1 2206,Valenciennes local 1,188928000,50.2675,3.92194,46,9.5,16,06 +DAB,Nice étendu 1 3105,Nice étendu 1,216928000,43.5694,7.035,48,3.5,1f,05 +DAB,Nice étendu 1 3106,Nice étendu 1,216928000,43.4328,6.81167,24,4,1f,06 +DAB,Besançon local 1 2410,Besançon local 1,202928000,47.2422,6.08361,79,3,18,0a +DAB,métropole métropolitain 1 2702,métropole métropolitain 1,192352000,43.8386,5.03028,13,1.7,1b,02 +DAB,métropole métropolitain 1 0410,métropole métropolitain 1,211648000,43.8247,4.34083,73,5,04,0a +DAB,métropole métropolitain 1 1904,métropole métropolitain 1,188928000,45.7983,4.70361,20,0.1,13,04 +DAB,Montpellier étendu 1 0802,Montpellier étendu 1,220352000,43.1642,2.97306,24,3.3,08,02 +DAB,Montpellier étendu 1 0801,Montpellier étendu 1,220352000,43.3631,3.22917,27,3.3,08,01 +DAB,Montpellier étendu 1 0810,Montpellier étendu 1,220352000,43.5242,3.64444,65,3.5,08,0a +DAB,Nîmes étendu 1 1701,Nîmes étendu 1,209936000,44.1164,4.05944,14,5,11,01 +DAB,Perpignan local 1 0310,Perpignan local 1,216928000,42.7681,2.77917,26,5,03,0a +DAB,métropole métropolitain 2 2809,métropole métropolitain 2,197648000,43.3586,5.57444,27,2.6,1c,09 +DAB,métropole métropolitain 2 1303,métropole métropolitain 2,206352000,47.3003,4.99056,29,5,0d,03 +DAB,métropole métropolitain 2 0005,métropole métropolitain 2,206352000,47.335,4.81083,22,2.6,00,05 +DAB,Amiens étendu 1 0810,Amiens étendu 1,0,49.8597,2.28222,,0,08,0a +DAB,Amiens local 1 3010,Amiens local 1,0,49.8597,2.28222,,0,1e,0a +DAB,Besançon étendu 1 1202,Besançon étendu 1,180064000,46.6519,5.58222,36,2.6,0c,02 +DAB,Besançon étendu 1 1203,Besançon étendu 1,180064000,47.1169,5.47,35,2.6,0c,03 +DAB,Annemasse local 1 3404,Annemasse local 1,194064000,46.2908,5.98528,11,8.7,22,04 diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index bb936c93d..7f8601922 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -38,6 +38,7 @@ #include "util/units.h" #include "util/maidenhead.h" #include "util/morse.h" +#include "util/navtex.h" #include "maplocationdialog.h" #include "mapmaidenheaddialog.h" #include "mapsettingsdialog.h" @@ -307,6 +308,7 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur addNavAids(); addAirspace(); addAirports(); + addNavtex(); displaySettings(); applySettings(true); @@ -985,6 +987,50 @@ void MapGUI::airportsUpdated() addAirports(); } + +void MapGUI::addNavtex() +{ + for (int i = 0; i < NavtexTransmitter::m_navtexTransmitters.size(); i++) + { + SWGSDRangel::SWGMapItem navtexMapItem; + QString name = QString("%1").arg(NavtexTransmitter::m_navtexTransmitters[i].m_station); + navtexMapItem.setName(new QString(name)); + navtexMapItem.setLatitude(NavtexTransmitter::m_navtexTransmitters[i].m_latitude); + navtexMapItem.setLongitude(NavtexTransmitter::m_navtexTransmitters[i].m_longitude); + navtexMapItem.setAltitude(0.0); + navtexMapItem.setImage(new QString("antenna.png")); + navtexMapItem.setImageRotation(0); + QString text = QString("Navtex Transmitter\nStation: %1\nArea: %2") + .arg(NavtexTransmitter::m_navtexTransmitters[i].m_station) + .arg(NavtexTransmitter::m_navtexTransmitters[i].m_area); + QStringList schedules; + for (const auto& schedule : NavtexTransmitter::m_navtexTransmitters[i].m_schedules) + { + QString scheduleText = QString("\nFrequency: %1 kHz\nID: %2").arg(schedule.m_frequency / 1000).arg(schedule.m_id); + if (schedule.m_times.size() > 0) + { + QStringList times; + for (const auto& time : schedule.m_times) { + times.append(time.toString("hh:mm")); + } + scheduleText.append("\nTimes: "); + scheduleText.append(times.join(" ")); + scheduleText.append(" UTC"); + } + schedules.append(scheduleText); + } + text.append(schedules.join("")); + navtexMapItem.setText(new QString(text)); + navtexMapItem.setModel(new QString("antenna.glb")); + navtexMapItem.setFixedPosition(true); + navtexMapItem.setOrientation(0); + navtexMapItem.setLabel(new QString(name)); + navtexMapItem.setLabelAltitudeOffset(4.5); + navtexMapItem.setAltitudeReference(1); + update(m_map, &navtexMapItem, "Navtex"); + } +} + void MapGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/map/mapgui.h b/plugins/feature/map/mapgui.h index bf41dd065..c90a27b72 100644 --- a/plugins/feature/map/mapgui.h +++ b/plugins/feature/map/mapgui.h @@ -160,6 +160,7 @@ public: void addAirspace(const Airspace *airspace, const QString& group, int cnt); void addAirspace(); void addAirports(); + void addNavtex(); void find(const QString& target); void track3D(const QString& target); Q_INVOKABLE void supportedMapsChanged(); diff --git a/plugins/feature/map/mapsettings.cpp b/plugins/feature/map/mapsettings.cpp index 93d972c39..c8e8e4bec 100644 --- a/plugins/feature/map/mapsettings.cpp +++ b/plugins/feature/map/mapsettings.cpp @@ -94,6 +94,8 @@ MapSettings::MapSettings() : dabSettings->m_filterDistance = 75000; m_itemSettings.insert("DAB", dabSettings); + m_itemSettings.insert("Navtex", new MapItemSettings("Navtex", false, QColor(255, 0, 255), false, true, 8)); + MapItemSettings *navAidSettings = new MapItemSettings("NavAid", false, QColor(255, 0, 255), false, true, 11); navAidSettings->m_filterDistance = 500000; m_itemSettings.insert("NavAid", navAidSettings); diff --git a/plugins/feature/map/readme.md b/plugins/feature/map/readme.md index 1a65ddf80..4a0dcfcd1 100644 --- a/plugins/feature/map/readme.md +++ b/plugins/feature/map/readme.md @@ -12,16 +12,18 @@ On top of this, it can plot data from other plugins, such as: * Weather imagery from APT Demodulator, * The Sun, Moon and Stars from the Star Tracker, * Weather ballons from the RadioSonde feature, +* RF Heat Maps from the Heap Map channel, * Radials and estimated position from the VOR localizer feature. -As well as other data sources: +As well as internet data sources: -* AM, FM and DAB transmitters in the UK, +* AM, FM and DAB transmitters in the UK and DAB transmitters in France, * Airports, NavAids and airspaces, * Beacons based on the IARU Region 1 beacon database and International Beacon Project, * Radio time transmitters, * GRAVES radar, -* Ionosonde station data. +* Ionosonde station data, +* Navtex transmitters. It can also create tracks showing the path aircraft, ships and APRS objects have taken, as well as predicted paths for satellites. diff --git a/sdrbase/util/csv.cpp b/sdrbase/util/csv.cpp index 715551955..42dbfe24f 100644 --- a/sdrbase/util/csv.cpp +++ b/sdrbase/util/csv.cpp @@ -70,7 +70,7 @@ QHash *CSV::hash(const QString& filename, int reserve) // Read a row from a CSV file (handling quotes) // https://stackoverflow.com/questions/27318631/parsing-through-a-csv-file-in-qt -bool CSV::readRow(QTextStream &in, QStringList *row) +bool CSV::readRow(QTextStream &in, QStringList *row, char separator) { static const int delta[][5] = { // , " \n ? eof @@ -101,7 +101,7 @@ bool CSV::readRow(QTextStream &in, QStringList *row) else { in >> ch; - if (ch == ',') { + if (ch == separator) { t = 0; } else if (ch == '\"') { t = 1; @@ -137,13 +137,13 @@ bool CSV::readRow(QTextStream &in, QStringList *row) // Read header row from CSV file and return a hash mapping names to column numbers // Returns error if header row can't be read, or if all of requiredColumns aren't found -QHash CSV::readHeader(QTextStream &in, QStringList requiredColumns, QString &error) +QHash CSV::readHeader(QTextStream &in, QStringList requiredColumns, QString &error, char separator) { QHash colNumbers; QStringList row; // Read column names - if (CSV::readRow(in, &row)) + if (CSV::readRow(in, &row, separator)) { // Create hash mapping column names to indices for (int i = 0; i < row.size(); i++) { diff --git a/sdrbase/util/csv.h b/sdrbase/util/csv.h index 99692e60a..5e3743014 100644 --- a/sdrbase/util/csv.h +++ b/sdrbase/util/csv.h @@ -46,8 +46,8 @@ struct SDRBASE_API CSV { static QHash *hash(const QString& filename, int reserve=0); - static bool readRow(QTextStream &in, QStringList *row); - static QHash readHeader(QTextStream &in, QStringList requiredColumns, QString &error); + static bool readRow(QTextStream &in, QStringList *row, char seperator=','); + static QHash readHeader(QTextStream &in, QStringList requiredColumns, QString &error, char seperator=','); }; diff --git a/sdrbase/util/units.h b/sdrbase/util/units.h index a813651d8..62c1a745f 100644 --- a/sdrbase/util/units.h +++ b/sdrbase/util/units.h @@ -294,6 +294,25 @@ public: longitude = -longitude; return true; } + QRegExp dms2(QString("([0-9]+)([NS])([0-9]{2})([0-9]{2}) *,?([0-9]+)([EW])([0-9]{2})([0-9]{2})")); + if (dms2.exactMatch(string)) + { + float latD = dms2.capturedTexts()[1].toFloat(); + bool north = dms2.capturedTexts()[2] == "N"; + float latM = dms2.capturedTexts()[3].toFloat(); + float latS = dms2.capturedTexts()[4].toFloat(); + float lonD = dms2.capturedTexts()[5].toFloat(); + bool east = dms2.capturedTexts()[6] == "E"; + float lonM = dms2.capturedTexts()[7].toFloat(); + float lonS = dms2.capturedTexts()[8].toFloat(); + latitude = latD + latM/60.0 + latS/(60.0*60.0); + if (!north) + latitude = -latitude; + longitude = lonD + lonM/60.0 + lonS/(60.0*60.0); + if (!east) + longitude = -longitude; + return true; + } return false; }