linting
This commit is contained in:
parent
d4a33c6fcd
commit
5ce144cad1
|
@ -19,7 +19,12 @@ from at_commands import (
|
|||
get_modem_sinr,
|
||||
set_configs,
|
||||
)
|
||||
from helper_functions import calculate_distance, normalize, parse_lat_lon, save_data_to_json
|
||||
from helper_functions import (
|
||||
calculate_distance,
|
||||
normalize,
|
||||
parse_lat_lon,
|
||||
save_data_to_json,
|
||||
)
|
||||
from sierra_commands import get_modem_nr_info, get_modem_status
|
||||
|
||||
# Globals
|
||||
|
@ -139,15 +144,16 @@ def ping_basestation(
|
|||
|
||||
if match:
|
||||
time_value = match.group(1)
|
||||
dictionary["ping_time"] = time_value
|
||||
dictionary["ping_stats"] = result.stdout
|
||||
return dictionary
|
||||
dictionary[f"{address}_ping_time"] = time_value
|
||||
else:
|
||||
dictionary["ping_time"] = "Not found"
|
||||
dictionary["ping_stats"] = result.stdout
|
||||
return dictionary
|
||||
dictionary[f"{address}_ping_time"] = "Not found"
|
||||
|
||||
dictionary[f"{address}_ping_stats"] = result.stdout
|
||||
|
||||
except Exception as e:
|
||||
return {"error": str(e)}
|
||||
dictionary["ping error"] = f"{e}"
|
||||
|
||||
return dictionary
|
||||
|
||||
|
||||
# Run iperf test
|
||||
|
|
|
@ -187,7 +187,7 @@ if __name__ == "__main__":
|
|||
filenames = [
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758215714_copy.json",
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758217711_copy.json",
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758219350_copy.json"
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758219350_copy.json",
|
||||
]
|
||||
base_location = {
|
||||
"latitude": 43.656328,
|
||||
|
|
11
plots.py
11
plots.py
|
@ -2,7 +2,6 @@ import json
|
|||
import re
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
|
||||
def plot_rsrp(filename):
|
||||
|
@ -108,7 +107,13 @@ def plot_median_rsrp(filename):
|
|||
|
||||
# Plot the data
|
||||
plt.figure(figsize=(10, 6))
|
||||
plt.plot(distances, rsrps, label="RSRP PRX", marker="o", color="blue",)
|
||||
plt.plot(
|
||||
distances,
|
||||
rsrps,
|
||||
label="RSRP Avg RX",
|
||||
marker="o",
|
||||
color="blue",
|
||||
)
|
||||
|
||||
plt.title("RSRP vs Distance")
|
||||
plt.xlabel("Distance (m)")
|
||||
|
@ -224,7 +229,7 @@ def plot_median_rsrq(filename):
|
|||
|
||||
# Plot the data
|
||||
plt.figure(figsize=(10, 6))
|
||||
plt.plot(distances, rsrqs, label="RSRQ PRX", marker="o", color="blue")
|
||||
plt.plot(distances, rsrqs, label="RSRQ Avg RX", marker="o", color="blue")
|
||||
|
||||
plt.title("RSRQ vs Distance")
|
||||
plt.xlabel("Distance (m)")
|
||||
|
|
Loading…
Reference in New Issue
Block a user