Commit 1739750e authored by Joanne Hugé's avatar Joanne Hugé

simpleran: clean up and update ors_version with new values

Add new measurements for bands B40, N77, N79
parent b3e96f8e
...@@ -20,7 +20,7 @@ md5sum = 109828c2a97c09b0976d266aaba00328 ...@@ -20,7 +20,7 @@ md5sum = 109828c2a97c09b0976d266aaba00328
[template-ors] [template-ors]
filename = instance-ors.cfg filename = instance-ors.cfg
md5sum = 307e38207945a9adcfea0263cba9d3a6 md5sum = a0117291dedbd2c6d60012696a716735
[slaplte.jinja2] [slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2 _update_hash_filename_ = slaplte.jinja2
...@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e ...@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = de757719d6cf4bd731394f50dbce8d99 md5sum = 22c399fc3a84aeec0f6545fe72fbf2f3
[template-ors-enb] [template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg _update_hash_filename_ = instance-ors-enb.jinja2.cfg
......
...@@ -51,119 +51,137 @@ configuration = $${slap-configuration:configuration} ...@@ -51,119 +51,137 @@ configuration = $${slap-configuration:configuration}
sdr-dir = $${sdr:dir} sdr-dir = $${sdr:dir}
init = init =
import subprocess import subprocess
range_map = { default_map = {
"B28": "758MHz - 803MHz", "B28": {
"B38": "2570MHz - 2620MHz", "range": "758MHz - 803MHz",
"B39": "1880MHz - 1920MHz", "dl_earfcn": 9550,
"B40": "2300MHz - 2400MHz", "dl_nr_arfcn": 158400,
"B41": "2496MHz - 2690MHz", "nr_band": 28,
"B42": "3400MHz - 3600MHz", "tx_gain": [60, 62],
"B43": "3600MHz - 3800MHz", "rx_gain": [25, 25],
"N77": "3800MHz - 4000MHz", "rf_mode": "fdd",
"N79": "4600MHz - 5000MHz", "power_estimation": (
"UNKNOWN": "Information not available for this band", lambda x: "UNKNOWN",
} lambda x: (-0.004711416231164319) * x**2 + (1.5976906979683085) * x + (-67.71316951508676),
default_tx_gain_map = { ),
"B28": (60, 62), },
"B38": (59, 65), "B38": {
"B39": (59, 64), "range": "2570MHz - 2620MHz",
"B40": (59, 64), "dl_earfcn": 38050,
"B41": (59, 64), "dl_nr_arfcn": 519000,
"B42": (63, 62), "nr_band": 41,
"B43": (63, 62), "tx_gain": [59, 65],
"N77": (60, 62), "rx_gain": [25, 25],
"N79": (60, 62), "rf_mode": "tdd",
"UNKNOWN": (60, 62), "power_estimation": (
} lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
default_rx_gain_map = { lambda x: (-0.004472751640641793) * x**2 + (1.6308290630103919) * x + (-81.84549245154561),
"B28": (25, 25), ),
"B38": (25, 25), },
"B39": (25, 25), "B39": {
"B40": (25, 25), "range": "1880MHz - 1920MHz",
"B41": (25, 25), "dl_earfcn": 38350,
"B42": (25, 25), "dl_nr_arfcn": 378000,
"B43": (25, 25), "nr_band": 39,
"N77": (25, 25), "tx_gain": [59, 64],
"N79": (25, 25), "rx_gain": [25, 25],
"UNKNOWN": (25, 25), "rf_mode": "tdd",
} "power_estimation": (
default_earfcn_map = { lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
"B28": 9550, lambda x: (-0.0022523817802900985) * x**2 + (1.2674016231310092) * x + (-66.57165215468584),
"B38": 38050, ),
"B39": 38350, },
"B40": 39150, "B40": {
"B41": 40620, "range": "2300MHz - 2400MHz",
"B42": 42590, "dl_earfcn": 39150,
"B43": 44590, "dl_nr_arfcn": 470000,
"N77": 0, "nr_band": 40,
"N79": 0, "tx_gain": [59, 64],
"UNKNOWN": 0, "rx_gain": [25, 25],
} "rf_mode": "tdd",
default_nr_arfcn_map = { "power_estimation": (
"B28": 0, lambda x: "UNKNOWN",
"B38": 519000, lambda x: (-0.0016475305254340404) * x**2 + (1.1580162105112186) * x + (-62.10679297527826),
"B39": 378000, ),
"B40": 470000, },
"B41": 518600, "B41": {
"B42": 632628, "range": "2496MHz - 2690MHz",
"B43": 646666, "dl_earfcn": 40620,
"N77": 660000, "dl_nr_arfcn": 518600,
"N79": 720000, "nr_band": 41,
"UNKNOWN": 0, "tx_gain": [59, 64],
} "rx_gain": [25, 25],
default_nr_band_map = { "rf_mode": "tdd",
"B28": 0, "power_estimation": (
"B38": 41, lambda x: "UNKNOWN",
"B39": 39, lambda x: "UNKNOWN",
"B40": 40, ),
"B41": 41, },
"B42": 78, "B42": {
"B43": 78, "range": "3400MHz - 3600MHz",
"N77": 77, "dl_earfcn": 42590,
"N79": 79, "dl_nr_arfcn": 632628,
"UNKNOWN": 0, "nr_band": 78,
} "tx_gain": [63, 62],
power_map = { "rx_gain": [25, 25],
"B28": ( "rf_mode": "tdd",
lambda x: "UNKNOWN", "power_estimation": (
lambda x: "UNKNOWN", lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
), lambda x: (0.003977721774394756) * x**2 + (0.527208191717173) * x + (-42.761142655285376),
"B38": ( ),
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742), },
lambda x: (-0.004472751640641793) * x**2 + (1.6308290630103919) * x + (-81.84549245154561), "B43": {
), "range": "3600MHz - 3800MHz",
"B39": ( "dl_earfcn": 44590,
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742), "dl_nr_arfcn": 646666,
lambda x: (-0.0022523817802900985) * x**2 + (1.2674016231310092) * x + (-66.57165215468584), "nr_band": 78,
), "tx_gain": [63, 62],
"B40": ( "rx_gain": [25, 25],
lambda x: "UNKNOWN", "rf_mode": "tdd",
lambda x: "UNKNOWN", "power_estimation": (
), lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
"B41": ( lambda x: (-0.0036530114002551943) * x**2 + (1.510856844601873) * x + (-74.58790185136355),
lambda x: "UNKNOWN", ),
lambda x: "UNKNOWN", },
), "N77": {
"B42": ( "range": "3800MHz - 4000MHz",
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738), "dl_earfcn": 0,
lambda x: (0.003977721774394756) * x**2 + (0.527208191717173) * x + (-42.761142655285376), "dl_nr_arfcn": 660000,
), "nr_band": 77,
"B43": ( "tx_gain": [60, 62],
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738), "rx_gain": [25, 25],
lambda x: (-0.0036530114002551943) * x**2 + (1.510856844601873) * x + (-74.58790185136355), "rf_mode": "tdd",
), "power_estimation": (
"N77": ( lambda x: "UNKNOWN",
lambda x: "UNKNOWN", lambda x: lambda x: (-0.003358281211508112) * x**2 + (1.4533760798172672) * x + (-70.18774498873421),
lambda x: "UNKNOWN", ),
), },
"N79": ( "N79": {
lambda x: "UNKNOWN", "range": "4600MHz - 5000MHz",
lambda x: "UNKNOWN", "dl_earfcn": 0,
), "dl_nr_arfcn": 720000,
"UNKNOWN": ( "nr_band": 79,
lambda x: "UNKNOWN", "tx_gain": [60, 62],
lambda x: "UNKNOWN", "rx_gain": [25, 25],
), "rf_mode": "tdd",
"power_estimation": (
lambda x: "UNKNOWN",
lambda x: (-0.004745509248998074) * x**2 + (1.659474968728413) * x + (-76.46937551110834),
),
},
"UNKNOWN": {
"range": "Information not available for this band",
"dl_earfcn": 0,
"dl_nr_arfcn": 0,
"nr_band": 0,
"tx_gain": [60, 62],
"rx_gain": [25, 25],
"rf_mode": "tdd",
"power_estimation": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
},
} }
def get_sdr_info(cmd): def get_sdr_info(cmd):
if options['configuration'].get('testing', False): if options['configuration'].get('testing', False):
...@@ -181,18 +199,20 @@ init = ...@@ -181,18 +199,20 @@ init =
options['band'], options['band'],
"2x1W" if options['one-watt'] else "2x0.5W", "2x1W" if options['one-watt'] else "2x0.5W",
) )
default_tx_gain = default_tx_gain_map [options['band']][int(options['one-watt'])] default_tx_gain = default_map[options['band']]['tx_gain' ][int(options['one-watt'])]
default_rx_gain = default_rx_gain_map [options['band']][int(options['one-watt'])] default_rx_gain = default_map[options['band']]['rx_gain' ][int(options['one-watt'])]
default_earfcn = default_earfcn_map [options['band']] default_earfcn = default_map[options['band']]['dl_earfcn' ]
default_nr_arfcn = default_nr_arfcn_map[options['band']] default_nr_arfcn = default_map[options['band']]['dl_nr_arfcn']
default_nr_band = default_nr_band_map [options['band']] default_nr_band = default_map[options['band']]['nr_band' ]
options['range'] = range_map [options['band']] default_rf_mode = default_map[options['band']]['rf_mode' ]
options['range'] = default_map[options['band']]['range']
options['current-tx-gain'] = options['configuration'].get('tx_gain' , default_tx_gain ) options['current-tx-gain'] = options['configuration'].get('tx_gain' , default_tx_gain )
options['current-rx-gain'] = options['configuration'].get('rx_gain' , default_rx_gain ) options['current-rx-gain'] = options['configuration'].get('rx_gain' , default_rx_gain )
options['current-earfcn'] = options['configuration'].get('dl_earfcn' , default_earfcn ) options['current-earfcn'] = options['configuration'].get('dl_earfcn' , default_earfcn )
options['current-nr-arfcn'] = options['configuration'].get('dl_nr_arfcn', default_nr_arfcn) options['current-nr-arfcn'] = options['configuration'].get('dl_nr_arfcn', default_nr_arfcn)
options['current-nr-band'] = options['configuration'].get('nr_band' , default_nr_band ) options['current-nr-band'] = options['configuration'].get('nr_band' , default_nr_band )
power_estimate_dbm = power_map[options['band']][int(options['one-watt'])](float(options['current-tx-gain'])) options['current-rf-mode'] = options['configuration'].get('rf_mode' , default_rf_mode )
power_estimate_dbm = default_map[options['band']]['power_estimation'][int(options['one-watt'])](float(options['current-tx-gain']))
if power_estimate_dbm == "UNKNOWN": if power_estimate_dbm == "UNKNOWN":
power_estimate = "Information not available for this band" power_estimate = "Information not available for this band"
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment