From 44b277f0adea3cc8f6b99c220d855eae2a3e2d04 Mon Sep 17 00:00:00 2001 From: JoseAndresMR Date: Tue, 26 Jun 2018 23:15:57 +0200 Subject: [PATCH] various fixing --- pyModeS/decoder/adsb.py | 10 +++++----- pyModeS/decoder/adsb_ua_parameters/NACv.csv | 8 ++++---- pyModeS/decoder/adsb_ua_parameters/NIC_v1.csv | 16 ++++++++-------- pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv | 6 +++--- pyModeS/decoder/adsb_ua_parameters/NUCp.csv | 6 +++--- pyModeS/decoder/adsb_ua_parameters/NUCv.csv | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pyModeS/decoder/adsb.py b/pyModeS/decoder/adsb.py index a604040..ec0d9d2 100644 --- a/pyModeS/decoder/adsb.py +++ b/pyModeS/decoder/adsb.py @@ -246,11 +246,11 @@ def nic_v2(msg, nic_a, nic_b, nic_c): nic_df = pd.read_csv('/home/josmilrom/Libraries/pyModeS/pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv', sep=',') if tc in range(5,9): - nic_df_extract = [(nic_df.TC == tc) & (nic_df.NICa == nic_a) & (nic_df.NICc == nic_c)] + nic_df_extract = nic_df[(nic_df.TC == tc) & (nic_df.NICa == nic_a) & (nic_df.NICc == nic_c)] elif tc in range(9,19): - nic_df_extract = [(nic_df.TC == tc) & (nic_df.NICa == nic_a) & (nic_df.NICb == nic_b)] + nic_df_extract = nic_df[(nic_df.TC == tc) & (nic_df.NICa == nic_a) & (nic_df.NICb == nic_b)] elif tc in range(20,23): - nic_df_extract = [nic_df.TC == tc] + nic_df_extract = nic_df[nic_df.TC == tc] Rc = nic_df_extract['Rc'][0] @@ -341,10 +341,10 @@ def nac_p(msg): if tc == 29: nac_p = common.bin2int(msgbin[71:75]) - nacp_df_extract = nac_p[nacp_df.NACp == nac_p] + nacp_df_extract = nacp_df[nacp_df.NACp == nac_p] elif tc == 31: nac_p = common.bin2int(msgbin[76:80]) - nacp_df_extract = nac_p[nacp_df.NACp == nac_p] + nacp_df_extract = nacp_df[nacp_df.NACp == nac_p] HFU = nacp_df_extract['HFU'][0] VEPU = nacp_df_extract['VEPU'][0] diff --git a/pyModeS/decoder/adsb_ua_parameters/NACv.csv b/pyModeS/decoder/adsb_ua_parameters/NACv.csv index d5a8d25..ea2c325 100644 --- a/pyModeS/decoder/adsb_ua_parameters/NACv.csv +++ b/pyModeS/decoder/adsb_ua_parameters/NACv.csv @@ -1,6 +1,6 @@ NAVc,HFOMr,VFOMr 0,'unknown’,'unknown’ -1,10,"15,2" -2,3,"4,5" -3,1,"1,5" -4,"0,3","0,46" +1,10,15.2 +2,3,4.5 +3,1,1.5 +4,0.3,0.46 diff --git a/pyModeS/decoder/adsb_ua_parameters/NIC_v1.csv b/pyModeS/decoder/adsb_ua_parameters/NIC_v1.csv index d5fe23a..6befdfb 100644 --- a/pyModeS/decoder/adsb_ua_parameters/NIC_v1.csv +++ b/pyModeS/decoder/adsb_ua_parameters/NIC_v1.csv @@ -1,11 +1,11 @@ TC,NICs,NIC,Rc,VPL -5,0,12,"7,5",'undefined’ -6,0,11,25,'undefined’ -7,1,10,75,'undefined’ -7,0,9,185,'undefined’ +5,0,11,7.5,'undefined’ +6,0,10,25,'undefined’ +7,1,9,75,'undefined’ +7,0,8,185,'undefined’ 8,0,1,'unknown’,'undefined’ -9,0,11,"7,5",11 -10,0,10,25,"37,5" +9,0,11,7.5,11 +10,0,10,25,37.5 11,1,9,75,112 11,0,8,185,'undefined’ 12,0,7,370,'undefined’ @@ -17,6 +17,6 @@ TC,NICs,NIC,Rc,VPL 16,0,2,14008,'undefined’ 17,0,1,37000,'undefined’ 18,0,0,'unknown’,'undefined’ -20,0,11,"7,5",11 -21,0,10,25,"37,5" +20,0,11,7.5,11 +21,0,10,25,37.5 22,0,0,'unknown’,112 diff --git a/pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv b/pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv index 47eb6cf..d2d0119 100644 --- a/pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv +++ b/pyModeS/decoder/adsb_ua_parameters/NIC_v2.csv @@ -1,5 +1,5 @@ TC,NICa,NICb,NICc,NIC,Rc -5,0,0,0,11,"7,5" +5,0,0,0,11,7.5 6,0,0,0,10,25 7,1,0,0,9,75 7,0,0,0,8,185 @@ -7,7 +7,7 @@ TC,NICa,NICb,NICc,NIC,Rc 8,1,0,0,6,556 8,0,0,1,6,1111 8,0,0,0,0,'unknown’ -9,0,0,0,11,"7,5" +9,0,0,0,11,7.5 10,0,0,0,10,25 11,1,1,0,9,75 11,0,0,0,8,185 @@ -21,6 +21,6 @@ TC,NICa,NICb,NICc,NIC,Rc 16,0,0,0,2,14800 17,0,0,0,1,37000 18,0,0,0,0,'unknown’ -20,0,0,0,11,"7,5" +20,0,0,0,11,7.5 21,0,0,0,10,25 22,0,0,0,0,'unknown’ diff --git a/pyModeS/decoder/adsb_ua_parameters/NUCp.csv b/pyModeS/decoder/adsb_ua_parameters/NUCp.csv index e131e4c..2a84020 100644 --- a/pyModeS/decoder/adsb_ua_parameters/NUCp.csv +++ b/pyModeS/decoder/adsb_ua_parameters/NUCp.csv @@ -1,9 +1,9 @@ TC,NUCp,HPL,Rcu,Rcv -5,9,"7,5",3,'undefined’ +5,9,7.5,3,'undefined’ 6,8,25,10,'undefined’ 7,7,185,93,'undefined’ 8,6,'unknown’,'unknown’,'undefined’ -9,9,"7,5",3,'undefined’ +9,9,7.5,3,'undefined’ 10,8,25,10,'undefined’ 11,7,185,93,'undefined’ 12,6,370,185,'undefined’ @@ -13,6 +13,6 @@ TC,NUCp,HPL,Rcu,Rcv 16,2,18520,9260,'undefined’ 17,1,37040,18520,'undefined’ 18,0,'unknown’,'unknown’,'undefined’ -20,9,"7,5",3,4 +20,9,7.5,3,4 21,8,25,10,15 22,0,'unknown’,'unknown’,'unknown’ diff --git a/pyModeS/decoder/adsb_ua_parameters/NUCv.csv b/pyModeS/decoder/adsb_ua_parameters/NUCv.csv index bf45a30..f5645a5 100644 --- a/pyModeS/decoder/adsb_ua_parameters/NUCv.csv +++ b/pyModeS/decoder/adsb_ua_parameters/NUCv.csv @@ -1,6 +1,6 @@ NUCp,HVE,VVE 0,'unknown’,'unknown’ -1,10,"15,2" -2,3,"4,5" -3,1,"1,5" -4,"0,3","1,46" +1,10,15.2 +2,3,4.5 +3,1,1.5 +4,0.3,1.46