diff --git a/pipelines/GEO.json b/pipelines/GEO.json index 2970357d1..7e6e2da36 100644 --- a/pipelines/GEO.json +++ b/pipelines/GEO.json @@ -25,13 +25,13 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "2110000", - "agc_rate": "0.00001", - "rrc_alpha": "0.7", - "rrc_taps": "31", - "costas_bw": "0.002", - "clock_omega_relative_limit": "0.001", - "buffer_size": "8192" + "symbolrate": 2110000, + "agc_rate": 0.00001, + "rrc_alpha": 0.7, + "rrc_taps": 31, + "costas_bw": 0.002, + "clock_omega_relative_limit": 0.001, + "buffer_size": 8192 } }, "gvar": { @@ -68,12 +68,12 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "660000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 660000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "svissr": { @@ -112,27 +112,27 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "927000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 927000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "1", - "diff_decode": "1" + "is_bpsk": true, + "diff_decode": true } }, "products": { "goes_lrit_data_decoder": { - "write_images": "1", - "write_emwin": "1", - "write_messages": "1", - "write_dcs": "1", - "write_unknown": "0" + "write_images": true, + "write_emwin": true, + "write_messages": true, + "write_dcs": true, + "write_unknown": false } } } @@ -163,24 +163,24 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "927000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 927000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "1", - "diff_decode": "1" + "is_bpsk": true, + "diff_decode": true } }, "tcp": { "xrit_goesrecv_publisher": { "address": "0.0.0.0", - "port": "5004" + "port": 5004 } } } @@ -211,25 +211,25 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "128000", - "agc_rate": "0.0001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 128000, + "agc_rate": 0.0001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "1", - "diff_decode": "0" + "is_bpsk": true, + "diff_decode": false } }, "products": { "gk2a_lrit_data_decoder": { - "write_images": "1", - "write_additional": "1", - "write_unknown": "1" + "write_images": true, + "write_additional": true, + "write_unknown": true } } } @@ -260,24 +260,24 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "128000", - "agc_rate": "0.0001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 128000, + "agc_rate": 0.0001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "1", - "diff_decode": "0" + "is_bpsk": true, + "diff_decode": false } }, "tcp": { "xrit_goesrecv_publisher": { "address": "0.0.0.0", - "port": "5004" + "port": 5004 } } } @@ -304,20 +304,20 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "3000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 3000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "0", - "diff_decode": "0", - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170" + "is_bpsk": false, + "diff_decode": false, + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170 } } } @@ -348,18 +348,18 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "294000", - "agc_rate": "0.0001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.02", - "buffer_size": "8192" + "symbolrate": 294000, + "agc_rate": 0.0001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.02, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "1", - "diff_decode": "0" + "is_bpsk": true, + "diff_decode": false } }, "products": { @@ -393,26 +393,26 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "1150000", - "agc_rate": "0.00001", - "rrc_alpha": "0.6", - "rrc_taps": "31", - "costas_bw": "0.004", - "clock_gain_omega": "2.5e-7", - "clock_mu": "0.5", - "clock_gain_mu": "0.001", - "clock_omega_relative_limit": "0.005", - "dc_block": "0", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 1150000, + "agc_rate": 0.00001, + "rrc_alpha": 0.6, + "rrc_taps": 31, + "costas_bw": 0.004, + "clock_gain_omega": 2.5e-7, + "clock_mu": 0.5, + "clock_gain_mu": 0.001, + "clock_omega_relative_limit": 0.005, + "dc_block": false, + "constellation_scale": 100, + "buffer_size": 8192 } }, "cadu": { "xrit_decoder": { - "is_bpsk": "0", - "diff_decode": "0", - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170" + "is_bpsk": false, + "diff_decode": false, + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170 } }, "products": { @@ -438,7 +438,7 @@ "baseband": {}, "soft": { "elektro_arktika_tlm_demod": { - "buffer_size": "8192" + "buffer_size": 8192 } } } @@ -461,7 +461,7 @@ "baseband": {}, "soft": { "elektro_arktika_tlm_demod": { - "buffer_size": "8192" + "buffer_size": 8192 } } } diff --git a/pipelines/HRPT.json b/pipelines/HRPT.json index 9e28d2777..25e46ce43 100644 --- a/pipelines/HRPT.json +++ b/pipelines/HRPT.json @@ -21,19 +21,19 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2333333", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2333333, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "new_metop_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true } }, "products": { @@ -42,10 +42,10 @@ "metop_mhs": {}, "metop_amsu": {}, "metop_iasi": { - "write_all": "0" + "write_all": false }, "metop_gome": { - "write_all": "0" + "write_all": false }, "metop_ascat": {}, "metop_sem": {}, @@ -71,19 +71,19 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2333333", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2333333, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "metop_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true } }, "products": { @@ -92,10 +92,10 @@ "metop_mhs": {}, "metop_amsu": {}, "metop_iasi": { - "write_all": "0" + "write_all": false }, "metop_gome": { - "write_all": "0" + "write_all": false }, "metop_ascat": {}, "metop_sem": {}, @@ -125,20 +125,20 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2800000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2800000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "0" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": false } }, "products": { @@ -167,20 +167,20 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2800000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2800000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "0" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": false } }, "products": { @@ -214,25 +214,25 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2600000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2600000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "0" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": false } }, "products": { "fengyun_satid": { - "scid_hint": "51" + "scid_hint": 51 }, "fengyun_virr": {}, "fengyun_erm": {}, @@ -258,25 +258,25 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "2600000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.003", - "buffer_size": "8192" + "symbolrate": 2600000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.003, + "buffer_size": 8192 } }, "cadu": { "fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "0" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": false } }, "products": { "fengyun_satid": { - "scid_hint": "51" + "scid_hint": 51 }, "fengyun_virr": {}, "fengyun_erm": {}, @@ -304,8 +304,8 @@ "baseband": {}, "frames": { "noaa_hrpt_demod": { - "buffer_size": "8192", - "deframer_thresold": "10" + "buffer_size": 8192, + "deframer_thresold": 10 } }, "products": { @@ -345,7 +345,7 @@ "baseband": {}, "dem": { "meteor_hrpt_demod": { - "buffer_size": "8192" + "buffer_size": 8192 } }, "cadu": { @@ -379,12 +379,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "800000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 800000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { @@ -421,12 +421,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "400000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 400000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { @@ -449,20 +449,20 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "4000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.002", - "buffer_size": "8192" + "symbolrate": 4000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.002, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "0" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": false } } } diff --git a/pipelines/Rockets.json b/pipelines/Rockets.json index 77fb2741d..4fc3e3f64 100644 --- a/pipelines/Rockets.json +++ b/pipelines/Rockets.json @@ -9,16 +9,16 @@ "baseband": {}, "soft": { "fsk_demod": { - "symbolrate": "3571400", - "agc_rate": "0.000001", - "lpf_cutoff": "2000000", - "lpf_transition_width": "250000", - "buffer_size": "8192" + "symbolrate": 3571400, + "agc_rate": 0.000001, + "lpf_cutoff": 2000000, + "lpf_transition_width": 250000, + "buffer_size": 8192 } }, "cadu": { "spacex_tlm_decoder": { - "qpsk": "0" + "qpsk": false } }, "products": { @@ -36,23 +36,23 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "3125000", - "agc_rate": "0.00001", - "rrc_alpha": "0.6", - "rrc_taps": "31", - "costas_bw": "0.004", - "clock_gain_omega": "2.5e-7", - "clock_mu": "0.5", - "clock_gain_mu": "0.001", - "clock_omega_relative_limit": "0.005", - "dc_block": "0", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 3125000, + "agc_rate": 0.00001, + "rrc_alpha": 0.6, + "rrc_taps": 31, + "costas_bw": 0.004, + "clock_gain_omega": 2.5e-7, + "clock_mu": 0.5, + "clock_gain_mu": 0.001, + "clock_omega_relative_limit": 0.005, + "dc_block": false, + "constellation_scale": 100, + "buffer_size": 8192 } }, "cadu": { "spacex_tlm_decoder": { - "qpsk": "1" + "qpsk": true } } } diff --git a/pipelines/S-Band.json b/pipelines/S-Band.json index ea94929b1..2f1debb32 100644 --- a/pipelines/S-Band.json +++ b/pipelines/S-Band.json @@ -21,17 +21,17 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "2000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 2000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { "proba_s_decoder": { - "derandomize": "0" + "derandomize": false } }, "products": { @@ -62,17 +62,17 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "2000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 2000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { "proba_s_decoder": { - "derandomize": "0" + "derandomize": false } }, "products": { @@ -102,17 +102,17 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "1919000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 1919000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { "proba_s_decoder": { - "derandomize": "1" + "derandomize": true } } } @@ -127,12 +127,12 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "590000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.04", - "buffer_size": "8192" + "symbolrate": 590000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.04, + "buffer_size": 8192 } }, "cadu": { @@ -160,12 +160,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "838000", - "agc_rate": "0.00001", - "rrc_alpha": "0.7", - "rrc_taps": "31", - "costas_bw": "0.005", - "buffer_size": "8192" + "symbolrate": 838000, + "agc_rate": 0.00001, + "rrc_alpha": 0.7, + "rrc_taps": 31, + "costas_bw": 0.005, + "buffer_size": 8192 } }, "cadu": { diff --git a/pipelines/VHF.json b/pipelines/VHF.json index c7a2a2b76..59bc695ee 100644 --- a/pipelines/VHF.json +++ b/pipelines/VHF.json @@ -9,7 +9,7 @@ "baseband": {}, "frames": { "noaa_dsb_demod": { - "buffer_size": "8192" + "buffer_size": 8192 } }, "products": { @@ -40,17 +40,17 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "72000", - "agc_rate": "0.1", - "rrc_alpha": "0.6", - "rrc_taps": "361", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 72000, + "agc_rate": 0.1, + "rrc_alpha": 0.6, + "rrc_taps": 361, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { "meteor_lrpt_decoder": { - "diff_decode": "0" + "diff_decode": false } }, "products": { @@ -81,23 +81,23 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "72000", - "agc_rate": "0.00001", - "rrc_alpha": "0.6", - "rrc_taps": "361", - "costas_bw": "0.004", - "clock_gain_omega": "2.5e-7", - "clock_mu": "0.5", - "clock_gain_mu": "0.001", - "clock_omega_relative_limit": "0.005", - "dc_block": "0", - "constellation_scale": "50", - "buffer_size": "8192" + "symbolrate": 72000, + "agc_rate": 0.00001, + "rrc_alpha": 0.6, + "rrc_taps": 361, + "costas_bw": 0.004, + "clock_gain_omega": 2.5e-7, + "clock_mu": 0.5, + "clock_gain_mu": 0.001, + "clock_omega_relative_limit": 0.005, + "dc_block": false, + "constellation_scale": 50, + "buffer_size": 8192 } }, "cadu": { "meteor_lrpt_decoder": { - "diff_decode": "1" + "diff_decode": true } }, "products": { diff --git a/pipelines/Work-In-Progress.json b/pipelines/Work-In-Progress.json index 47b960280..d56d09f3c 100644 --- a/pipelines/Work-In-Progress.json +++ b/pipelines/Work-In-Progress.json @@ -17,17 +17,17 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "1919000", - "agc_rate": "0.000001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.004", - "buffer_size": "8192" + "symbolrate": 1919000, + "agc_rate": 0.000001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.004, + "buffer_size": 8192 } }, "cadu": { "proba_s_decoder": { - "derandomize": "1" + "derandomize": true } }, "products": { @@ -45,18 +45,18 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "20000000", - "agc_rate": "0.1", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.006", - "clock_gain_omega": "0.8", - "clock_mu": "0.9", - "clock_gain_mu": "0.037", - "clock_omega_relative_limit": "0.0001", - "dc_block": "1", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 20000000, + "agc_rate": 0.1, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.006, + "clock_gain_omega": 0.8, + "clock_mu": 0.9, + "clock_gain_mu": 0.037, + "clock_omega_relative_limit": 0.0001, + "dc_block": true, + "constellation_scale": 100, + "buffer_size": 8192 } }, "cadu": { diff --git a/pipelines/X-Band.json b/pipelines/X-Band.json index 687ada147..70437ec64 100644 --- a/pipelines/X-Band.json +++ b/pipelines/X-Band.json @@ -9,25 +9,25 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "18700000", - "agc_rate": "0.00001", - "rrc_alpha": "0.35", - "rrc_taps": "31", - "costas_bw": "0.0063", - "buffer_size": "8192" + "symbolrate": 18700000, + "agc_rate": 0.00001, + "rrc_alpha": 0.35, + "rrc_taps": 31, + "costas_bw": 0.0063, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_mpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true } }, "products": { "fengyun_satid": {}, "fengyun_mersi1": { - "correct_bowtie": "1" + "correct_bowtie": true } } } @@ -42,28 +42,28 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "30000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.35", - "rrc_taps": "31", - "costas_bw": "0.0063", - "buffer_size": "8192" + "symbolrate": 30000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.35, + "rrc_taps": 31, + "costas_bw": 0.0063, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": true } }, "products": { "fengyun_satid": { - "scid_hint": "52" + "scid_hint": 52 }, "fengyun_mersi2": { - "correct_bowtie": "1" + "correct_bowtie": true }, "fengyun_mwts2": {}, "fengyun_waai": {}, @@ -82,28 +82,28 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "38400000", - "agc_rate": "0.00001", - "rrc_alpha": "0.35", - "rrc_taps": "31", - "costas_bw": "0.0189", - "buffer_size": "8192" + "symbolrate": 38400000, + "agc_rate": 0.00001, + "rrc_alpha": 0.35, + "rrc_taps": 31, + "costas_bw": 0.0189, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": true } }, "products": { "fengyun_satid": { - "scid_hint": "56" + "scid_hint": 56 }, "fengyun_mersill": { - "correct_bowtie": "1" + "correct_bowtie": true }, "fengyun_windrad": {}, "fengyun_mwts3": {}, @@ -133,18 +133,18 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "7500000", - "agc_rate": "0.1", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.006", - "clock_gain_omega": "0.8", - "clock_mu": "0.9", - "clock_gain_mu": "0.037", - "clock_omega_relative_limit": "0.0001", - "dc_block": "1", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 7500000, + "agc_rate": 0.1, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.006, + "clock_gain_omega": 0.8, + "clock_mu": 0.9, + "clock_gain_mu": 0.037, + "clock_omega_relative_limit": 0.0001, + "dc_block": true, + "constellation_scale": 100, + "buffer_size": 8192 } }, "cadu": { @@ -152,8 +152,8 @@ }, "products": { "eos_modis": { - "terra_mode": "0", - "correct_bowtie": "1" + "terra_mode": false, + "correct_bowtie": true }, "aqua_airs": {}, "aqua_ceres": {}, @@ -171,8 +171,8 @@ "baseband": {}, "soft": { "terra_db_demod": { - "dc_block": "0", - "buffer_size": "8192" + "dc_block": false, + "buffer_size": 8192 } }, "cadu": { @@ -180,8 +180,8 @@ }, "products": { "eos_modis": { - "terra_mode": "1", - "correct_bowtie": "1" + "terra_mode": true, + "correct_bowtie": true } } } @@ -196,33 +196,33 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "15000000", - "agc_rate": "0.0001f", - "rrc_alpha": "0.7", - "rrc_taps": "31", - "costas_bw": "0.001", - "buffer_size": "8192" + "symbolrate": 15000000, + "agc_rate": 0.0001, + "rrc_alpha": 0.7, + "rrc_taps": 31, + "costas_bw": 0.001, + "buffer_size": 8192 } }, "cadu": { "new_npp_hrd_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true } }, "products": { "jpss_satid": { - "npp_mode": "1" + "npp_mode": true }, "jpss_viirs": { - "npp_mode": "1" + "npp_mode": true }, "jpss_atms": { - "npp_mode": "1" + "npp_mode": true }, "jpss_omps": { - "npp_mode": "1" + "npp_mode": true } } } @@ -237,12 +237,12 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "30720000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.03", - "buffer_size": "8192" + "symbolrate": 30720000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.03, + "buffer_size": 8192 } }, "cadu": { @@ -263,12 +263,12 @@ "baseband": {}, "soft": { "bpsk_demod": { - "symbolrate": "30720000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.03", - "buffer_size": "8192" + "symbolrate": 30720000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.03, + "buffer_size": 8192 } }, "cadu": { @@ -289,12 +289,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "21226000", - "agc_rate": "0.00001", - "rrc_alpha": "0.8", - "rrc_taps": "31", - "costas_bw": "0.01", - "buffer_size": "8192" + "symbolrate": 21226000, + "agc_rate": 0.00001, + "rrc_alpha": 0.8, + "rrc_taps": 31, + "costas_bw": 0.01, + "buffer_size": 8192 } }, "frames": { @@ -315,26 +315,26 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "62000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.35", - "rrc_taps": "31", - "costas_bw": "0.0189", - "buffer_size": "8192" + "symbolrate": 62000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.35, + "rrc_taps": 31, + "costas_bw": 0.0189, + "buffer_size": 8192 } }, "cadu": { "new_fengyun_ahrpt_decoder": { - "viterbi_outsync_after": "5", - "viterbi_ber_thresold": "0.170", - "soft_symbols": "1", - "invert_second_viterbi": "1" + "viterbi_outsync_after": 5, + "viterbi_ber_thresold": 0.170, + "soft_symbols": true, + "invert_second_viterbi": true } }, "products": { "fengyun_satid": {}, "fengyun_mersi1": { - "correct_bowtie": "1" + "correct_bowtie": true }, "fengyun_virr": {}, "fengyun_erm": {}, @@ -355,12 +355,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "35000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.03", - "buffer_size": "8192" + "symbolrate": 35000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.03, + "buffer_size": 8192 } }, "cadu": { @@ -372,10 +372,10 @@ "metop_mhs": {}, "metop_amsu": {}, "metop_iasi": { - "write_all": "0" + "write_all": false }, "metop_gome": { - "write_all": "0" + "write_all": false }, "metop_ascat": {}, "metop_sem": {}, @@ -405,18 +405,18 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "7500000", - "agc_rate": "0.1", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.006", - "clock_gain_omega": "0.8", - "clock_mu": "0.9", - "clock_gain_mu": "0.037", - "clock_omega_relative_limit": "0.0001", - "dc_block": "1", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 7500000, + "agc_rate": 0.1, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.006, + "clock_gain_omega": 0.8, + "clock_mu": 0.9, + "clock_gain_mu": 0.037, + "clock_omega_relative_limit": 0.0001, + "dc_block": true, + "constellation_scale": 100, + "buffer_size": 8192 } }, "cadu": { @@ -438,12 +438,12 @@ "baseband": {}, "soft": { "qpsk_demod": { - "symbolrate": "30000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.35", - "rrc_taps": "31", - "costas_bw": "0.0189", - "buffer_size": "8192" + "symbolrate": 30000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.35, + "rrc_taps": 31, + "costas_bw": 0.0189, + "buffer_size": 8192 } }, "cadu": { @@ -462,18 +462,18 @@ "baseband": {}, "soft": { "oqpsk_demod": { - "symbolrate": "5000000", - "agc_rate": "0.1", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.006", - "clock_gain_omega": "0.8", - "clock_mu": "0.9", - "clock_gain_mu": "0.037", - "clock_omega_relative_limit": "0.0001", - "dc_block": "1", - "constellation_scale": "100", - "buffer_size": "8192" + "symbolrate": 5000000, + "agc_rate": 0.1, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.006, + "clock_gain_omega": 0.8, + "clock_mu": 0.9, + "clock_gain_mu": 0.037, + "clock_omega_relative_limit": 0.0001, + "dc_block": true, + "constellation_scale": 100, + "buffer_size": 8192 } } } @@ -489,13 +489,13 @@ "baseband": {}, "soft": { "8psk_demod": { - "symbolrate": "9000000", - "agc_rate": "0.00001", - "rrc_alpha": "0.5", - "rrc_taps": "31", - "costas_bw": "0.001", - "clock_omega_relative_limit": "0.001", - "buffer_size": "8192" + "symbolrate": 9000000, + "agc_rate": 0.00001, + "rrc_alpha": 0.5, + "rrc_taps": 31, + "costas_bw": 0.001, + "clock_omega_relative_limit": 0.001, + "buffer_size": 8192 } }, "cadu": { diff --git a/src-cli/main.cpp b/src-cli/main.cpp index fe25a5aee..431c86550 100644 --- a/src-cli/main.cpp +++ b/src-cli/main.cpp @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) std::string output_level = argv[4]; std::string output_file = argv[5]; - std::map parameters; + nlohmann::json parameters; if (argc > 6) { @@ -50,23 +50,23 @@ int main(int argc, char *argv[]) { if (strcmp(argv[i], "-samplerate") == 0) // This is your parameter name { - parameters.emplace("samplerate", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["samplerate"] = std::stol(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-baseband_format") == 0) // This is your parameter name { - parameters.emplace("baseband_format", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["baseband_format"] = argv[i + 1]; // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-dc_block") == 0) // This is your parameter name { - parameters.emplace("dc_block", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["dc_block"] = (bool)std::stoi(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-iq_swap") == 0) // This is your parameter name { - parameters.emplace("iq_swap", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["iq_swap"] = (bool)std::stoi(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } } } diff --git a/src-core/live_pipeline.cpp b/src-core/live_pipeline.cpp index 2c87f3385..692decfc4 100644 --- a/src-core/live_pipeline.cpp +++ b/src-core/live_pipeline.cpp @@ -2,24 +2,24 @@ #include "logger.h" LivePipeline::LivePipeline(Pipeline pipeline, - std::map parameters, + nlohmann::json parameters, std::string output_dir) { logger->info("Starting live pipeline " + pipeline.readable_name); for (std::pair currentModule : pipeline.live_cfg) { - std::map final_parameters = pipeline.steps[currentModule.first].modules[currentModule.second].parameters; - for (const std::pair param : parameters) - if (final_parameters.count(param.first) > 0) - final_parameters[param.first] = param.second; + nlohmann::json final_parameters = pipeline.steps[currentModule.first].modules[currentModule.second].parameters; + for (const nlohmann::detail::iteration_proxy_value> ¶m : parameters.items()) + if (final_parameters.count(param.key()) > 0) + final_parameters[param.key()] = param.value(); else - final_parameters.emplace(param.first, param.second); + final_parameters.emplace(param.key(), param.value()); logger->info("Module " + pipeline.steps[currentModule.first].modules[currentModule.second].module_name); logger->debug("Parameters :"); - for (const std::pair param : final_parameters) - logger->debug(" - " + param.first + " : " + param.second); + for (const nlohmann::detail::iteration_proxy_value> ¶m : final_parameters.items()) + logger->debug(" - " + param.key() + " : " + param.value().dump()); modules.push_back(modules_registry[pipeline.steps[currentModule.first] .modules[currentModule.second] diff --git a/src-core/live_pipeline.h b/src-core/live_pipeline.h index c40d16287..e86339ffb 100644 --- a/src-core/live_pipeline.h +++ b/src-core/live_pipeline.h @@ -6,13 +6,13 @@ class LivePipeline { private: - std::map d_parameters; + nlohmann::json d_parameters; std::vector> modules; std::vector> moduleFutures; public: LivePipeline(Pipeline pipeline, - std::map parameters, + nlohmann::json parameters, std::string output_dir); ~LivePipeline(); diff --git a/src-core/module.cpp b/src-core/module.cpp index 0c447891f..e682d6dfd 100644 --- a/src-core/module.cpp +++ b/src-core/module.cpp @@ -5,9 +5,9 @@ SATDUMP_DLL float ui_scale = 1; // UI Scaling factor, set to 1 (no scaling) by default SATDUMP_DLL int demod_constellation_size = 200; // Demodulator constellation size -ProcessingModule::ProcessingModule(std::string input_file, std::string output_file_hint, std::map parameters) : d_input_file(input_file), - d_output_file_hint(output_file_hint), - d_parameters(parameters) +ProcessingModule::ProcessingModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : d_input_file(input_file), + d_output_file_hint(output_file_hint), + d_parameters(parameters) { input_active = false; streamingInput = false; @@ -54,7 +54,7 @@ void ProcessingModule::drawUI(bool /*window*/) } // Registry -SATDUMP_DLL std::map(std::string, std::string, std::map)>> modules_registry; +SATDUMP_DLL std::map(std::string, std::string, nlohmann::json)>> modules_registry; #define REGISTER_MODULE(module) modules_registry.emplace(module::getID(), module::getInstance) @@ -328,6 +328,6 @@ void registerModules() // Log them out logger->debug("Registered modules (" + std::to_string(modules_registry.size()) + ") : "); - for (std::pair(std::string, std::string, std::map)>> &it : modules_registry) + for (std::pair(std::string, std::string, nlohmann::json)>> &it : modules_registry) logger->debug(" - " + it.first); } \ No newline at end of file diff --git a/src-core/module.h b/src-core/module.h index 0b64f0956..3b9c459ea 100644 --- a/src-core/module.h +++ b/src-core/module.h @@ -37,13 +37,13 @@ protected: const std::string d_input_file; const std::string d_output_file_hint; std::vector d_output_files; - std::map d_parameters; + nlohmann::json d_parameters; ModuleDataType input_data_type, output_data_type; bool streamingInput; // Used to know if we should treat the input as a stream or file public: - ProcessingModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProcessingModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); virtual std::vector getInputTypes() { return {DATA_FILE}; } virtual std::vector getOutputTypes() { return {DATA_FILE}; } void setInputType(ModuleDataType type); @@ -70,10 +70,10 @@ public: static std::string getID(); virtual std::string getIDM() = 0; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; -SATDUMP_DLL extern std::map(std::string, std::string, std::map)>> modules_registry; +SATDUMP_DLL extern std::map(std::string, std::string, nlohmann::json)>> modules_registry; void registerModules(); diff --git a/src-core/modules/angels/argos/module_angels_argos.cpp b/src-core/modules/angels/argos/module_angels_argos.cpp index d00828f4c..971cc9368 100644 --- a/src-core/modules/angels/argos/module_angels_argos.cpp +++ b/src-core/modules/angels/argos/module_angels_argos.cpp @@ -15,7 +15,7 @@ namespace angels { namespace argos { - AngelsArgosDecoderModule::AngelsArgosDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AngelsArgosDecoderModule::AngelsArgosDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -116,7 +116,7 @@ namespace angels return {}; } - std::shared_ptr AngelsArgosDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AngelsArgosDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/angels/argos/module_angels_argos.h b/src-core/modules/angels/argos/module_angels_argos.h index e34a648c5..ecc6d2325 100644 --- a/src-core/modules/angels/argos/module_angels_argos.h +++ b/src-core/modules/angels/argos/module_angels_argos.h @@ -13,7 +13,7 @@ namespace angels std::atomic progress; public: - AngelsArgosDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AngelsArgosDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace angels static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/aqua/instruments/airs/module_aqua_airs.cpp b/src-core/modules/aqua/instruments/airs/module_aqua_airs.cpp index 550180cac..91506d17a 100644 --- a/src-core/modules/aqua/instruments/airs/module_aqua_airs.cpp +++ b/src-core/modules/aqua/instruments/airs/module_aqua_airs.cpp @@ -19,7 +19,7 @@ namespace aqua { namespace airs { - AquaAIRSDecoderModule::AquaAIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AquaAIRSDecoderModule::AquaAIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -250,7 +250,7 @@ namespace aqua return {}; } - std::shared_ptr AquaAIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AquaAIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/aqua/instruments/airs/module_aqua_airs.h b/src-core/modules/aqua/instruments/airs/module_aqua_airs.h index 5bafeb8d9..75fe64fc5 100644 --- a/src-core/modules/aqua/instruments/airs/module_aqua_airs.h +++ b/src-core/modules/aqua/instruments/airs/module_aqua_airs.h @@ -13,7 +13,7 @@ namespace aqua std::atomic progress; public: - AquaAIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AquaAIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace aqua static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace airs } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.cpp b/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.cpp index 5670097b9..e2435f4ab 100644 --- a/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.cpp +++ b/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.cpp @@ -20,7 +20,7 @@ namespace aqua { namespace amsu { - AquaAMSUDecoderModule::AquaAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AquaAMSUDecoderModule::AquaAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -258,7 +258,7 @@ namespace aqua return {}; } - std::shared_ptr AquaAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AquaAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.h b/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.h index f041c5a2f..d7ca705a5 100644 --- a/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.h +++ b/src-core/modules/aqua/instruments/amsu/module_aqua_amsu.h @@ -13,7 +13,7 @@ namespace aqua std::atomic progress; public: - AquaAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AquaAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace aqua static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace amsu } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.cpp b/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.cpp index 93cc0e7ec..bb43634a0 100644 --- a/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.cpp +++ b/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.cpp @@ -16,7 +16,7 @@ namespace aqua { namespace ceres { - AquaCERESDecoderModule::AquaCERESDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AquaCERESDecoderModule::AquaCERESDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -197,7 +197,7 @@ namespace aqua return {}; } - std::shared_ptr AquaCERESDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AquaCERESDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.h b/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.h index 1b47fbfb5..6ad12fc1f 100644 --- a/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.h +++ b/src-core/modules/aqua/instruments/ceres/module_aqua_ceres.h @@ -13,7 +13,7 @@ namespace aqua std::atomic progress; public: - AquaCERESDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AquaCERESDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace aqua static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace ceres } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/aqua/module_aqua_db_decoder.cpp b/src-core/modules/aqua/module_aqua_db_decoder.cpp index 34bbb728d..51c90b899 100644 --- a/src-core/modules/aqua/module_aqua_db_decoder.cpp +++ b/src-core/modules/aqua/module_aqua_db_decoder.cpp @@ -18,7 +18,7 @@ size_t getFilesize(std::string filepath); namespace aqua { - AquaDBDecoderModule::AquaDBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AquaDBDecoderModule::AquaDBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new uint8_t[BUFFER_SIZE]; } @@ -276,7 +276,7 @@ namespace aqua return {}; } - std::shared_ptr AquaDBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AquaDBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/aqua/module_aqua_db_decoder.h b/src-core/modules/aqua/module_aqua_db_decoder.h index da0e28089..b14a51284 100644 --- a/src-core/modules/aqua/module_aqua_db_decoder.h +++ b/src-core/modules/aqua/module_aqua_db_decoder.h @@ -38,7 +38,7 @@ namespace aqua std::atomic progress; public: - AquaDBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AquaDBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~AquaDBDecoderModule(); void process(); void drawUI(bool window); @@ -49,6 +49,6 @@ namespace aqua static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/aura/instruments/omi/module_aura_omi.cpp b/src-core/modules/aura/instruments/omi/module_aura_omi.cpp index ac9cd28b5..644ab2b54 100644 --- a/src-core/modules/aura/instruments/omi/module_aura_omi.cpp +++ b/src-core/modules/aura/instruments/omi/module_aura_omi.cpp @@ -15,7 +15,7 @@ namespace aura { namespace omi { - AuraOMIDecoderModule::AuraOMIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + AuraOMIDecoderModule::AuraOMIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -162,7 +162,7 @@ namespace aura return {}; } - std::shared_ptr AuraOMIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr AuraOMIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/aura/instruments/omi/module_aura_omi.h b/src-core/modules/aura/instruments/omi/module_aura_omi.h index b55fe3bf9..bee93595c 100644 --- a/src-core/modules/aura/instruments/omi/module_aura_omi.h +++ b/src-core/modules/aura/instruments/omi/module_aura_omi.h @@ -13,7 +13,7 @@ namespace aura std::atomic progress; public: - AuraOMIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + AuraOMIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace aura static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace ceres } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/ccsds/module_ccsds_analyzer.cpp b/src-core/modules/ccsds/module_ccsds_analyzer.cpp index fd94414e6..362fbde7c 100644 --- a/src-core/modules/ccsds/module_ccsds_analyzer.cpp +++ b/src-core/modules/ccsds/module_ccsds_analyzer.cpp @@ -21,7 +21,7 @@ namespace ccsds { namespace analyzer { - CCSDSAnalyzerModule::CCSDSAnalyzerModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + CCSDSAnalyzerModule::CCSDSAnalyzerModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -139,7 +139,7 @@ namespace ccsds return {}; } - std::shared_ptr CCSDSAnalyzerModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr CCSDSAnalyzerModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/ccsds/module_ccsds_analyzer.h b/src-core/modules/ccsds/module_ccsds_analyzer.h index f72a981aa..85434787b 100644 --- a/src-core/modules/ccsds/module_ccsds_analyzer.h +++ b/src-core/modules/ccsds/module_ccsds_analyzer.h @@ -13,7 +13,7 @@ namespace ccsds std::atomic progress; public: - CCSDSAnalyzerModule(std::string input_file, std::string output_file_hint, std::map parameters); + CCSDSAnalyzerModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace ccsds static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/cfosat/module_cfosat_dump_decoder.cpp b/src-core/modules/cfosat/module_cfosat_dump_decoder.cpp index 5e20f72cb..defbedb95 100644 --- a/src-core/modules/cfosat/module_cfosat_dump_decoder.cpp +++ b/src-core/modules/cfosat/module_cfosat_dump_decoder.cpp @@ -18,7 +18,7 @@ size_t getFilesize(std::string filepath); namespace cfosat { - CFOSATDumpDecoderModule::CFOSATDumpDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + CFOSATDumpDecoderModule::CFOSATDumpDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new uint8_t[BUFFER_SIZE]; } @@ -188,7 +188,7 @@ namespace cfosat return {}; } - std::shared_ptr CFOSATDumpDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr CFOSATDumpDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/cfosat/module_cfosat_dump_decoder.h b/src-core/modules/cfosat/module_cfosat_dump_decoder.h index b14bc5eed..aca9915b6 100644 --- a/src-core/modules/cfosat/module_cfosat_dump_decoder.h +++ b/src-core/modules/cfosat/module_cfosat_dump_decoder.h @@ -35,7 +35,7 @@ namespace cfosat std::atomic progress; public: - CFOSATDumpDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + CFOSATDumpDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~CFOSATDumpDecoderModule(); void process(); void drawUI(bool window); @@ -44,6 +44,6 @@ namespace cfosat static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace aqua \ No newline at end of file diff --git a/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.cpp b/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.cpp index b334aee46..5cb6839ac 100644 --- a/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.cpp +++ b/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.cpp @@ -18,7 +18,7 @@ namespace elektro_arktika { namespace msugs { - MSUGSDecoderModule::MSUGSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MSUGSDecoderModule::MSUGSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -219,7 +219,7 @@ namespace elektro_arktika return {}; } - std::shared_ptr MSUGSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MSUGSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.h b/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.h index 7445aee4c..46f861d56 100644 --- a/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.h +++ b/src-core/modules/elektro_arktika/instruments/msugs/module_msugs.h @@ -15,7 +15,7 @@ namespace elektro_arktika std::atomic progress; public: - MSUGSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MSUGSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -23,7 +23,7 @@ namespace elektro_arktika static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace msugs } // namespace elektro_arktika \ No newline at end of file diff --git a/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.cpp b/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.cpp index eed027022..faf1269dd 100644 --- a/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.cpp +++ b/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.cpp @@ -16,7 +16,7 @@ namespace elektro { namespace lrit { - ELEKTROLRITDataDecoderModule::ELEKTROLRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + ELEKTROLRITDataDecoderModule::ELEKTROLRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { elektro_221_composer_full_disk = std::make_shared(); elektro_321_composer_full_disk = std::make_shared(); @@ -280,7 +280,7 @@ namespace elektro return {}; } - std::shared_ptr ELEKTROLRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ELEKTROLRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.h b/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.h index af920554f..0dfe2f6f2 100644 --- a/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.h +++ b/src-core/modules/elektro_arktika/lrit/module_elektro_lrit_data_decoder.h @@ -19,7 +19,7 @@ namespace elektro std::shared_ptr elektro_321_composer_full_disk; public: - ELEKTROLRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ELEKTROLRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~ELEKTROLRITDataDecoderModule(); void process(); void drawUI(bool window); @@ -30,7 +30,7 @@ namespace elektro static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/elektro_arktika/module_rdas_decoder.cpp b/src-core/modules/elektro_arktika/module_rdas_decoder.cpp index e326db17c..041370fc7 100644 --- a/src-core/modules/elektro_arktika/module_rdas_decoder.cpp +++ b/src-core/modules/elektro_arktika/module_rdas_decoder.cpp @@ -17,7 +17,7 @@ size_t getFilesize(std::string filepath); namespace elektro_arktika { - RDASDecoderModule::RDASDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + RDASDecoderModule::RDASDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new int8_t[BUFFER_SIZE]; } @@ -160,7 +160,7 @@ namespace elektro_arktika return {}; } - std::shared_ptr RDASDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr RDASDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/elektro_arktika/module_rdas_decoder.h b/src-core/modules/elektro_arktika/module_rdas_decoder.h index 851c880a1..032ee5c86 100644 --- a/src-core/modules/elektro_arktika/module_rdas_decoder.h +++ b/src-core/modules/elektro_arktika/module_rdas_decoder.h @@ -25,7 +25,7 @@ namespace elektro_arktika dsp::Random rng; public: - RDASDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + RDASDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~RDASDecoderModule(); void process(); void drawUI(bool window); @@ -34,6 +34,6 @@ namespace elektro_arktika static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace elektro_arktika \ No newline at end of file diff --git a/src-core/modules/elektro_arktika/module_tlm_demod.cpp b/src-core/modules/elektro_arktika/module_tlm_demod.cpp index 4de501281..798c40db9 100644 --- a/src-core/modules/elektro_arktika/module_tlm_demod.cpp +++ b/src-core/modules/elektro_arktika/module_tlm_demod.cpp @@ -8,10 +8,10 @@ size_t getFilesize(std::string filepath); namespace elektro_arktika { - TLMDemodModule::TLMDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - constellation(1, 1, demod_constellation_size) + TLMDemodModule::TLMDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + constellation(1, 1, demod_constellation_size) { // Buffers sym_buffer = new int8_t[d_buffer_size * 2]; @@ -248,7 +248,7 @@ namespace elektro_arktika return {"samplerate", "buffer_size", "baseband_format"}; } - std::shared_ptr TLMDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr TLMDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/elektro_arktika/module_tlm_demod.h b/src-core/modules/elektro_arktika/module_tlm_demod.h index fec8e2115..063372713 100644 --- a/src-core/modules/elektro_arktika/module_tlm_demod.h +++ b/src-core/modules/elektro_arktika/module_tlm_demod.h @@ -71,7 +71,7 @@ namespace elektro_arktika widgets::SNRPlotViewer snr_plot; public: - TLMDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + TLMDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~TLMDemodModule(); void init(); void stop(); @@ -84,6 +84,6 @@ namespace elektro_arktika static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } \ No newline at end of file diff --git a/src-core/modules/eos/instruments/modis/module_eos_modis.cpp b/src-core/modules/eos/instruments/modis/module_eos_modis.cpp index ab83e5e98..eee613eb6 100644 --- a/src-core/modules/eos/instruments/modis/module_eos_modis.cpp +++ b/src-core/modules/eos/instruments/modis/module_eos_modis.cpp @@ -24,9 +24,9 @@ namespace eos { namespace modis { - EOSMODISDecoderModule::EOSMODISDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - terra(std::stoi(parameters["terra_mode"])), - bowtie(std::stoi(parameters["correct_bowtie"])) + EOSMODISDecoderModule::EOSMODISDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + terra(parameters["terra_mode"].get()), + bowtie(parameters["correct_bowtie"].get()) { } @@ -461,7 +461,7 @@ namespace eos return {"terra_mode", "correct_bowtie"}; } - std::shared_ptr EOSMODISDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr EOSMODISDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/eos/instruments/modis/module_eos_modis.h b/src-core/modules/eos/instruments/modis/module_eos_modis.h index 4c7b5d2a1..b173144e9 100644 --- a/src-core/modules/eos/instruments/modis/module_eos_modis.h +++ b/src-core/modules/eos/instruments/modis/module_eos_modis.h @@ -16,7 +16,7 @@ namespace eos std::atomic progress; public: - EOSMODISDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + EOSMODISDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -24,7 +24,7 @@ namespace eos static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace modis } // namespace eos \ No newline at end of file diff --git a/src-core/modules/fengyun2/svissr/module_svissr_decoder.cpp b/src-core/modules/fengyun2/svissr/module_svissr_decoder.cpp index 6728f18de..98130a373 100644 --- a/src-core/modules/fengyun2/svissr/module_svissr_decoder.cpp +++ b/src-core/modules/fengyun2/svissr/module_svissr_decoder.cpp @@ -12,7 +12,7 @@ size_t getFilesize(std::string filepath); namespace fengyun_svissr { - SVISSRDecoderModule::SVISSRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + SVISSRDecoderModule::SVISSRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new int8_t[BUFFER_SIZE]; } @@ -170,7 +170,7 @@ namespace fengyun_svissr return {}; } - std::shared_ptr SVISSRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SVISSRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun2/svissr/module_svissr_decoder.h b/src-core/modules/fengyun2/svissr/module_svissr_decoder.h index 3432f2862..c1d2fde53 100644 --- a/src-core/modules/fengyun2/svissr/module_svissr_decoder.h +++ b/src-core/modules/fengyun2/svissr/module_svissr_decoder.h @@ -22,7 +22,7 @@ namespace fengyun_svissr dsp::Random rng; public: - SVISSRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SVISSRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~SVISSRDecoderModule(); void process(); void drawUI(bool window); @@ -33,6 +33,6 @@ namespace fengyun_svissr static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace elektro_arktika \ No newline at end of file diff --git a/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.cpp b/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.cpp index c93919619..8c1929bb8 100644 --- a/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.cpp +++ b/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.cpp @@ -109,7 +109,7 @@ namespace fengyun_svissr writingImage = false; } - SVISSRImageDecoderModule::SVISSRImageDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), + SVISSRImageDecoderModule::SVISSRImageDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), sat_name(parameters["satname"]) { frame = new uint8_t[FRAME_SIZE]; @@ -353,7 +353,7 @@ namespace fengyun_svissr return {"satname"}; } - std::shared_ptr SVISSRImageDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SVISSRImageDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.h b/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.h index 75fd5a167..1a508996a 100644 --- a/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.h +++ b/src-core/modules/fengyun2/svissr/module_svissr_image_decoder.h @@ -53,7 +53,7 @@ namespace fengyun_svissr uint32_t *textureBuffer; public: - SVISSRImageDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SVISSRImageDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~SVISSRImageDecoderModule(); void process(); void drawUI(bool window); @@ -64,6 +64,6 @@ namespace fengyun_svissr static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace elektro_arktika \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.cpp b/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.cpp index cee97adaa..e204bbb14 100644 --- a/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.cpp +++ b/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.cpp @@ -16,7 +16,7 @@ namespace fengyun3 { namespace erm { - FengyunERMDecoderModule::FengyunERMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunERMDecoderModule::FengyunERMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -144,7 +144,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunERMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunERMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.h b/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.h index a261b86c6..ea10c1f46 100644 --- a/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.h +++ b/src-core/modules/fengyun3/instruments/erm/module_fengyun_erm.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunERMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunERMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.cpp b/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.cpp index 76c73b667..2a0c8e9a1 100644 --- a/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.cpp +++ b/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.cpp @@ -17,8 +17,8 @@ namespace fengyun3 { namespace mersi1 { - FengyunMERSI1DecoderModule::FengyunMERSI1DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - bowtie(std::stoi(parameters["correct_bowtie"])) + FengyunMERSI1DecoderModule::FengyunMERSI1DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + bowtie(parameters["correct_bowtie"].get()) { } @@ -341,7 +341,7 @@ namespace fengyun3 return {"correct_bowtie"}; } - std::shared_ptr FengyunMERSI1DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMERSI1DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.h b/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.h index 1c1808c90..a03ceadc0 100644 --- a/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.h +++ b/src-core/modules/fengyun3/instruments/mersi1/module_fengyun_mersi1.h @@ -14,7 +14,7 @@ namespace fengyun3 bool bowtie; public: - FengyunMERSI1DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMERSI1DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -22,7 +22,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.cpp b/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.cpp index 20e0225c0..b98bddd5d 100644 --- a/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.cpp +++ b/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.cpp @@ -17,8 +17,8 @@ namespace fengyun3 { namespace mersi2 { - FengyunMERSI2DecoderModule::FengyunMERSI2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - bowtie(std::stoi(parameters["correct_bowtie"])) + FengyunMERSI2DecoderModule::FengyunMERSI2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + bowtie(parameters["correct_bowtie"].get()) { } @@ -379,7 +379,7 @@ namespace fengyun3 return {"correct_bowtie"}; } - std::shared_ptr FengyunMERSI2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMERSI2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.h b/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.h index af8bbefea..f27a68c91 100644 --- a/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.h +++ b/src-core/modules/fengyun3/instruments/mersi2/module_fengyun_mersi2.h @@ -14,7 +14,7 @@ namespace fengyun3 bool bowtie; public: - FengyunMERSI2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMERSI2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -22,7 +22,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.cpp b/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.cpp index 203244fbb..8e4b2998d 100644 --- a/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.cpp +++ b/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.cpp @@ -18,8 +18,8 @@ namespace fengyun3 { namespace mersill { - FengyunMERSILLDecoderModule::FengyunMERSILLDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - bowtie(std::stoi(parameters["correct_bowtie"])) + FengyunMERSILLDecoderModule::FengyunMERSILLDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + bowtie(parameters["correct_bowtie"].get()) { } @@ -256,7 +256,7 @@ namespace fengyun3 return {"correct_bowtie"}; } - std::shared_ptr FengyunMERSILLDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMERSILLDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.h b/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.h index 431474f2e..e72fba3b7 100644 --- a/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.h +++ b/src-core/modules/fengyun3/instruments/mersill/module_fengyun_mersill.h @@ -14,7 +14,7 @@ namespace fengyun3 bool bowtie; public: - FengyunMERSILLDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMERSILLDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -22,7 +22,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.cpp b/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.cpp index 15ff46004..fda1a8365 100644 --- a/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.cpp +++ b/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.cpp @@ -17,7 +17,7 @@ namespace fengyun3 { namespace mwhs { - FengyunMWHSDecoderModule::FengyunMWHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWHSDecoderModule::FengyunMWHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -167,7 +167,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.h b/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.h index 49b86bee1..16d0db957 100644 --- a/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.h +++ b/src-core/modules/fengyun3/instruments/mwhs/module_fengyun_mwhs.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.cpp b/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.cpp index f767c5afd..2834e7889 100644 --- a/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.cpp +++ b/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.cpp @@ -17,7 +17,7 @@ namespace fengyun3 { namespace mwhs2 { - FengyunMWHS2DecoderModule::FengyunMWHS2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWHS2DecoderModule::FengyunMWHS2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -180,7 +180,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWHS2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWHS2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.h b/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.h index 1fc48bf34..5c8b08a9d 100644 --- a/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.h +++ b/src-core/modules/fengyun3/instruments/mwhs2/module_fengyun_mwhs2.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWHS2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWHS2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.cpp b/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.cpp index 4d9418731..cc49e4572 100644 --- a/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.cpp +++ b/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.cpp @@ -15,7 +15,7 @@ namespace fengyun3 { namespace mwri { - FengyunMWRIDecoderModule::FengyunMWRIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWRIDecoderModule::FengyunMWRIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -136,7 +136,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWRIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWRIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.h b/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.h index a9d3ae89a..d9b6bf3e2 100644 --- a/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.h +++ b/src-core/modules/fengyun3/instruments/mwri/module_fengyun_mwri.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWRIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWRIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.cpp b/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.cpp index 1a80737fa..8cdf98d7b 100644 --- a/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.cpp +++ b/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.cpp @@ -16,7 +16,7 @@ namespace fengyun3 { namespace mwts { - FengyunMWTSDecoderModule::FengyunMWTSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWTSDecoderModule::FengyunMWTSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -162,7 +162,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWTSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWTSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.h b/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.h index e89de01d2..ba8f5f80a 100644 --- a/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.h +++ b/src-core/modules/fengyun3/instruments/mwts/module_fengyun_mwts.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWTSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWTSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.cpp b/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.cpp index fe4bf4437..d809c0cb5 100644 --- a/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.cpp +++ b/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.cpp @@ -16,7 +16,7 @@ namespace fengyun3 { namespace mwts2 { - FengyunMWTS2DecoderModule::FengyunMWTS2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWTS2DecoderModule::FengyunMWTS2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -187,7 +187,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWTS2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWTS2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.h b/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.h index 897da1cea..a5c734ac4 100644 --- a/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.h +++ b/src-core/modules/fengyun3/instruments/mwts2/module_fengyun_mwts2.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWTS2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWTS2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.cpp b/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.cpp index 67f1fcc95..67235c8e1 100644 --- a/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.cpp +++ b/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.cpp @@ -16,7 +16,7 @@ namespace fengyun3 { namespace mwts3 { - FengyunMWTS3DecoderModule::FengyunMWTS3DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunMWTS3DecoderModule::FengyunMWTS3DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -191,7 +191,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunMWTS3DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMWTS3DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.h b/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.h index b0c69336e..494047873 100644 --- a/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.h +++ b/src-core/modules/fengyun3/instruments/mwts3/module_fengyun_mwts3.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunMWTS3DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMWTS3DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace erm } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.cpp b/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.cpp index 096764b51..05caf52f8 100644 --- a/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.cpp +++ b/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.cpp @@ -21,7 +21,7 @@ namespace fengyun3 { namespace virr { - FengyunVIRRDecoderModule::FengyunVIRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunVIRRDecoderModule::FengyunVIRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -464,7 +464,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunVIRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunVIRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.h b/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.h index 2f1c21795..4bcc387ca 100644 --- a/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.h +++ b/src-core/modules/fengyun3/instruments/virr/module_fengyun_virr.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunVIRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunVIRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.cpp b/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.cpp index a94d5a5b3..e50b07e09 100644 --- a/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.cpp +++ b/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.cpp @@ -15,7 +15,7 @@ namespace fengyun3 { namespace waai { - FengyunWAAIDecoderModule::FengyunWAAIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunWAAIDecoderModule::FengyunWAAIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -106,7 +106,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunWAAIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunWAAIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.h b/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.h index b2c822ac7..f2eb3fc2a 100644 --- a/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.h +++ b/src-core/modules/fengyun3/instruments/waai/module_fengyun_waai.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunWAAIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunWAAIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.cpp b/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.cpp index 0d65ccce7..5637f53f0 100644 --- a/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.cpp +++ b/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.cpp @@ -16,7 +16,7 @@ namespace fengyun3 { namespace windrad { - FengyunWindRADDecoderModule::FengyunWindRADDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FengyunWindRADDecoderModule::FengyunWindRADDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -124,7 +124,7 @@ namespace fengyun3 return {}; } - std::shared_ptr FengyunWindRADDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunWindRADDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.h b/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.h index 04d9cbb26..ed5f63883 100644 --- a/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.h +++ b/src-core/modules/fengyun3/instruments/windrad/module_fengyun_windrad.h @@ -13,7 +13,7 @@ namespace fengyun3 std::atomic progress; public: - FengyunWindRADDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunWindRADDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace virr } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.cpp b/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.cpp index e76a8c62f..e9f8177ac 100644 --- a/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.cpp +++ b/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.cpp @@ -14,13 +14,13 @@ size_t getFilesize(std::string filepath); namespace fengyun3 { - FengyunAHRPTDecoderModule::FengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - d_invert_second_viterbi(std::stoi(parameters["invert_second_viterbi"])), - viterbi1(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE), - viterbi2(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) + FengyunAHRPTDecoderModule::FengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + d_invert_second_viterbi(parameters["invert_second_viterbi"].get()), + viterbi1(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE), + viterbi2(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE]; sym_buffer = new std::complex[BUFFER_SIZE]; @@ -337,7 +337,7 @@ namespace fengyun3 return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols", "invert_second_viterbi"}; } - std::shared_ptr FengyunAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.h b/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.h index 213ad70b1..6733b38c4 100644 --- a/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.h +++ b/src-core/modules/fengyun3/module_fengyun_ahrpt_decoder.h @@ -57,7 +57,7 @@ namespace fengyun3 float ber_history2[200]; public: - FengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~FengyunAHRPTDecoderModule(); void process(); void drawUI(bool window); @@ -66,6 +66,6 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/module_fengyun_mpt_decoder.cpp b/src-core/modules/fengyun3/module_fengyun_mpt_decoder.cpp index b7b163b93..c871cf140 100644 --- a/src-core/modules/fengyun3/module_fengyun_mpt_decoder.cpp +++ b/src-core/modules/fengyun3/module_fengyun_mpt_decoder.cpp @@ -14,12 +14,12 @@ size_t getFilesize(std::string filepath); namespace fengyun3 { - FengyunMPTDecoderModule::FengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - viterbi1(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE), - viterbi2(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) + FengyunMPTDecoderModule::FengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + viterbi1(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE), + viterbi2(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE]; sym_buffer = new std::complex[BUFFER_SIZE]; @@ -336,7 +336,7 @@ namespace fengyun3 return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols", "invert_second_viterbi"}; } - std::shared_ptr FengyunMPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengyunMPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/module_fengyun_mpt_decoder.h b/src-core/modules/fengyun3/module_fengyun_mpt_decoder.h index f8ec7a1d5..cdf207616 100644 --- a/src-core/modules/fengyun3/module_fengyun_mpt_decoder.h +++ b/src-core/modules/fengyun3/module_fengyun_mpt_decoder.h @@ -57,7 +57,7 @@ namespace fengyun3 float ber_history2[200]; public: - FengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~FengyunMPTDecoderModule(); void process(); void drawUI(bool window); @@ -66,6 +66,6 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/module_fengyun_satid.cpp b/src-core/modules/fengyun3/module_fengyun_satid.cpp index 449dd8c62..6c2434358 100644 --- a/src-core/modules/fengyun3/module_fengyun_satid.cpp +++ b/src-core/modules/fengyun3/module_fengyun_satid.cpp @@ -17,8 +17,8 @@ namespace fengyun3 { namespace satid { - FengYunSatIDModule::FengYunSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - scid_hint(parameters.count("scid_hint") > 0 ? std::stoi(parameters["scid_hint"]) : -1) + FengYunSatIDModule::FengYunSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + scid_hint(parameters.count("scid_hint") > 0 ? parameters["scid_hint"].get() : -1) { } @@ -136,7 +136,7 @@ namespace fengyun3 return {"scid_hint"}; } - std::shared_ptr FengYunSatIDModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FengYunSatIDModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/module_fengyun_satid.h b/src-core/modules/fengyun3/module_fengyun_satid.h index 8eb1b7fc9..91597a24d 100644 --- a/src-core/modules/fengyun3/module_fengyun_satid.h +++ b/src-core/modules/fengyun3/module_fengyun_satid.h @@ -15,7 +15,7 @@ namespace fengyun3 const int scid_hint; public: - FengYunSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters); + FengYunSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -23,7 +23,7 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace amsu } // namespace metop \ No newline at end of file diff --git a/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.cpp b/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.cpp index 55049f8b2..630a2a544 100644 --- a/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.cpp +++ b/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.cpp @@ -14,12 +14,12 @@ size_t getFilesize(std::string filepath); namespace fengyun3 { - NewFengyunAHRPTDecoderModule::NewFengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - d_invert_second_viterbi(std::stoi(parameters["invert_second_viterbi"])), - viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2) + NewFengyunAHRPTDecoderModule::NewFengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + d_invert_second_viterbi(parameters["invert_second_viterbi"].get()), + viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2) { viterbi_out = new uint8_t[BUFFER_SIZE]; soft_buffer = new int8_t[BUFFER_SIZE * 2]; @@ -323,7 +323,7 @@ namespace fengyun3 return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols", "invert_second_viterbi"}; } - std::shared_ptr NewFengyunAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NewFengyunAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.h b/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.h index 32b16aa4e..5379be433 100644 --- a/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.h +++ b/src-core/modules/fengyun3/module_new_fengyun_ahrpt_decoder.h @@ -52,7 +52,7 @@ namespace fengyun3 float ber_history2[200]; public: - NewFengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NewFengyunAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NewFengyunAHRPTDecoderModule(); void process(); void drawUI(bool window); @@ -63,6 +63,6 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.cpp b/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.cpp index c41bf2f9b..b0c414466 100644 --- a/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.cpp +++ b/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.cpp @@ -14,12 +14,12 @@ size_t getFilesize(std::string filepath); namespace fengyun3 { - NewFengyunMPTDecoderModule::NewFengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - viterbi1(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2), - viterbi2(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2) + NewFengyunMPTDecoderModule::NewFengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + viterbi1(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2), + viterbi2(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE / 2) { viterbi_out = new uint8_t[BUFFER_SIZE]; soft_buffer = new int8_t[BUFFER_SIZE * 2]; @@ -302,7 +302,7 @@ namespace fengyun3 return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols", "invert_second_viterbi"}; } - std::shared_ptr NewFengyunMPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NewFengyunMPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.h b/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.h index 55c7df1a0..494be3f5b 100644 --- a/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.h +++ b/src-core/modules/fengyun3/module_new_fengyun_mpt_decoder.h @@ -51,7 +51,7 @@ namespace fengyun3 float ber_history2[200]; public: - NewFengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NewFengyunMPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NewFengyunMPTDecoderModule(); void process(); void drawUI(bool window); @@ -60,6 +60,6 @@ namespace fengyun3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace fengyun \ No newline at end of file diff --git a/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.cpp b/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.cpp index 16de4da66..35b632e87 100644 --- a/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.cpp +++ b/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.cpp @@ -16,10 +16,10 @@ namespace gk2a { namespace lrit { - GK2ALRITDataDecoderModule::GK2ALRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - write_images(std::stoi(parameters["write_images"])), - write_additional(std::stoi(parameters["write_additional"])), - write_unknown(std::stoi(parameters["write_unknown"])) + GK2ALRITDataDecoderModule::GK2ALRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + write_images(parameters["write_images"].get()), + write_additional(parameters["write_additional"].get()), + write_unknown(parameters["write_unknown"].get()) { } @@ -216,7 +216,7 @@ namespace gk2a return {"write_images", "write_additional", "write_unknown"}; } - std::shared_ptr GK2ALRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr GK2ALRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.h b/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.h index 295090173..c8c1d6bd1 100644 --- a/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.h +++ b/src-core/modules/gk2a/module_gk2a_lrit_data_decoder.h @@ -20,7 +20,7 @@ namespace gk2a bool write_unknown; public: - GK2ALRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + GK2ALRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~GK2ALRITDataDecoderModule(); void process(); void drawUI(bool window); @@ -31,7 +31,7 @@ namespace gk2a static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/goes/gvar/module_gvar_decoder.cpp b/src-core/modules/goes/gvar/module_gvar_decoder.cpp index 966b22b04..9ab40f657 100644 --- a/src-core/modules/goes/gvar/module_gvar_decoder.cpp +++ b/src-core/modules/goes/gvar/module_gvar_decoder.cpp @@ -14,7 +14,7 @@ namespace goes { namespace gvar { - GVARDecoderModule::GVARDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + GVARDecoderModule::GVARDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new int8_t[BUFFER_SIZE]; } @@ -171,7 +171,7 @@ namespace goes return {}; } - std::shared_ptr GVARDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr GVARDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/goes/gvar/module_gvar_decoder.h b/src-core/modules/goes/gvar/module_gvar_decoder.h index ed0461c6e..274be2459 100644 --- a/src-core/modules/goes/gvar/module_gvar_decoder.h +++ b/src-core/modules/goes/gvar/module_gvar_decoder.h @@ -24,7 +24,7 @@ namespace goes dsp::Random rng; public: - GVARDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + GVARDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~GVARDecoderModule(); void process(); void drawUI(bool window); @@ -35,7 +35,7 @@ namespace goes static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace elektro_arktika } \ No newline at end of file diff --git a/src-core/modules/goes/gvar/module_gvar_image_decoder.cpp b/src-core/modules/goes/gvar/module_gvar_image_decoder.cpp index 2bfb76a4e..d1c8607db 100644 --- a/src-core/modules/goes/gvar/module_gvar_image_decoder.cpp +++ b/src-core/modules/goes/gvar/module_gvar_image_decoder.cpp @@ -179,7 +179,7 @@ namespace goes } } - GVARImageDecoderModule::GVARImageDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + GVARImageDecoderModule::GVARImageDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { frame = new uint8_t[FRAME_SIZE]; isImageInProgress = false; @@ -484,7 +484,7 @@ namespace goes return {}; } - std::shared_ptr GVARImageDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr GVARImageDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/goes/gvar/module_gvar_image_decoder.h b/src-core/modules/goes/gvar/module_gvar_image_decoder.h index c835b4174..c3a3a75ef 100644 --- a/src-core/modules/goes/gvar/module_gvar_image_decoder.h +++ b/src-core/modules/goes/gvar/module_gvar_image_decoder.h @@ -83,7 +83,7 @@ namespace goes uint32_t *textureBuffer; public: - GVARImageDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + GVARImageDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~GVARImageDecoderModule(); static std::string getGvarFilename(int sat_number, std::tm *timeReadable, std::string channel); void process(); @@ -95,7 +95,7 @@ namespace goes static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace elektro_arktika } \ No newline at end of file diff --git a/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.cpp b/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.cpp index 915c515a4..0172acbc6 100644 --- a/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.cpp +++ b/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.cpp @@ -16,12 +16,12 @@ namespace goes { namespace hrit { - GOESLRITDataDecoderModule::GOESLRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - write_images(std::stoi(parameters["write_images"])), - write_emwin(std::stoi(parameters["write_emwin"])), - write_messages(std::stoi(parameters["write_messages"])), - write_dcs(std::stoi(parameters["write_dcs"])), - write_unknown(std::stoi(parameters["write_unknown"])) + GOESLRITDataDecoderModule::GOESLRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + write_images(parameters["write_images"].get()), + write_emwin(parameters["write_emwin"].get()), + write_messages(parameters["write_messages"].get()), + write_dcs(parameters["write_dcs"].get()), + write_unknown(parameters["write_unknown"].get()) { goes_r_fc_composer_full_disk = std::make_shared(); goes_r_fc_composer_meso1 = std::make_shared(); @@ -338,7 +338,7 @@ namespace goes return {"write_images", "write_emwin", "write_messages", "write_dcs", "write_unknown"}; } - std::shared_ptr GOESLRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr GOESLRITDataDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.h b/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.h index a684b06a2..efc1efcd5 100644 --- a/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.h +++ b/src-core/modules/goes/hrit/module_goes_lrit_data_decoder.h @@ -27,7 +27,7 @@ namespace goes std::shared_ptr goes_r_fc_composer_meso2; public: - GOESLRITDataDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + GOESLRITDataDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~GOESLRITDataDecoderModule(); void process(); void drawUI(bool window); @@ -38,7 +38,7 @@ namespace goes static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.cpp b/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.cpp index 2572a5e7a..decca96c8 100644 --- a/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.cpp +++ b/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.cpp @@ -16,7 +16,7 @@ namespace jason3 { namespace amr2 { - Jason3AMR2DecoderModule::Jason3AMR2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + Jason3AMR2DecoderModule::Jason3AMR2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -133,7 +133,7 @@ namespace jason3 return {}; } - std::shared_ptr Jason3AMR2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr Jason3AMR2DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.h b/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.h index 065fbde9f..67e4de21e 100644 --- a/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.h +++ b/src-core/modules/jason3/instruments/amr2/module_jason3_amr2.h @@ -13,7 +13,7 @@ namespace jason3 std::atomic progress; public: - Jason3AMR2DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + Jason3AMR2DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace jason3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.cpp b/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.cpp index dded4d589..70de0c418 100644 --- a/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.cpp +++ b/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.cpp @@ -14,7 +14,7 @@ namespace jason3 { namespace lpt { - Jason3LPTDecoderModule::Jason3LPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + Jason3LPTDecoderModule::Jason3LPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -156,7 +156,7 @@ namespace jason3 return {}; } - std::shared_ptr Jason3LPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr Jason3LPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.h b/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.h index fc39ffe5e..93842c97c 100644 --- a/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.h +++ b/src-core/modules/jason3/instruments/lpt/module_jason3_lpt.h @@ -13,7 +13,7 @@ namespace jason3 std::atomic progress; public: - Jason3LPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + Jason3LPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace jason3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.cpp b/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.cpp index 573bc0ba5..40fd2adfb 100644 --- a/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.cpp +++ b/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.cpp @@ -14,7 +14,7 @@ namespace jason3 { namespace poseidon { - Jason3PoseidonDecoderModule::Jason3PoseidonDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + Jason3PoseidonDecoderModule::Jason3PoseidonDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -112,7 +112,7 @@ namespace jason3 return {}; } - std::shared_ptr Jason3PoseidonDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr Jason3PoseidonDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.h b/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.h index 0a4af5feb..837279a4b 100644 --- a/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.h +++ b/src-core/modules/jason3/instruments/poseidon/module_jason3_poseidon.h @@ -13,7 +13,7 @@ namespace jason3 std::atomic progress; public: - Jason3PoseidonDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + Jason3PoseidonDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace jason3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/jason3/module_jason3_decoder.cpp b/src-core/modules/jason3/module_jason3_decoder.cpp index 066857150..96740c391 100644 --- a/src-core/modules/jason3/module_jason3_decoder.cpp +++ b/src-core/modules/jason3/module_jason3_decoder.cpp @@ -17,7 +17,7 @@ size_t getFilesize(std::string filepath); namespace jason3 { - Jason3DecoderModule::Jason3DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), + Jason3DecoderModule::Jason3DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; @@ -228,7 +228,7 @@ namespace jason3 return {}; } - std::shared_ptr Jason3DecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr Jason3DecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jason3/module_jason3_decoder.h b/src-core/modules/jason3/module_jason3_decoder.h index f2618c2ae..73ea40da9 100644 --- a/src-core/modules/jason3/module_jason3_decoder.h +++ b/src-core/modules/jason3/module_jason3_decoder.h @@ -28,7 +28,7 @@ namespace jason3 float cor_history[200]; public: - Jason3DecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + Jason3DecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~Jason3DecoderModule(); void process(); void drawUI(bool window); @@ -39,6 +39,6 @@ namespace jason3 static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace jason3 \ No newline at end of file diff --git a/src-core/modules/jpss/instruments/atms/module_jpss_atms.cpp b/src-core/modules/jpss/instruments/atms/module_jpss_atms.cpp index 9f6effa99..f55266e8b 100644 --- a/src-core/modules/jpss/instruments/atms/module_jpss_atms.cpp +++ b/src-core/modules/jpss/instruments/atms/module_jpss_atms.cpp @@ -17,8 +17,8 @@ namespace jpss { namespace atms { - JPSSATMSDecoderModule::JPSSATMSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - npp_mode(std::stoi(parameters["npp_mode"])) + JPSSATMSDecoderModule::JPSSATMSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + npp_mode(parameters["npp_mode"].get()) { if (npp_mode) { @@ -449,7 +449,7 @@ namespace jpss return {"npp_mode"}; } - std::shared_ptr JPSSATMSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr JPSSATMSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jpss/instruments/atms/module_jpss_atms.h b/src-core/modules/jpss/instruments/atms/module_jpss_atms.h index b6da05e9c..10862c96f 100644 --- a/src-core/modules/jpss/instruments/atms/module_jpss_atms.h +++ b/src-core/modules/jpss/instruments/atms/module_jpss_atms.h @@ -17,7 +17,7 @@ namespace jpss std::atomic progress; public: - JPSSATMSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + JPSSATMSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -25,7 +25,7 @@ namespace jpss static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace atms } // namespace jpss \ No newline at end of file diff --git a/src-core/modules/jpss/instruments/omps/module_jpss_omps.cpp b/src-core/modules/jpss/instruments/omps/module_jpss_omps.cpp index f9916d581..8d3998d90 100644 --- a/src-core/modules/jpss/instruments/omps/module_jpss_omps.cpp +++ b/src-core/modules/jpss/instruments/omps/module_jpss_omps.cpp @@ -18,8 +18,8 @@ namespace jpss { namespace omps { - JPSSOMPSDecoderModule::JPSSOMPSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - npp_mode(std::stoi(parameters["npp_mode"])) + JPSSOMPSDecoderModule::JPSSOMPSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + npp_mode(parameters["npp_mode"].get()) { if (npp_mode) { @@ -179,7 +179,7 @@ namespace jpss return {"npp_mode"}; } - std::shared_ptr JPSSOMPSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr JPSSOMPSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jpss/instruments/omps/module_jpss_omps.h b/src-core/modules/jpss/instruments/omps/module_jpss_omps.h index 35c4c84f4..fed0bb69e 100644 --- a/src-core/modules/jpss/instruments/omps/module_jpss_omps.h +++ b/src-core/modules/jpss/instruments/omps/module_jpss_omps.h @@ -17,7 +17,7 @@ namespace jpss std::atomic progress; public: - JPSSOMPSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + JPSSOMPSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -25,7 +25,7 @@ namespace jpss static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace atms } // namespace jpss \ No newline at end of file diff --git a/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.cpp b/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.cpp index c84cb7b0f..4ea670c47 100644 --- a/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.cpp +++ b/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.cpp @@ -17,8 +17,8 @@ namespace jpss { namespace viirs { - JPSSVIIRSDecoderModule::JPSSVIIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - npp_mode(std::stoi(parameters["npp_mode"])) + JPSSVIIRSDecoderModule::JPSSVIIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + npp_mode(parameters["npp_mode"].get()) { if (npp_mode) { @@ -617,7 +617,7 @@ namespace jpss return {"npp_mode"}; } - std::shared_ptr JPSSVIIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr JPSSVIIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.h b/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.h index 69753c86c..be6b8f533 100644 --- a/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.h +++ b/src-core/modules/jpss/instruments/viirs/module_jpss_viirs.h @@ -17,7 +17,7 @@ namespace jpss std::atomic progress; public: - JPSSVIIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + JPSSVIIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -25,7 +25,7 @@ namespace jpss static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace atms } // namespace jpss \ No newline at end of file diff --git a/src-core/modules/jpss/module_jpss_satid.cpp b/src-core/modules/jpss/module_jpss_satid.cpp index 99616da19..0300dec55 100644 --- a/src-core/modules/jpss/module_jpss_satid.cpp +++ b/src-core/modules/jpss/module_jpss_satid.cpp @@ -17,8 +17,8 @@ namespace jpss { namespace satid { - JPSSSatIDModule::JPSSSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - scid_hint(parameters.count("scid_hint") > 0 ? std::stoi(parameters["scid_hint"]) : -1) + JPSSSatIDModule::JPSSSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + scid_hint(parameters.count("scid_hint") > 0 ? parameters["scid_hint"].get() : -1) { } @@ -121,7 +121,7 @@ namespace jpss return {"scid_hint"}; } - std::shared_ptr JPSSSatIDModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr JPSSSatIDModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/jpss/module_jpss_satid.h b/src-core/modules/jpss/module_jpss_satid.h index 153f5000f..31004235c 100644 --- a/src-core/modules/jpss/module_jpss_satid.h +++ b/src-core/modules/jpss/module_jpss_satid.h @@ -15,7 +15,7 @@ namespace jpss const int scid_hint; public: - JPSSSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters); + JPSSSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -23,7 +23,7 @@ namespace jpss static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace amsu } // namespace metop \ No newline at end of file diff --git a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.cpp b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.cpp index c35be7529..930e68c44 100644 --- a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.cpp +++ b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.cpp @@ -23,7 +23,7 @@ namespace meteor { namespace msumr { - METEORMSUMRDecoderModule::METEORMSUMRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + METEORMSUMRDecoderModule::METEORMSUMRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -307,7 +307,7 @@ namespace meteor return {}; } - std::shared_ptr METEORMSUMRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORMSUMRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.h b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.h index 1769663d9..8d9a39227 100644 --- a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.h +++ b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr.h @@ -13,7 +13,7 @@ namespace meteor std::atomic progress; public: - METEORMSUMRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORMSUMRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace msumr } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.cpp b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.cpp index 212a42a4b..adac2ee60 100644 --- a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.cpp +++ b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.cpp @@ -23,7 +23,7 @@ namespace meteor { namespace msumr { - METEORMSUMRLRPTDecoderModule::METEORMSUMRLRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + METEORMSUMRLRPTDecoderModule::METEORMSUMRLRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -233,7 +233,7 @@ namespace meteor return {}; } - std::shared_ptr METEORMSUMRLRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORMSUMRLRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.h b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.h index 7d82247ef..4755cf220 100644 --- a/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.h +++ b/src-core/modules/meteor/instruments/msumr/module_meteor_msumr_lrpt.h @@ -13,7 +13,7 @@ namespace meteor std::atomic progress; public: - METEORMSUMRLRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORMSUMRLRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace msumr } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.cpp b/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.cpp index a61dd7c18..d8d8c4b36 100644 --- a/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.cpp +++ b/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.cpp @@ -13,7 +13,7 @@ namespace meteor { namespace mtvza { - METEORMTVZADecoderModule::METEORMTVZADecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + METEORMTVZADecoderModule::METEORMTVZADecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -117,7 +117,7 @@ namespace meteor return {}; } - std::shared_ptr METEORMTVZADecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORMTVZADecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.h b/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.h index 702b3ae73..1c0cbf725 100644 --- a/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.h +++ b/src-core/modules/meteor/instruments/mtvza/module_meteor_mtvza.h @@ -13,7 +13,7 @@ namespace meteor std::atomic progress; public: - METEORMTVZADecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORMTVZADecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace mtvza } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/meteor/module_meteor_hrpt_decoder.cpp b/src-core/modules/meteor/module_meteor_hrpt_decoder.cpp index 6b8b7f67d..8f387b93f 100644 --- a/src-core/modules/meteor/module_meteor_hrpt_decoder.cpp +++ b/src-core/modules/meteor/module_meteor_hrpt_decoder.cpp @@ -10,7 +10,7 @@ size_t getFilesize(std::string filepath); namespace meteor { - METEORHRPTDecoderModule::METEORHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + METEORHRPTDecoderModule::METEORHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { def = std::make_shared(); @@ -132,7 +132,7 @@ namespace meteor return {"samplerate", "buffer_size", "baseband_format"}; } - std::shared_ptr METEORHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/module_meteor_hrpt_decoder.h b/src-core/modules/meteor/module_meteor_hrpt_decoder.h index 666b8f288..a1f7fff28 100644 --- a/src-core/modules/meteor/module_meteor_hrpt_decoder.h +++ b/src-core/modules/meteor/module_meteor_hrpt_decoder.h @@ -23,7 +23,7 @@ namespace meteor std::atomic progress; public: - METEORHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~METEORHRPTDecoderModule(); void process(); void drawUI(bool window); @@ -34,6 +34,6 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/meteor/module_meteor_hrpt_demod.cpp b/src-core/modules/meteor/module_meteor_hrpt_demod.cpp index dd163fa34..c9d7d4731 100644 --- a/src-core/modules/meteor/module_meteor_hrpt_demod.cpp +++ b/src-core/modules/meteor/module_meteor_hrpt_demod.cpp @@ -9,10 +9,10 @@ size_t getFilesize(std::string filepath); namespace meteor { - METEORHRPTDemodModule::METEORHRPTDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) + METEORHRPTDemodModule::METEORHRPTDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) { // Buffers bits_buffer = new uint8_t[d_buffer_size * 10]; @@ -181,7 +181,7 @@ namespace meteor return {"samplerate", "buffer_size", "baseband_format"}; } - std::shared_ptr METEORHRPTDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORHRPTDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/module_meteor_hrpt_demod.h b/src-core/modules/meteor/module_meteor_hrpt_demod.h index a16a2aa4c..4172c406c 100644 --- a/src-core/modules/meteor/module_meteor_hrpt_demod.h +++ b/src-core/modules/meteor/module_meteor_hrpt_demod.h @@ -51,7 +51,7 @@ namespace meteor widgets::SNRPlotViewer snr_plot; public: - METEORHRPTDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORHRPTDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~METEORHRPTDemodModule(); void init(); void stop(); @@ -64,6 +64,6 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace meteor diff --git a/src-core/modules/meteor/module_meteor_lrpt_decoder.cpp b/src-core/modules/meteor/module_meteor_lrpt_decoder.cpp index 7975d55df..97371b4a9 100644 --- a/src-core/modules/meteor/module_meteor_lrpt_decoder.cpp +++ b/src-core/modules/meteor/module_meteor_lrpt_decoder.cpp @@ -17,9 +17,9 @@ size_t getFilesize(std::string filepath); namespace meteor { - METEORLRPTDecoderModule::METEORLRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - diff_decode(std::stoi(parameters["diff_decode"])), - viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) + METEORLRPTDecoderModule::METEORLRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + diff_decode(parameters["diff_decode"].get()), + viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; } @@ -236,7 +236,7 @@ namespace meteor return {"diff_decode"}; } - std::shared_ptr METEORLRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr METEORLRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/meteor/module_meteor_lrpt_decoder.h b/src-core/modules/meteor/module_meteor_lrpt_decoder.h index c56668f03..7c0c6508a 100644 --- a/src-core/modules/meteor/module_meteor_lrpt_decoder.h +++ b/src-core/modules/meteor/module_meteor_lrpt_decoder.h @@ -30,7 +30,7 @@ namespace meteor float cor_history[200]; public: - METEORLRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + METEORLRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~METEORLRPTDecoderModule(); void process(); void drawUI(bool window); @@ -41,6 +41,6 @@ namespace meteor static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.cpp b/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.cpp index 2fef37501..f0dc2e9a8 100644 --- a/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.cpp +++ b/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.cpp @@ -17,7 +17,7 @@ namespace metop { namespace admin_msg { - MetOpAdminMsgDecoderModule::MetOpAdminMsgDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpAdminMsgDecoderModule::MetOpAdminMsgDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -161,7 +161,7 @@ namespace metop return {}; } - std::shared_ptr MetOpAdminMsgDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpAdminMsgDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.h b/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.h index 772ca9d3b..fcf8b0c90 100644 --- a/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.h +++ b/src-core/modules/metop/instruments/admin_msg/module_metop_admin_msg.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpAdminMsgDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpAdminMsgDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/amsu/module_metop_amsu.cpp b/src-core/modules/metop/instruments/amsu/module_metop_amsu.cpp index 13745f996..04f0dfebb 100644 --- a/src-core/modules/metop/instruments/amsu/module_metop_amsu.cpp +++ b/src-core/modules/metop/instruments/amsu/module_metop_amsu.cpp @@ -20,7 +20,7 @@ namespace metop { namespace amsu { - MetOpAMSUDecoderModule::MetOpAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpAMSUDecoderModule::MetOpAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -249,7 +249,7 @@ namespace metop return {}; } - std::shared_ptr MetOpAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/amsu/module_metop_amsu.h b/src-core/modules/metop/instruments/amsu/module_metop_amsu.h index e1e323e05..4faa04a72 100644 --- a/src-core/modules/metop/instruments/amsu/module_metop_amsu.h +++ b/src-core/modules/metop/instruments/amsu/module_metop_amsu.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace amsu } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/ascat/module_metop_ascat.cpp b/src-core/modules/metop/instruments/ascat/module_metop_ascat.cpp index 7c074248a..927a3494b 100644 --- a/src-core/modules/metop/instruments/ascat/module_metop_ascat.cpp +++ b/src-core/modules/metop/instruments/ascat/module_metop_ascat.cpp @@ -20,7 +20,7 @@ namespace metop { namespace ascat { - MetOpASCATDecoderModule::MetOpASCATDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpASCATDecoderModule::MetOpASCATDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -224,7 +224,7 @@ namespace metop return {}; } - std::shared_ptr MetOpASCATDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpASCATDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/ascat/module_metop_ascat.h b/src-core/modules/metop/instruments/ascat/module_metop_ascat.h index 6b5e88fb4..cbb09945a 100644 --- a/src-core/modules/metop/instruments/ascat/module_metop_ascat.h +++ b/src-core/modules/metop/instruments/ascat/module_metop_ascat.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpASCATDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpASCATDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace mhs } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.cpp b/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.cpp index 8a5d27724..2f7becd0b 100644 --- a/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.cpp +++ b/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.cpp @@ -25,7 +25,7 @@ namespace metop { namespace avhrr { - MetOpAVHRRDecoderModule::MetOpAVHRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpAVHRRDecoderModule::MetOpAVHRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -351,7 +351,7 @@ namespace metop return {}; } - std::shared_ptr MetOpAVHRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpAVHRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.h b/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.h index abdad429b..9a8f54821 100644 --- a/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.h +++ b/src-core/modules/metop/instruments/avhrr/module_metop_avhrr.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpAVHRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpAVHRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/gome/module_metop_gome.cpp b/src-core/modules/metop/instruments/gome/module_metop_gome.cpp index 5c5dc73df..9c88656fe 100644 --- a/src-core/modules/metop/instruments/gome/module_metop_gome.cpp +++ b/src-core/modules/metop/instruments/gome/module_metop_gome.cpp @@ -16,8 +16,8 @@ namespace metop { namespace gome { - MetOpGOMEDecoderModule::MetOpGOMEDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - write_all(std::stoi(parameters["write_all"])) + MetOpGOMEDecoderModule::MetOpGOMEDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + write_all(parameters["write_all"].get()) { } @@ -142,7 +142,7 @@ namespace metop return {}; } - std::shared_ptr MetOpGOMEDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpGOMEDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/gome/module_metop_gome.h b/src-core/modules/metop/instruments/gome/module_metop_gome.h index 5fef6cbd9..2b0e97b9a 100644 --- a/src-core/modules/metop/instruments/gome/module_metop_gome.h +++ b/src-core/modules/metop/instruments/gome/module_metop_gome.h @@ -15,7 +15,7 @@ namespace metop std::atomic progress; public: - MetOpGOMEDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpGOMEDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -23,7 +23,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace gome } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/iasi/module_metop_iasi.cpp b/src-core/modules/metop/instruments/iasi/module_metop_iasi.cpp index 8409939da..1cfeb8b4e 100644 --- a/src-core/modules/metop/instruments/iasi/module_metop_iasi.cpp +++ b/src-core/modules/metop/instruments/iasi/module_metop_iasi.cpp @@ -22,8 +22,8 @@ namespace metop { namespace iasi { - MetOpIASIDecoderModule::MetOpIASIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - write_all(std::stoi(parameters["write_all"])) + MetOpIASIDecoderModule::MetOpIASIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + write_all(parameters["write_all"].get()) { } @@ -189,7 +189,7 @@ namespace metop projected_image = geodetic::projection::projectLEOToEquirectangularMapped(iasi_imaging_equ_inv, projector, 2048 * 4, 1024 * 4, 1); WRITE_IMAGE(projected_image, directory + "/IASI-EQU-INV-PROJ.png"); - /* + /* logger->info("Projected channel IMG LUT..."); cimg_library::CImg lut_16 = thermalTest; lut_16 <<= 8; @@ -242,7 +242,7 @@ namespace metop return {"write_all"}; } - std::shared_ptr MetOpIASIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpIASIDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/iasi/module_metop_iasi.h b/src-core/modules/metop/instruments/iasi/module_metop_iasi.h index d5284451c..e74fd5caa 100644 --- a/src-core/modules/metop/instruments/iasi/module_metop_iasi.h +++ b/src-core/modules/metop/instruments/iasi/module_metop_iasi.h @@ -15,7 +15,7 @@ namespace metop std::atomic progress; public: - MetOpIASIDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpIASIDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -23,7 +23,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace iasi } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/mhs/module_metop_mhs.cpp b/src-core/modules/metop/instruments/mhs/module_metop_mhs.cpp index fb5bce33d..a980bd825 100644 --- a/src-core/modules/metop/instruments/mhs/module_metop_mhs.cpp +++ b/src-core/modules/metop/instruments/mhs/module_metop_mhs.cpp @@ -19,7 +19,7 @@ namespace metop { namespace mhs { - MetOpMHSDecoderModule::MetOpMHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpMHSDecoderModule::MetOpMHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -186,7 +186,7 @@ namespace metop return {}; } - std::shared_ptr MetOpMHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpMHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/mhs/module_metop_mhs.h b/src-core/modules/metop/instruments/mhs/module_metop_mhs.h index 3e62e0326..df53af7b6 100644 --- a/src-core/modules/metop/instruments/mhs/module_metop_mhs.h +++ b/src-core/modules/metop/instruments/mhs/module_metop_mhs.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpMHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpMHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace mhs } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/instruments/sem/module_metop_sem.cpp b/src-core/modules/metop/instruments/sem/module_metop_sem.cpp index dee20330f..7f3838caf 100644 --- a/src-core/modules/metop/instruments/sem/module_metop_sem.cpp +++ b/src-core/modules/metop/instruments/sem/module_metop_sem.cpp @@ -18,7 +18,7 @@ namespace metop { namespace sem { - MetOpSEMDecoderModule::MetOpSEMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpSEMDecoderModule::MetOpSEMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -119,7 +119,7 @@ namespace metop return {}; } - std::shared_ptr MetOpSEMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpSEMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/instruments/sem/module_metop_sem.h b/src-core/modules/metop/instruments/sem/module_metop_sem.h index 92723532d..b99517a96 100644 --- a/src-core/modules/metop/instruments/sem/module_metop_sem.h +++ b/src-core/modules/metop/instruments/sem/module_metop_sem.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpSEMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpSEMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace mhs } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/module_metop_ahrpt_decoder.cpp b/src-core/modules/metop/module_metop_ahrpt_decoder.cpp index 4aed8911e..b9f7bca79 100644 --- a/src-core/modules/metop/module_metop_ahrpt_decoder.cpp +++ b/src-core/modules/metop/module_metop_ahrpt_decoder.cpp @@ -10,12 +10,12 @@ size_t getFilesize(std::string filepath); namespace metop { - MetOpAHRPTDecoderModule::MetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - sw(0), - viterbi(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) + MetOpAHRPTDecoderModule::MetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + sw(0), + viterbi(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE * 2]; sym_buffer = new std::complex[BUFFER_SIZE]; @@ -203,7 +203,7 @@ namespace metop return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols"}; } - std::shared_ptr MetOpAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/module_metop_ahrpt_decoder.h b/src-core/modules/metop/module_metop_ahrpt_decoder.h index ec25267f2..f1b2319e6 100644 --- a/src-core/modules/metop/module_metop_ahrpt_decoder.h +++ b/src-core/modules/metop/module_metop_ahrpt_decoder.h @@ -38,7 +38,7 @@ namespace metop float ber_history[200]; public: - MetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~MetOpAHRPTDecoderModule(); void process(); void drawUI(bool window); @@ -47,6 +47,6 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/module_metop_dump_decoder.cpp b/src-core/modules/metop/module_metop_dump_decoder.cpp index bab678730..4379b1f4e 100644 --- a/src-core/modules/metop/module_metop_dump_decoder.cpp +++ b/src-core/modules/metop/module_metop_dump_decoder.cpp @@ -15,7 +15,7 @@ size_t getFilesize(std::string filepath); namespace metop { - MetOpDumpDecoderModule::MetOpDumpDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpDumpDecoderModule::MetOpDumpDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; } @@ -208,7 +208,7 @@ namespace metop return {}; } - std::shared_ptr MetOpDumpDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpDumpDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/module_metop_dump_decoder.h b/src-core/modules/metop/module_metop_dump_decoder.h index 623c08078..2466136b4 100644 --- a/src-core/modules/metop/module_metop_dump_decoder.h +++ b/src-core/modules/metop/module_metop_dump_decoder.h @@ -24,7 +24,7 @@ namespace metop float cor_history[200]; public: - MetOpDumpDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpDumpDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~MetOpDumpDecoderModule(); void process(); void drawUI(bool window); @@ -35,6 +35,6 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/metop/module_metop_satid.cpp b/src-core/modules/metop/module_metop_satid.cpp index e9803a815..94fc5e82f 100644 --- a/src-core/modules/metop/module_metop_satid.cpp +++ b/src-core/modules/metop/module_metop_satid.cpp @@ -17,7 +17,7 @@ namespace metop { namespace satid { - MetOpSatIDModule::MetOpSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + MetOpSatIDModule::MetOpSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -112,7 +112,7 @@ namespace metop return {}; } - std::shared_ptr MetOpSatIDModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr MetOpSatIDModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/module_metop_satid.h b/src-core/modules/metop/module_metop_satid.h index feef70cb4..0f48fa642 100644 --- a/src-core/modules/metop/module_metop_satid.h +++ b/src-core/modules/metop/module_metop_satid.h @@ -13,7 +13,7 @@ namespace metop std::atomic progress; public: - MetOpSatIDModule(std::string input_file, std::string output_file_hint, std::map parameters); + MetOpSatIDModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace amsu } // namespace metop \ No newline at end of file diff --git a/src-core/modules/metop/module_new_metop_ahrpt_decoder.cpp b/src-core/modules/metop/module_new_metop_ahrpt_decoder.cpp index 666e47383..dc73510cb 100644 --- a/src-core/modules/metop/module_new_metop_ahrpt_decoder.cpp +++ b/src-core/modules/metop/module_new_metop_ahrpt_decoder.cpp @@ -10,10 +10,10 @@ size_t getFilesize(std::string filepath); namespace metop { - NewMetOpAHRPTDecoderModule::NewMetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) + NewMetOpAHRPTDecoderModule::NewMetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE * 2]; soft_buffer = new int8_t[BUFFER_SIZE]; @@ -205,7 +205,7 @@ namespace metop return {"viterbi_outsync_after", "viterbi_ber_thresold"}; } - std::shared_ptr NewMetOpAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NewMetOpAHRPTDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/metop/module_new_metop_ahrpt_decoder.h b/src-core/modules/metop/module_new_metop_ahrpt_decoder.h index f2b0fd6f8..70f69ce78 100644 --- a/src-core/modules/metop/module_new_metop_ahrpt_decoder.h +++ b/src-core/modules/metop/module_new_metop_ahrpt_decoder.h @@ -33,7 +33,7 @@ namespace metop float ber_history[200]; public: - NewMetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NewMetOpAHRPTDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NewMetOpAHRPTDecoderModule(); void process(); void drawUI(bool window); @@ -44,6 +44,6 @@ namespace metop static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace metop \ No newline at end of file diff --git a/src-core/modules/module_8psk_demod.cpp b/src-core/modules/module_8psk_demod.cpp index 6fb87b2be..3fa7cce58 100644 --- a/src-core/modules/module_8psk_demod.cpp +++ b/src-core/modules/module_8psk_demod.cpp @@ -6,21 +6,21 @@ // Return filesize size_t getFilesize(std::string filepath); -PSK8DemodModule::PSK8DemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_agc_rate(std::stof(parameters["agc_rate"])), - d_samplerate(std::stoi(parameters["samplerate"])), - d_symbolrate(std::stoi(parameters["symbolrate"])), - d_rrc_alpha(std::stof(parameters["rrc_alpha"])), - d_rrc_taps(std::stoi(parameters["rrc_taps"])), - d_loop_bw(std::stof(parameters["costas_bw"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_dc_block(parameters.count("dc_block") > 0 ? std::stoi(parameters["dc_block"]) : 0), - d_iq_swap(parameters.count("iq_swap") > 0 ? std::stoi(parameters["iq_swap"]) : 0), - d_clock_gain_omega(parameters.count("clock_gain_omega") > 0 ? std::stof(parameters["clock_gain_omega"]) : (pow(8.7e-3, 2) / 4.0)), - d_clock_mu(parameters.count("clock_mu") > 0 ? std::stof(parameters["clock_mu"]) : 0.5f), - d_clock_gain_mu(parameters.count("clock_gain_mu") > 0 ? std::stof(parameters["clock_gain_mu"]) : 8.7e-3), - d_clock_omega_relative_limit(parameters.count("clock_omega_relative_limit") > 0 ? std::stof(parameters["clock_omega_relative_limit"]) : 0.005f), - constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) +PSK8DemodModule::PSK8DemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_agc_rate(parameters["agc_rate"].get()), + d_samplerate(parameters["samplerate"].get()), + d_symbolrate(parameters["symbolrate"].get()), + d_rrc_alpha(parameters["rrc_alpha"].get()), + d_rrc_taps(parameters["rrc_taps"].get()), + d_loop_bw(parameters["costas_bw"].get()), + d_buffer_size(parameters["buffer_size"].get()), + d_dc_block(parameters.count("dc_block") > 0 ? parameters["dc_block"].get() : 0), + d_iq_swap(parameters.count("iq_swap") > 0 ? parameters["iq_swap"].get() : 0), + d_clock_gain_omega(parameters.count("clock_gain_omega") > 0 ? parameters["clock_gain_omega"].get() : (pow(8.7e-3, 2) / 4.0)), + d_clock_mu(parameters.count("clock_mu") > 0 ? parameters["clock_mu"].get() : 0.5f), + d_clock_gain_mu(parameters.count("clock_gain_mu") > 0 ? parameters["clock_gain_mu"].get() : 8.7e-3), + d_clock_omega_relative_limit(parameters.count("clock_omega_relative_limit") > 0 ? parameters["clock_omega_relative_limit"].get() : 0.005f), + constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) { // Buffers sym_buffer = new int8_t[d_buffer_size * 2]; @@ -221,7 +221,7 @@ std::vector PSK8DemodModule::getParameters() return {"samplerate", "symbolrate", "agc_rate", "rrc_alpha", "rrc_taps", "costas_bw", "iq_invert", "buffer_size", "dc_block", "baseband_format", "clock_gain_omega", "clock_mu", "clock_gain_mu", "clock_omega_relative_limit"}; } -std::shared_ptr PSK8DemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) +std::shared_ptr PSK8DemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/module_8psk_demod.h b/src-core/modules/module_8psk_demod.h index fe92790d0..29396b14f 100644 --- a/src-core/modules/module_8psk_demod.h +++ b/src-core/modules/module_8psk_demod.h @@ -69,7 +69,7 @@ protected: widgets::SNRPlotViewer snr_plot; public: - PSK8DemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + PSK8DemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~PSK8DemodModule(); void init(); void stop(); @@ -82,5 +82,5 @@ public: static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; diff --git a/src-core/modules/module_bpsk_demod.cpp b/src-core/modules/module_bpsk_demod.cpp index 79fe6a354..47d4ca5cc 100644 --- a/src-core/modules/module_bpsk_demod.cpp +++ b/src-core/modules/module_bpsk_demod.cpp @@ -6,16 +6,16 @@ // Return filesize size_t getFilesize(std::string filepath); -BPSKDemodModule::BPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_agc_rate(std::stof(parameters["agc_rate"])), - d_samplerate(std::stoi(parameters["samplerate"])), - d_symbolrate(std::stoi(parameters["symbolrate"])), - d_rrc_alpha(std::stof(parameters["rrc_alpha"])), - d_rrc_taps(std::stoi(parameters["rrc_taps"])), - d_loop_bw(std::stof(parameters["costas_bw"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_dc_block(parameters.count("dc_block") > 0 ? std::stoi(parameters["dc_block"]) : 0), - constellation(0.5f, 0.5f, demod_constellation_size) +BPSKDemodModule::BPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_agc_rate(parameters["agc_rate"].get()), + d_samplerate(parameters["samplerate"].get()), + d_symbolrate(parameters["symbolrate"].get()), + d_rrc_alpha(parameters["rrc_alpha"].get()), + d_rrc_taps(parameters["rrc_taps"].get()), + d_loop_bw(parameters["costas_bw"].get()), + d_buffer_size(parameters["buffer_size"].get()), + d_dc_block(parameters.count("dc_block") > 0 ? parameters["dc_block"].get() : 0), + constellation(0.5f, 0.5f, demod_constellation_size) { // Buffers sym_buffer = new int8_t[d_buffer_size * 2]; @@ -65,10 +65,10 @@ void BPSKDemodModule::init() pll = std::make_shared(rrc->output_stream, d_loop_bw, 2); // Clock recovery - float omega_gain = d_parameters.count("clock_gain_omega") > 0 ? std::stoi(d_parameters["clock_gain_omega"]) : (pow(8.7e-3, 2) / 4.0); - float mu = d_parameters.count("clock_mu") > 0 ? std::stoi(d_parameters["clock_mu"]) : 0.5f; - float mu_gain = d_parameters.count("clock_gain_mu") > 0 ? std::stoi(d_parameters["clock_gain_mu"]) : 8.7e-3; - float omegaLimit = d_parameters.count("clock_omega_relative_limit") > 0 ? std::stof(d_parameters["clock_omega_relative_limit"]) : 0.005f; + float omega_gain = d_parameters.count("clock_gain_omega") > 0 ? d_parameters["clock_gain_omega"].get() : (pow(8.7e-3, 2) / 4.0); + float mu = d_parameters.count("clock_mu") > 0 ? d_parameters["clock_mu"].get() : 0.5f; + float mu_gain = d_parameters.count("clock_gain_mu") > 0 ? d_parameters["clock_gain_mu"].get() : 8.7e-3; + float omegaLimit = d_parameters.count("clock_omega_relative_limit") > 0 ? d_parameters["clock_omega_relative_limit"].get() : 0.005f; rec = std::make_shared(pll->output_stream, sps, omega_gain, mu, mu_gain, omegaLimit); } @@ -218,7 +218,7 @@ std::vector BPSKDemodModule::getParameters() return {"samplerate", "symbolrate", "agc_rate", "rrc_alpha", "rrc_taps", "costas_bw", "iq_invert", "buffer_size", "dc_block", "clock_gain_omega", "clock_mu", "clock_gain_mu", "clock_omega_relative_limit", "baseband_format"}; } -std::shared_ptr BPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) +std::shared_ptr BPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/module_bpsk_demod.h b/src-core/modules/module_bpsk_demod.h index 25d8102d4..d9e5f41ee 100644 --- a/src-core/modules/module_bpsk_demod.h +++ b/src-core/modules/module_bpsk_demod.h @@ -62,7 +62,7 @@ protected: widgets::SNRPlotViewer snr_plot; public: - BPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + BPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~BPSKDemodModule(); void init(); void stop(); @@ -75,5 +75,5 @@ public: static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; diff --git a/src-core/modules/module_fsk_demod.cpp b/src-core/modules/module_fsk_demod.cpp index d06594ad1..182db080b 100644 --- a/src-core/modules/module_fsk_demod.cpp +++ b/src-core/modules/module_fsk_demod.cpp @@ -7,13 +7,13 @@ // Return filesize size_t getFilesize(std::string filepath); -FSKDemodModule::FSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_symbolrate(std::stoi(parameters["symbolrate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_lpf_cutoff(std::stoi(parameters["lpf_cutoff"])), - d_lpf_transition_width(std::stoi(parameters["lpf_transition_width"])), - constellation(45.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) +FSKDemodModule::FSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_symbolrate(parameters["symbolrate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + d_lpf_cutoff(parameters["lpf_cutoff"].get()), + d_lpf_transition_width(parameters["lpf_transition_width"].get()), + constellation(45.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) { // Buffers sym_buffer = new int8_t[d_buffer_size * 10]; @@ -139,7 +139,7 @@ std::vector FSKDemodModule::getParameters() return {"samplerate", "buffer_size", "baseband_format", "symbolrate", "lpf_cutoff", "lpf_transition_width"}; } -std::shared_ptr FSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) +std::shared_ptr FSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } \ No newline at end of file diff --git a/src-core/modules/module_fsk_demod.h b/src-core/modules/module_fsk_demod.h index 36188a2cf..88078b85d 100644 --- a/src-core/modules/module_fsk_demod.h +++ b/src-core/modules/module_fsk_demod.h @@ -47,7 +47,7 @@ protected: widgets::ConstellationViewer constellation; public: - FSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + FSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~FSKDemodModule(); void init(); void stop(); @@ -60,5 +60,5 @@ public: static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; \ No newline at end of file diff --git a/src-core/modules/module_oqpsk_demod.cpp b/src-core/modules/module_oqpsk_demod.cpp index 67c478a04..5ba0a0483 100644 --- a/src-core/modules/module_oqpsk_demod.cpp +++ b/src-core/modules/module_oqpsk_demod.cpp @@ -6,22 +6,22 @@ // Return filesize size_t getFilesize(std::string filepath); -OQPSKDemodModule::OQPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_agc_rate(std::stof(parameters["agc_rate"])), - d_samplerate(std::stoi(parameters["samplerate"])), - d_symbolrate(std::stoi(parameters["symbolrate"])), - d_rrc_alpha(std::stof(parameters["rrc_alpha"])), - d_rrc_taps(std::stoi(parameters["rrc_taps"])), - d_loop_bw(std::stof(parameters["costas_bw"])), - d_dc_block(std::stoi(parameters["dc_block"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_const_scale(std::stof(parameters["constellation_scale"])), - d_iq_swap(parameters.count("iq_swap") > 0 ? std::stoi(parameters["iq_swap"]) : 0), - d_clock_gain_omega(std::stof(parameters["clock_gain_omega"])), - d_clock_mu(std::stof(parameters["clock_mu"])), - d_clock_gain_mu(std::stof(parameters["clock_gain_mu"])), - d_clock_omega_relative_limit(std::stof(parameters["clock_omega_relative_limit"])), - constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) +OQPSKDemodModule::OQPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_agc_rate(parameters["agc_rate"].get()), + d_samplerate(parameters["samplerate"].get()), + d_symbolrate(parameters["symbolrate"].get()), + d_rrc_alpha(parameters["rrc_alpha"].get()), + d_rrc_taps(parameters["rrc_taps"].get()), + d_loop_bw(parameters["costas_bw"].get()), + d_dc_block(parameters.count("dc_block") > 0 ? parameters["dc_block"].get() : 0), + d_buffer_size(parameters["buffer_size"].get()), + d_const_scale(parameters["constellation_scale"].get()), + d_iq_swap(parameters.count("iq_swap") > 0 ? parameters["iq_swap"].get() : 0), + d_clock_gain_omega(parameters["clock_gain_omega"].get()), + d_clock_mu(parameters["clock_mu"].get()), + d_clock_gain_mu(parameters["clock_gain_mu"].get()), + d_clock_omega_relative_limit(parameters["clock_omega_relative_limit"].get()), + constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) { // Buffers @@ -225,7 +225,7 @@ std::vector OQPSKDemodModule::getParameters() return {"samplerate", "symbolrate", "agc_rate", "rrc_alpha", "rrc_taps", "costas_bw", "iq_invert", "buffer_size", "clock_gain_omega", "clock_mu", "clock_gain_mu", "clock_omega_relative_limit", "constellation_scale", "baseband_format"}; } -std::shared_ptr OQPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) +std::shared_ptr OQPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/module_oqpsk_demod.h b/src-core/modules/module_oqpsk_demod.h index f17a3a2b4..491874a50 100644 --- a/src-core/modules/module_oqpsk_demod.h +++ b/src-core/modules/module_oqpsk_demod.h @@ -71,7 +71,7 @@ protected: widgets::SNRPlotViewer snr_plot; public: - OQPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + OQPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~OQPSKDemodModule(); void init(); void stop(); @@ -84,5 +84,5 @@ public: static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; diff --git a/src-core/modules/module_qpsk_demod.cpp b/src-core/modules/module_qpsk_demod.cpp index a90a9ef7c..0b2f8984c 100644 --- a/src-core/modules/module_qpsk_demod.cpp +++ b/src-core/modules/module_qpsk_demod.cpp @@ -12,21 +12,21 @@ size_t getFilesize(std::string filepath) return fileSize; } -QPSKDemodModule::QPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_agc_rate(std::stof(parameters["agc_rate"])), - d_samplerate(std::stoi(parameters["samplerate"])), - d_symbolrate(std::stoi(parameters["symbolrate"])), - d_rrc_alpha(std::stof(parameters["rrc_alpha"])), - d_rrc_taps(std::stoi(parameters["rrc_taps"])), - d_loop_bw(std::stof(parameters["costas_bw"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_dc_block(parameters.count("dc_block") > 0 ? std::stoi(parameters["dc_block"]) : 0), - d_iq_swap(parameters.count("iq_swap") > 0 ? std::stoi(parameters["iq_swap"]) : 0), - d_clock_gain_omega(parameters.count("clock_gain_omega") > 0 ? std::stof(parameters["clock_gain_omega"]) : (pow(8.7e-3, 2) / 4.0)), - d_clock_mu(parameters.count("clock_mu") > 0 ? std::stof(parameters["clock_mu"]) : 0.5f), - d_clock_gain_mu(parameters.count("clock_gain_mu") > 0 ? std::stof(parameters["clock_gain_mu"]) : 8.7e-3), - d_clock_omega_relative_limit(parameters.count("clock_omega_relative_limit") > 0 ? std::stof(parameters["clock_omega_relative_limit"]) : 0.005f), - constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) +QPSKDemodModule::QPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_agc_rate(parameters["agc_rate"].get()), + d_samplerate(parameters["samplerate"].get()), + d_symbolrate(parameters["symbolrate"].get()), + d_rrc_alpha(parameters["rrc_alpha"].get()), + d_rrc_taps(parameters["rrc_taps"].get()), + d_loop_bw(parameters["costas_bw"].get()), + d_buffer_size(parameters["buffer_size"].get()), + d_dc_block(parameters.count("dc_block") > 0 ? parameters["dc_block"].get() : 0), + d_iq_swap(parameters.count("iq_swap") > 0 ? parameters["iq_swap"].get() : 0), + d_clock_gain_omega(parameters.count("clock_gain_omega") > 0 ? parameters["clock_gain_omega"].get() : (pow(8.7e-3, 2) / 4.0)), + d_clock_mu(parameters.count("clock_mu") > 0 ? parameters["clock_mu"].get() : 0.5f), + d_clock_gain_mu(parameters.count("clock_gain_mu") > 0 ? parameters["clock_gain_mu"].get() : 8.7e-3), + d_clock_omega_relative_limit(parameters.count("clock_omega_relative_limit") > 0 ? parameters["clock_omega_relative_limit"].get() : 0.005f), + constellation(100.0f / 127.0f, 100.0f / 127.0f, demod_constellation_size) { // Buffers sym_buffer = new int8_t[d_buffer_size * 2]; @@ -227,7 +227,7 @@ std::vector QPSKDemodModule::getParameters() return {"samplerate", "symbolrate", "agc_rate", "rrc_alpha", "rrc_taps", "costas_bw", "iq_invert", "buffer_size", "dc_block", "baseband_format", "clock_gain_omega", "clock_mu", "clock_gain_mu", "clock_omega_relative_limit"}; } -std::shared_ptr QPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) +std::shared_ptr QPSKDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/module_qpsk_demod.h b/src-core/modules/module_qpsk_demod.h index 6b2e39f4c..abb6489cc 100644 --- a/src-core/modules/module_qpsk_demod.h +++ b/src-core/modules/module_qpsk_demod.h @@ -69,7 +69,7 @@ protected: widgets::SNRPlotViewer snr_plot; public: - QPSKDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + QPSKDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~QPSKDemodModule(); void init(); void stop(); @@ -82,5 +82,5 @@ public: static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; diff --git a/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.cpp b/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.cpp index 669262001..9c869d8f5 100644 --- a/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.cpp +++ b/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.cpp @@ -14,7 +14,7 @@ namespace noaa { namespace amsu { - NOAAAMSUDecoderModule::NOAAAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + NOAAAMSUDecoderModule::NOAAAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -92,7 +92,7 @@ namespace noaa return {}; } - std::shared_ptr NOAAAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAAMSUDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.h b/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.h index eb3e0de97..319d8dd4e 100644 --- a/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.h +++ b/src-core/modules/noaa/instruments/amsu/module_noaa_amsu.h @@ -13,7 +13,7 @@ namespace noaa std::atomic progress; public: - NOAAAMSUDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAAMSUDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace AMSU } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.cpp b/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.cpp index 404b65380..efef89df2 100644 --- a/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.cpp +++ b/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.cpp @@ -20,7 +20,7 @@ namespace noaa { namespace avhrr { - NOAAAVHRRDecoderModule::NOAAAVHRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + NOAAAVHRRDecoderModule::NOAAAVHRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -251,7 +251,7 @@ namespace noaa return {}; } - std::shared_ptr NOAAAVHRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAAVHRRDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.h b/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.h index 9ae501e9b..bdf7149b2 100644 --- a/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.h +++ b/src-core/modules/noaa/instruments/avhrr/module_noaa_avhrr.h @@ -13,7 +13,7 @@ namespace noaa std::atomic progress; public: - NOAAAVHRRDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAAVHRRDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.cpp b/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.cpp index 74b2b9ece..9cc821840 100644 --- a/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.cpp +++ b/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.cpp @@ -14,7 +14,7 @@ namespace noaa { namespace hirs { - NOAAHIRSDecoderModule::NOAAHIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + NOAAHIRSDecoderModule::NOAAHIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -97,7 +97,7 @@ namespace noaa return {}; } - std::shared_ptr NOAAHIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAHIRSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.h b/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.h index 36cf750ae..a362a8c6b 100644 --- a/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.h +++ b/src-core/modules/noaa/instruments/hirs/module_noaa_hirs.h @@ -13,7 +13,7 @@ namespace noaa std::atomic progress; public: - NOAAHIRSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAHIRSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace hirs } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.cpp b/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.cpp index 627914d61..ffff1e489 100644 --- a/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.cpp +++ b/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.cpp @@ -15,7 +15,7 @@ namespace noaa { namespace mhs { - NOAAMHSDecoderModule::NOAAMHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + NOAAMHSDecoderModule::NOAAMHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -121,7 +121,7 @@ namespace noaa return {}; } - std::shared_ptr NOAAMHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAMHSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.h b/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.h index c555426fc..6e4438dec 100644 --- a/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.h +++ b/src-core/modules/noaa/instruments/mhs/module_noaa_mhs.h @@ -13,7 +13,7 @@ namespace noaa std::atomic progress; public: - NOAAMHSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAMHSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace MHS } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/noaa/module_noaa_dsb_demod.cpp b/src-core/modules/noaa/module_noaa_dsb_demod.cpp index 0952a8e04..ccc89f240 100644 --- a/src-core/modules/noaa/module_noaa_dsb_demod.cpp +++ b/src-core/modules/noaa/module_noaa_dsb_demod.cpp @@ -10,10 +10,10 @@ size_t getFilesize(std::string filepath); namespace noaa { - NOAADSBDemodModule::NOAADSBDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) + NOAADSBDemodModule::NOAADSBDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) { snr = 0; peak_snr = 0; @@ -219,7 +219,7 @@ namespace noaa return {"samplerate", "buffer_size", "baseband_format"}; } - std::shared_ptr NOAADSBDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAADSBDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/module_noaa_dsb_demod.h b/src-core/modules/noaa/module_noaa_dsb_demod.h index 1f82a1185..fe9b56207 100644 --- a/src-core/modules/noaa/module_noaa_dsb_demod.h +++ b/src-core/modules/noaa/module_noaa_dsb_demod.h @@ -58,7 +58,7 @@ namespace noaa widgets::SNRPlotViewer snr_plot; public: - NOAADSBDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAADSBDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NOAADSBDemodModule(); void process(); void drawUI(bool window); @@ -67,6 +67,6 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace noaa diff --git a/src-core/modules/noaa/module_noaa_extractor.cpp b/src-core/modules/noaa/module_noaa_extractor.cpp index a017a9943..d99d21d47 100644 --- a/src-core/modules/noaa/module_noaa_extractor.cpp +++ b/src-core/modules/noaa/module_noaa_extractor.cpp @@ -8,7 +8,7 @@ size_t getFilesize(std::string filepath); namespace noaa { - NOAAExtractorModule::NOAAExtractorModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + NOAAExtractorModule::NOAAExtractorModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new uint16_t[BUFFER_SIZE / 2]; frameBuffer = new uint8_t[104]; @@ -91,7 +91,7 @@ namespace noaa return {}; } - std::shared_ptr NOAAExtractorModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAExtractorModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/module_noaa_extractor.h b/src-core/modules/noaa/module_noaa_extractor.h index 824304b0e..c0312d385 100644 --- a/src-core/modules/noaa/module_noaa_extractor.h +++ b/src-core/modules/noaa/module_noaa_extractor.h @@ -20,7 +20,7 @@ namespace noaa std::atomic progress; public: - NOAAExtractorModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAExtractorModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NOAAExtractorModule(); void process(); void drawUI(bool window); @@ -29,6 +29,6 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } diff --git a/src-core/modules/noaa/module_noaa_hrpt_demod.cpp b/src-core/modules/noaa/module_noaa_hrpt_demod.cpp index 310b10eff..aae4e3fec 100644 --- a/src-core/modules/noaa/module_noaa_hrpt_demod.cpp +++ b/src-core/modules/noaa/module_noaa_hrpt_demod.cpp @@ -9,10 +9,10 @@ size_t getFilesize(std::string filepath); namespace noaa { - NOAAHRPTDemodModule::NOAAHRPTDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) + NOAAHRPTDemodModule::NOAAHRPTDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + constellation(90.0f / 100.0f, 15.0f / 100.0f, demod_constellation_size) { // Buffers bits_buffer = new uint8_t[d_buffer_size * 10]; @@ -44,7 +44,7 @@ namespace noaa rec = std::make_shared(rrc->output_stream, sps / 2.0f, powf(0.01, 2) / 4.0f, 0.5f, 0.01f, 100e-6f); // Deframer - def = std::make_shared(std::stoi(d_parameters["deframer_thresold"])); + def = std::make_shared(d_parameters["deframer_thresold"].get()); } std::vector NOAAHRPTDemodModule::getInputTypes() @@ -190,7 +190,7 @@ namespace noaa return {"samplerate", "buffer_size", "baseband_format", "deframer_thresold"}; } - std::shared_ptr NOAAHRPTDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NOAAHRPTDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/noaa/module_noaa_hrpt_demod.h b/src-core/modules/noaa/module_noaa_hrpt_demod.h index 66708e72f..4c0026de2 100644 --- a/src-core/modules/noaa/module_noaa_hrpt_demod.h +++ b/src-core/modules/noaa/module_noaa_hrpt_demod.h @@ -52,7 +52,7 @@ namespace noaa widgets::SNRPlotViewer snr_plot; public: - NOAAHRPTDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + NOAAHRPTDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NOAAHRPTDemodModule(); void init(); void stop(); @@ -65,6 +65,6 @@ namespace noaa static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace noaa diff --git a/src-core/modules/npp/module_new_npp_hrd_decoder.cpp b/src-core/modules/npp/module_new_npp_hrd_decoder.cpp index 4dc81642c..4420ff9bc 100644 --- a/src-core/modules/npp/module_new_npp_hrd_decoder.cpp +++ b/src-core/modules/npp/module_new_npp_hrd_decoder.cpp @@ -11,10 +11,10 @@ size_t getFilesize(std::string filepath); namespace npp { - NewNPPHRDDecoderModule::NewNPPHRDDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) + NewNPPHRDDecoderModule::NewNPPHRDDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE * 2]; soft_buffer = new int8_t[BUFFER_SIZE]; @@ -192,7 +192,7 @@ namespace npp return {"viterbi_outsync_after", "viterbi_ber_thresold"}; } - std::shared_ptr NewNPPHRDDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NewNPPHRDDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/npp/module_new_npp_hrd_decoder.h b/src-core/modules/npp/module_new_npp_hrd_decoder.h index 42812e67b..a0d290280 100644 --- a/src-core/modules/npp/module_new_npp_hrd_decoder.h +++ b/src-core/modules/npp/module_new_npp_hrd_decoder.h @@ -35,7 +35,7 @@ namespace npp float ber_history[200]; public: - NewNPPHRDDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NewNPPHRDDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NewNPPHRDDecoderModule(); void process(); void drawUI(bool window); @@ -44,6 +44,6 @@ namespace npp static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace npp \ No newline at end of file diff --git a/src-core/modules/npp/module_npp_hrd_decoder.cpp b/src-core/modules/npp/module_npp_hrd_decoder.cpp index b43dc99a8..c98e5d0b8 100644 --- a/src-core/modules/npp/module_npp_hrd_decoder.cpp +++ b/src-core/modules/npp/module_npp_hrd_decoder.cpp @@ -11,12 +11,12 @@ size_t getFilesize(std::string filepath); namespace npp { - NPPHRDDecoderModule::NPPHRDDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_viterbi_outsync_after(std::stoi(parameters["viterbi_outsync_after"])), - d_viterbi_ber_threasold(std::stof(parameters["viterbi_ber_thresold"])), - d_soft_symbols(std::stoi(parameters["soft_symbols"])), - sw(0), - viterbi(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) + NPPHRDDecoderModule::NPPHRDDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_viterbi_outsync_after(parameters["viterbi_outsync_after"].get()), + d_viterbi_ber_threasold(parameters["viterbi_ber_thresold"].get()), + d_soft_symbols(parameters["soft_symbols"].get()), + sw(0), + viterbi(true, d_viterbi_ber_threasold, 1, d_viterbi_outsync_after, 50, BUFFER_SIZE) { viterbi_out = new uint8_t[BUFFER_SIZE]; sym_buffer = new std::complex[BUFFER_SIZE]; @@ -211,7 +211,7 @@ namespace npp return {"viterbi_outsync_after", "viterbi_ber_thresold", "soft_symbols"}; } - std::shared_ptr NPPHRDDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr NPPHRDDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/npp/module_npp_hrd_decoder.h b/src-core/modules/npp/module_npp_hrd_decoder.h index 986111c13..6888b70b3 100644 --- a/src-core/modules/npp/module_npp_hrd_decoder.h +++ b/src-core/modules/npp/module_npp_hrd_decoder.h @@ -39,7 +39,7 @@ namespace npp float ber_history[200]; public: - NPPHRDDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + NPPHRDDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~NPPHRDDecoderModule(); void process(); void drawUI(bool window); @@ -48,6 +48,6 @@ namespace npp static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace npp \ No newline at end of file diff --git a/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.cpp b/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.cpp index 49dfba57f..553438b77 100644 --- a/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.cpp +++ b/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.cpp @@ -14,7 +14,7 @@ namespace oceansat { namespace ocm { - OceansatOCMDecoderModule::OceansatOCMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + OceansatOCMDecoderModule::OceansatOCMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -208,7 +208,7 @@ namespace oceansat return {}; } - std::shared_ptr OceansatOCMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr OceansatOCMDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.h b/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.h index 4800ce081..05b327dcc 100644 --- a/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.h +++ b/src-core/modules/oceansat/instruments/ocm/module_oceansat_ocm.h @@ -13,7 +13,7 @@ namespace oceansat std::atomic progress; public: - OceansatOCMDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + OceansatOCMDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace oceansat static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/oceansat/module_oceansat2_db_decoder.cpp b/src-core/modules/oceansat/module_oceansat2_db_decoder.cpp index c64f4a0b4..c8e2061a2 100644 --- a/src-core/modules/oceansat/module_oceansat2_db_decoder.cpp +++ b/src-core/modules/oceansat/module_oceansat2_db_decoder.cpp @@ -47,7 +47,7 @@ namespace oceansat } }; - Oceansat2DBDecoderModule::Oceansat2DBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + Oceansat2DBDecoderModule::Oceansat2DBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new int8_t[BUFFER_SIZE]; frame_count = 0; @@ -235,7 +235,7 @@ namespace oceansat return {}; } - std::shared_ptr Oceansat2DBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr Oceansat2DBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/oceansat/module_oceansat2_db_decoder.h b/src-core/modules/oceansat/module_oceansat2_db_decoder.h index 37f7e367c..79a24b1ed 100644 --- a/src-core/modules/oceansat/module_oceansat2_db_decoder.h +++ b/src-core/modules/oceansat/module_oceansat2_db_decoder.h @@ -19,7 +19,7 @@ namespace oceansat std::atomic progress; public: - Oceansat2DBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + Oceansat2DBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~Oceansat2DBDecoderModule(); void process(); void drawUI(bool window); @@ -28,6 +28,6 @@ namespace oceansat static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace oceansat \ No newline at end of file diff --git a/src-core/modules/proba/instruments/chris/module_proba_chris.cpp b/src-core/modules/proba/instruments/chris/module_proba_chris.cpp index d7d7edd2b..721052aca 100644 --- a/src-core/modules/proba/instruments/chris/module_proba_chris.cpp +++ b/src-core/modules/proba/instruments/chris/module_proba_chris.cpp @@ -14,7 +14,7 @@ namespace proba { namespace chris { - ProbaCHRISDecoderModule::ProbaCHRISDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + ProbaCHRISDecoderModule::ProbaCHRISDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -108,7 +108,7 @@ namespace proba return {}; } - std::shared_ptr ProbaCHRISDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ProbaCHRISDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/proba/instruments/chris/module_proba_chris.h b/src-core/modules/proba/instruments/chris/module_proba_chris.h index ef87d4a7f..d36f83309 100644 --- a/src-core/modules/proba/instruments/chris/module_proba_chris.h +++ b/src-core/modules/proba/instruments/chris/module_proba_chris.h @@ -13,7 +13,7 @@ namespace proba std::atomic progress; public: - ProbaCHRISDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProbaCHRISDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace proba static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/proba/instruments/hrc/module_proba_hrc.cpp b/src-core/modules/proba/instruments/hrc/module_proba_hrc.cpp index f49159956..656c01080 100644 --- a/src-core/modules/proba/instruments/hrc/module_proba_hrc.cpp +++ b/src-core/modules/proba/instruments/hrc/module_proba_hrc.cpp @@ -14,7 +14,7 @@ namespace proba { namespace hrc { - ProbaHRCDecoderModule::ProbaHRCDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + ProbaHRCDecoderModule::ProbaHRCDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -108,7 +108,7 @@ namespace proba return {}; } - std::shared_ptr ProbaHRCDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ProbaHRCDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/proba/instruments/hrc/module_proba_hrc.h b/src-core/modules/proba/instruments/hrc/module_proba_hrc.h index f9c1a4eeb..6e7e1dba4 100644 --- a/src-core/modules/proba/instruments/hrc/module_proba_hrc.h +++ b/src-core/modules/proba/instruments/hrc/module_proba_hrc.h @@ -13,7 +13,7 @@ namespace proba std::atomic progress; public: - ProbaHRCDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProbaHRCDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace proba static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace hrc } // namespace proba \ No newline at end of file diff --git a/src-core/modules/proba/instruments/swap/module_proba_swap.cpp b/src-core/modules/proba/instruments/swap/module_proba_swap.cpp index 2fa23cd66..5955bcd8f 100644 --- a/src-core/modules/proba/instruments/swap/module_proba_swap.cpp +++ b/src-core/modules/proba/instruments/swap/module_proba_swap.cpp @@ -18,7 +18,7 @@ namespace proba { namespace swap { - ProbaSWAPDecoderModule::ProbaSWAPDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + ProbaSWAPDecoderModule::ProbaSWAPDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -107,7 +107,7 @@ namespace proba return {}; } - std::shared_ptr ProbaSWAPDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ProbaSWAPDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/proba/instruments/swap/module_proba_swap.h b/src-core/modules/proba/instruments/swap/module_proba_swap.h index e87f3f51b..de2ec5f62 100644 --- a/src-core/modules/proba/instruments/swap/module_proba_swap.h +++ b/src-core/modules/proba/instruments/swap/module_proba_swap.h @@ -13,7 +13,7 @@ namespace proba std::atomic progress; public: - ProbaSWAPDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProbaSWAPDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace proba static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.cpp b/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.cpp index 38a2a9d24..dbce530a8 100644 --- a/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.cpp +++ b/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.cpp @@ -19,7 +19,7 @@ namespace proba { namespace vegetation { - ProbaVegetationDecoderModule::ProbaVegetationDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + ProbaVegetationDecoderModule::ProbaVegetationDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -114,7 +114,7 @@ namespace proba return {}; } - std::shared_ptr ProbaVegetationDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ProbaVegetationDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.h b/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.h index ebf51505b..d0db7bf9e 100644 --- a/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.h +++ b/src-core/modules/proba/instruments/vegetation/module_proba_vegetation.h @@ -13,7 +13,7 @@ namespace proba std::atomic progress; public: - ProbaVegetationDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProbaVegetationDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace proba static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace noaa \ No newline at end of file diff --git a/src-core/modules/proba/module_proba_s_decoder.cpp b/src-core/modules/proba/module_proba_s_decoder.cpp index c9431e0a3..5010fde0b 100644 --- a/src-core/modules/proba/module_proba_s_decoder.cpp +++ b/src-core/modules/proba/module_proba_s_decoder.cpp @@ -16,9 +16,9 @@ size_t getFilesize(std::string filepath); namespace proba { - ProbaSDecoderModule::ProbaSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - derandomize(std::stoi(parameters["derandomize"])), - viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) + ProbaSDecoderModule::ProbaSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + derandomize(parameters["derandomize"].get()), + viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; } @@ -226,7 +226,7 @@ namespace proba return {"derandomize"}; } - std::shared_ptr ProbaSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr ProbaSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/proba/module_proba_s_decoder.h b/src-core/modules/proba/module_proba_s_decoder.h index 6ec13f6ad..74265833a 100644 --- a/src-core/modules/proba/module_proba_s_decoder.h +++ b/src-core/modules/proba/module_proba_s_decoder.h @@ -36,7 +36,7 @@ namespace proba dsp::Random rng; public: - ProbaSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + ProbaSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~ProbaSDecoderModule(); void process(); void drawUI(bool window); @@ -47,6 +47,6 @@ namespace proba static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace proba \ No newline at end of file diff --git a/src-core/modules/saral/argos/module_saral_argos.cpp b/src-core/modules/saral/argos/module_saral_argos.cpp index dd5f5e971..cc5214ba2 100644 --- a/src-core/modules/saral/argos/module_saral_argos.cpp +++ b/src-core/modules/saral/argos/module_saral_argos.cpp @@ -15,7 +15,7 @@ namespace saral { namespace argos { - SaralArgosDecoderModule::SaralArgosDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + SaralArgosDecoderModule::SaralArgosDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -116,7 +116,7 @@ namespace saral return {}; } - std::shared_ptr SaralArgosDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SaralArgosDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/saral/argos/module_saral_argos.h b/src-core/modules/saral/argos/module_saral_argos.h index 458db5bb4..0b84e61f3 100644 --- a/src-core/modules/saral/argos/module_saral_argos.h +++ b/src-core/modules/saral/argos/module_saral_argos.h @@ -13,7 +13,7 @@ namespace saral std::atomic progress; public: - SaralArgosDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SaralArgosDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); void process(); void drawUI(bool window); @@ -21,7 +21,7 @@ namespace saral static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace avhrr } // namespace metop \ No newline at end of file diff --git a/src-core/modules/saral/module_saral_decoder.cpp b/src-core/modules/saral/module_saral_decoder.cpp index 344e6da3a..97343c31e 100644 --- a/src-core/modules/saral/module_saral_decoder.cpp +++ b/src-core/modules/saral/module_saral_decoder.cpp @@ -17,7 +17,7 @@ size_t getFilesize(std::string filepath); namespace saral { - SaralDecoderModule::SaralDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), + SaralDecoderModule::SaralDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; @@ -228,7 +228,7 @@ namespace saral return {}; } - std::shared_ptr SaralDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SaralDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/saral/module_saral_decoder.h b/src-core/modules/saral/module_saral_decoder.h index e8a9cca8f..21dc830ea 100644 --- a/src-core/modules/saral/module_saral_decoder.h +++ b/src-core/modules/saral/module_saral_decoder.h @@ -28,7 +28,7 @@ namespace saral float cor_history[200]; public: - SaralDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SaralDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~SaralDecoderModule(); void process(); void drawUI(bool window); @@ -39,6 +39,6 @@ namespace saral static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace proba \ No newline at end of file diff --git a/src-core/modules/smap/module_smap_s_decoder.cpp b/src-core/modules/smap/module_smap_s_decoder.cpp index b15cffda9..f3bffbb20 100644 --- a/src-core/modules/smap/module_smap_s_decoder.cpp +++ b/src-core/modules/smap/module_smap_s_decoder.cpp @@ -19,7 +19,7 @@ size_t getFilesize(std::string filepath); namespace smap { - SMAPSDecoderModule::SMAPSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + SMAPSDecoderModule::SMAPSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { buffer = new int8_t[BUFFER_SIZE]; } @@ -186,7 +186,7 @@ namespace smap return {}; } - std::shared_ptr SMAPSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SMAPSDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/smap/module_smap_s_decoder.h b/src-core/modules/smap/module_smap_s_decoder.h index 94b3eada5..98e65087b 100644 --- a/src-core/modules/smap/module_smap_s_decoder.h +++ b/src-core/modules/smap/module_smap_s_decoder.h @@ -28,7 +28,7 @@ namespace smap dsp::Random rng; public: - SMAPSDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SMAPSDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~SMAPSDecoderModule(); void process(); void drawUI(bool window); @@ -37,6 +37,6 @@ namespace smap static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace falcon \ No newline at end of file diff --git a/src-core/modules/spacex/module_falcon_decoder.cpp b/src-core/modules/spacex/module_falcon_decoder.cpp index 5ca49982d..4d16dc48e 100644 --- a/src-core/modules/spacex/module_falcon_decoder.cpp +++ b/src-core/modules/spacex/module_falcon_decoder.cpp @@ -23,7 +23,7 @@ size_t getFilesize(std::string filepath); namespace spacex { - FalconDecoderModule::FalconDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters) + FalconDecoderModule::FalconDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters) { } @@ -221,7 +221,7 @@ namespace spacex return {}; } - std::shared_ptr FalconDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr FalconDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/spacex/module_falcon_decoder.h b/src-core/modules/spacex/module_falcon_decoder.h index 18651b175..025bb77e7 100644 --- a/src-core/modules/spacex/module_falcon_decoder.h +++ b/src-core/modules/spacex/module_falcon_decoder.h @@ -11,7 +11,7 @@ namespace spacex class FalconDecoderModule : public ProcessingModule { public: - FalconDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + FalconDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~FalconDecoderModule(); void process(); void drawUI(bool window); @@ -26,7 +26,7 @@ namespace spacex static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); private: #ifdef USE_VIDEO_ENCODER diff --git a/src-core/modules/spacex/module_spacex_decoder.cpp b/src-core/modules/spacex/module_spacex_decoder.cpp index 8d8e4617f..359413d65 100644 --- a/src-core/modules/spacex/module_spacex_decoder.cpp +++ b/src-core/modules/spacex/module_spacex_decoder.cpp @@ -19,8 +19,8 @@ size_t getFilesize(std::string filepath); namespace spacex { - SpaceXDecoderModule::SpaceXDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - qpsk(std::stoi(parameters["qpsk"])) + SpaceXDecoderModule::SpaceXDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + qpsk(parameters["qpsk"].get()) { buffer = new int8_t[BUFFER_SIZE]; } @@ -137,7 +137,6 @@ namespace spacex data_in.close(); } - void SpaceXDecoderModule::drawUI(bool window) { ImGui::Begin("SpaceX TLM Decoder", NULL, window ? NULL : NOWINDOW_FLAGS); @@ -217,7 +216,7 @@ namespace spacex return {"qpsk"}; } - std::shared_ptr SpaceXDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr SpaceXDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/spacex/module_spacex_decoder.h b/src-core/modules/spacex/module_spacex_decoder.h index c81718e8b..8670204a3 100644 --- a/src-core/modules/spacex/module_spacex_decoder.h +++ b/src-core/modules/spacex/module_spacex_decoder.h @@ -30,7 +30,7 @@ namespace spacex dsp::Random rng; public: - SpaceXDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + SpaceXDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~SpaceXDecoderModule(); void process(); void drawUI(bool window); @@ -39,6 +39,6 @@ namespace spacex static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace falcon \ No newline at end of file diff --git a/src-core/modules/terra/module_terra_db_decoder.cpp b/src-core/modules/terra/module_terra_db_decoder.cpp index faf0338d1..0d42f0c6b 100644 --- a/src-core/modules/terra/module_terra_db_decoder.cpp +++ b/src-core/modules/terra/module_terra_db_decoder.cpp @@ -15,7 +15,7 @@ size_t getFilesize(std::string filepath); namespace terra { - TerraDBDecoderModule::TerraDBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), + TerraDBDecoderModule::TerraDBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; @@ -202,7 +202,7 @@ namespace terra return {}; } - std::shared_ptr TerraDBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr TerraDBDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/terra/module_terra_db_decoder.h b/src-core/modules/terra/module_terra_db_decoder.h index 6b7886fe8..fc9cbe174 100644 --- a/src-core/modules/terra/module_terra_db_decoder.h +++ b/src-core/modules/terra/module_terra_db_decoder.h @@ -31,7 +31,7 @@ namespace terra dsp::Random rng; public: - TerraDBDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + TerraDBDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~TerraDBDecoderModule(); void process(); void drawUI(bool window); @@ -40,6 +40,6 @@ namespace terra static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } // namespace meteor \ No newline at end of file diff --git a/src-core/modules/terra/module_terra_db_demod.cpp b/src-core/modules/terra/module_terra_db_demod.cpp index 60ea7231f..51fb2692f 100644 --- a/src-core/modules/terra/module_terra_db_demod.cpp +++ b/src-core/modules/terra/module_terra_db_demod.cpp @@ -8,11 +8,11 @@ size_t getFilesize(std::string filepath); namespace terra { - TerraDBDemodModule::TerraDBDemodModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - d_samplerate(std::stoi(parameters["samplerate"])), - d_buffer_size(std::stoi(parameters["buffer_size"])), - d_dc_block(parameters.count("dc_block") > 0 ? std::stoi(parameters["dc_block"]) : 0), - constellation(0.5f, 0.5f, demod_constellation_size) + TerraDBDemodModule::TerraDBDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + d_samplerate(parameters["samplerate"].get()), + d_buffer_size(parameters["buffer_size"].get()), + d_dc_block(parameters.count("dc_block") > 0 ? parameters["dc_block"].get() : 0), + constellation(0.5f, 0.5f, demod_constellation_size) { // Init DSP blocks file_source = std::make_shared(d_input_file, dsp::BasebandTypeFromString(parameters["baseband_format"]), d_buffer_size); @@ -146,7 +146,7 @@ namespace terra return {"samplerate", "buffer_size", "dc_block", "baseband_format"}; } - std::shared_ptr TerraDBDemodModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr TerraDBDemodModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/terra/module_terra_db_demod.h b/src-core/modules/terra/module_terra_db_demod.h index 51553aaa3..6e489174a 100644 --- a/src-core/modules/terra/module_terra_db_demod.h +++ b/src-core/modules/terra/module_terra_db_demod.h @@ -52,7 +52,7 @@ namespace terra widgets::SNRPlotViewer snr_plot; public: - TerraDBDemodModule(std::string input_file, std::string output_file_hint, std::map parameters); + TerraDBDemodModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~TerraDBDemodModule(); void process(); void drawUI(bool window); @@ -63,6 +63,6 @@ namespace terra static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } diff --git a/src-core/modules/xrit/module_goesrecv_publisher.cpp b/src-core/modules/xrit/module_goesrecv_publisher.cpp index e569d1bb7..486bf9c30 100644 --- a/src-core/modules/xrit/module_goesrecv_publisher.cpp +++ b/src-core/modules/xrit/module_goesrecv_publisher.cpp @@ -13,9 +13,9 @@ size_t getFilesize(std::string filepath); namespace xrit { - GOESRecvPublisherModule::GOESRecvPublisherModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - address(parameters["address"]), - port(std::stoi(parameters["port"])) + GOESRecvPublisherModule::GOESRecvPublisherModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + address(parameters["address"].get()), + port(parameters["port"].get()) { buffer = new uint8_t[FRAME_SIZE]; } @@ -121,7 +121,7 @@ namespace xrit return {"address", "port"}; } - std::shared_ptr GOESRecvPublisherModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr GOESRecvPublisherModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/xrit/module_goesrecv_publisher.h b/src-core/modules/xrit/module_goesrecv_publisher.h index 82b82d7c1..016a3fa85 100644 --- a/src-core/modules/xrit/module_goesrecv_publisher.h +++ b/src-core/modules/xrit/module_goesrecv_publisher.h @@ -23,7 +23,7 @@ namespace xrit float cor_history[200]; public: - GOESRecvPublisherModule(std::string input_file, std::string output_file_hint, std::map parameters); + GOESRecvPublisherModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~GOESRecvPublisherModule(); void process(); void drawUI(bool window); @@ -34,6 +34,6 @@ namespace xrit static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } \ No newline at end of file diff --git a/src-core/modules/xrit/module_xrit_decoder.cpp b/src-core/modules/xrit/module_xrit_decoder.cpp index 2a046ec65..2165896e8 100644 --- a/src-core/modules/xrit/module_xrit_decoder.cpp +++ b/src-core/modules/xrit/module_xrit_decoder.cpp @@ -18,13 +18,13 @@ size_t getFilesize(std::string filepath); namespace xrit { - XRITDecoderModule::XRITDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters) : ProcessingModule(input_file, output_file_hint, parameters), - is_bpsk(std::stoi(parameters["is_bpsk"])), - diff_decode(std::stoi(parameters["diff_decode"])), - viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS), - d_viterbi_outsync_after(parameters.count("viterbi_outsync_after") > 0 ? std::stoi(parameters["viterbi_outsync_after"]) : 0), - d_viterbi_ber_threasold(parameters.count("viterbi_ber_thresold") > 0 ? std::stof(parameters["viterbi_ber_thresold"]) : 0), - stream_viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) + XRITDecoderModule::XRITDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters) : ProcessingModule(input_file, output_file_hint, parameters), + is_bpsk(parameters["is_bpsk"].get()), + diff_decode(parameters["diff_decode"].get()), + viterbi(ENCODED_FRAME_SIZE / 2, viterbi::CCSDS_R2_K7_POLYS), + d_viterbi_outsync_after(parameters.count("viterbi_outsync_after") > 0 ? parameters["viterbi_outsync_after"].get() : 0), + d_viterbi_ber_threasold(parameters.count("viterbi_ber_thresold") > 0 ? parameters["viterbi_ber_thresold"].get() : 0), + stream_viterbi(d_viterbi_ber_threasold, d_viterbi_outsync_after, BUFFER_SIZE) { buffer = new uint8_t[ENCODED_FRAME_SIZE]; viterbi_out = new uint8_t[BUFFER_SIZE * 2]; @@ -369,7 +369,7 @@ namespace xrit return {"is_bpsk", "diff_decode", "viterbi_outsync_after", "viterbi_ber_thresold"}; } - std::shared_ptr XRITDecoderModule::getInstance(std::string input_file, std::string output_file_hint, std::map parameters) + std::shared_ptr XRITDecoderModule::getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters) { return std::make_shared(input_file, output_file_hint, parameters); } diff --git a/src-core/modules/xrit/module_xrit_decoder.h b/src-core/modules/xrit/module_xrit_decoder.h index 90feac384..e830c6fae 100644 --- a/src-core/modules/xrit/module_xrit_decoder.h +++ b/src-core/modules/xrit/module_xrit_decoder.h @@ -43,7 +43,7 @@ namespace xrit dsp::Random rng; public: - XRITDecoderModule(std::string input_file, std::string output_file_hint, std::map parameters); + XRITDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters); ~XRITDecoderModule(); void process(); void drawUI(bool window); @@ -54,6 +54,6 @@ namespace xrit static std::string getID(); virtual std::string getIDM() { return getID(); }; static std::vector getParameters(); - static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, std::map parameters); + static std::shared_ptr getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters); }; } \ No newline at end of file diff --git a/src-core/pipeline.cpp b/src-core/pipeline.cpp index aea792b15..15f1a0086 100644 --- a/src-core/pipeline.cpp +++ b/src-core/pipeline.cpp @@ -2,7 +2,6 @@ #include "pipeline.h" #include "logger.h" #include "module.h" -#include "nlohmann/json.hpp" #include #include @@ -11,7 +10,7 @@ SATDUMP_DLL std::vector pipeline_categories; void Pipeline::run(std::string input_file, std::string output_directory, - std::map parameters, + nlohmann::json parameters, std::string input_level, bool ui, std::shared_ptr>> uiCallList, @@ -46,16 +45,16 @@ void Pipeline::run(std::string input_file, for (PipelineModule modStep : step.modules) { - std::map final_parameters = modStep.parameters; - for (const std::pair param : parameters) - if (final_parameters.count(param.first) > 0) + nlohmann::json final_parameters = modStep.parameters; + for (const nlohmann::detail::iteration_proxy_value> ¶m : parameters.items()) + if (final_parameters.count(param.key()) > 0) ; // Do Nothing //final_parameters[param.first] = param.second; else - final_parameters.emplace(param.first, param.second); + final_parameters.emplace(param.key(), param.value()); logger->debug("Parameters :"); - for (const std::pair param : final_parameters) - logger->debug(" - " + param.first + " : " + param.second); + for (const nlohmann::detail::iteration_proxy_value> ¶m : final_parameters.items()) + logger->debug(" - " + param.key() + " : " + param.value().dump()); std::shared_ptr module = modules_registry[modStep.module_name](modStep.input_override == "" ? (stepC == 0 ? input_file : lastFiles[0]) : output_directory + "/" + modStep.input_override, output_directory + "/" + name, final_parameters); @@ -124,7 +123,7 @@ void loadPipeline(std::string filepath, std::string category) { PipelineModule newModule; newModule.module_name = pipelineModule.key(); - newModule.parameters = pipelineModule.value().get>(); + newModule.parameters = pipelineModule.value(); if (newModule.parameters.count("input_override") > 0) newModule.input_override = newModule.parameters["input_override"]; diff --git a/src-core/pipeline.h b/src-core/pipeline.h index cf913dd64..d307e7593 100644 --- a/src-core/pipeline.h +++ b/src-core/pipeline.h @@ -5,11 +5,12 @@ #include #include #include "dll_export.h" +#include "nlohmann/json.hpp" struct PipelineModule { std::string module_name; - std::map parameters; + nlohmann::json parameters; std::string input_override; }; @@ -33,7 +34,7 @@ struct Pipeline std::vector steps; void run(std::string input_file, std::string output_directory, - std::map parameters, + nlohmann::json parameters, std::string input_level, bool ui = false, std::shared_ptr>> uiCallList = nullptr, diff --git a/src-ingestor/main.cpp b/src-ingestor/main.cpp index 6d2c7d645..9ab0eb522 100644 --- a/src-ingestor/main.cpp +++ b/src-ingestor/main.cpp @@ -102,8 +102,8 @@ int main(int argc, char *argv[]) // Prepare other parameters std::map parameters; - parameters.emplace("samplerate", std::to_string(samplerate)); - parameters.emplace("baseband_format", "f32"); + parameters["samplerate"] = samplerate; + parameters["baseband_format"] = "f32"; // Init the device std::string devID = sdr_type == NONE ? getDeviceIDStringByID(devices, 0) : ingestor_cfg["sdr_type"].get(); diff --git a/src-interface/live/live.cpp b/src-interface/live/live.cpp index da2c2e770..d261dad15 100644 --- a/src-interface/live/live.cpp +++ b/src-interface/live/live.cpp @@ -17,11 +17,6 @@ #include "settingsui.h" #include "main_ui.h" -#ifdef __ANDROID__ -std::string getFilePath(); -std::string getDirPath(); -#endif - namespace live { // Variables @@ -35,7 +30,7 @@ namespace live std::string output_file = ""; bool dc_block = false; bool iq_swap = false; - std::map parameters; + nlohmann::json parameters; void initLiveProcessingMenu() { @@ -223,9 +218,9 @@ namespace live if (it != pipelines.end()) { parameters.clear(); - parameters.emplace("samplerate", std::string(samplerate)); - parameters.emplace("baseband_format", "f32"); - parameters.emplace("dc_block", dc_block ? "1" : "0"); + parameters["samplerate"] = std::stol(samplerate); + parameters["baseband_format"] = "f32"; + parameters["dc_block"] = (bool)dc_block; live_pipeline = std::make_shared(*it, parameters, output_file); diff --git a/src-interface/live/live.h b/src-interface/live/live.h index 83b675f81..9ad71ec38 100644 --- a/src-interface/live/live.h +++ b/src-interface/live/live.h @@ -4,6 +4,7 @@ #include #include +#include "nlohmann/json.hpp" namespace live { @@ -14,6 +15,6 @@ namespace live extern std::string downlink_pipeline; extern std::string output_level; extern std::string output_file; - extern std::map parameters; + extern nlohmann::json parameters; #endif }; diff --git a/src-interface/offline/offline.cpp b/src-interface/offline/offline.cpp index 3b3998b50..e4dfad9e4 100644 --- a/src-interface/offline/offline.cpp +++ b/src-interface/offline/offline.cpp @@ -335,12 +335,12 @@ namespace offline else { - parameters.emplace("samplerate", std::string(samplerate)); + parameters["samplerate"] = std::stol(samplerate); - parameters.emplace("baseband_format", baseband_format); + parameters["baseband_format"] = baseband_format; - parameters.emplace("dc_block", dc_block ? "1" : "0"); - parameters.emplace("iq_swap", iq_swap ? "1" : "0"); + parameters["dc_block"] = (bool)dc_block; + parameters["iq_swap"] = (bool)iq_swap; processThreadPool.push([&](int) { processing::process(downlink_pipeline, input_level, input_file, output_level, output_file, parameters); }); diff --git a/src-interface/processing.cpp b/src-interface/processing.cpp index 51228eaff..f4cb62179 100644 --- a/src-interface/processing.cpp +++ b/src-interface/processing.cpp @@ -14,7 +14,7 @@ namespace processing std::string input_file, std::string output_level, std::string output_file, - std::map parameters) + nlohmann::json parameters) { satdumpUiStatus = OFFLINE_PROCESSING; diff --git a/src-interface/processing.h b/src-interface/processing.h index cb5a6f544..0d1791892 100644 --- a/src-interface/processing.h +++ b/src-interface/processing.h @@ -15,5 +15,5 @@ namespace processing std::string input_file, std::string output_level, std::string output_file, - std::map parameters); + nlohmann::json parameters); } \ No newline at end of file diff --git a/src-ui/main.cpp b/src-ui/main.cpp index 37b4b9dd2..8abbe4867 100644 --- a/src-ui/main.cpp +++ b/src-ui/main.cpp @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) std::string input_file = ""; std::string output_level = "products"; std::string output_file = ""; - std::map parameters; + nlohmann::json parameters; if (argc < 6 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { @@ -70,23 +70,23 @@ int main(int argc, char *argv[]) { if (strcmp(argv[i], "-samplerate") == 0) // This is your parameter name { - parameters.emplace("samplerate", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["samplerate"] = std::stol(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-baseband_format") == 0) // This is your parameter name { - parameters.emplace("baseband_format", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["baseband_format"] = argv[i + 1]; // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-dc_block") == 0) // This is your parameter name { - parameters.emplace("dc_block", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["dc_block"] = (bool)std::stoi(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } else if (strcmp(argv[i], "-iq_swap") == 0) // This is your parameter name { - parameters.emplace("iq_swap", argv[i + 1]); // The next value in the array is your value - i++; // Move to the next flag + parameters["iq_swap"] = (bool)std::stoi(argv[i + 1]); // The next value in the array is your value + i++; // Move to the next flag } } }