I have a 2D arraylist data which fills with a loop like this:
data.append([TrueID,rssi])
after 8 times i got this value for data:
data =
[['469420270013002A', -90],
['469420270005000C', -89],
['469420270013002A', -94],
['4694202700270003', -53],
['469420270005000C', -91],
['469420270013002A', -92],
['4694202700270003', -55]]
I want to calculate the average RSSI value of each TrueID and return the lowest RSSI value with its TrueID.
So I need output:
print "The weakest ID is " ID_result " with Rssi value of " rssi_result
>>The weakest ID is '4694202700270003' with Rssi value of -54
It's necessary the 2D array fills until 20 values and continues like a FIFO system.
All suggestions are welcome (even if you know other methods to get to the same result)!
Thank you!
-54is actually going to be the maximum value here.