Commit cec5d58c authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

erp5_wendelin_drone: do not check for null rate

As timestamps are always different, checking for a null rate is pointless.
parent f1ef0990
......@@ -135,10 +135,6 @@ for name in not_seen_list[:]:
continue
over_timestamp = simulated_flight[simulated_flight["timestamp (ms)"] >= row["timestamp (ms)"]].head(1)
under_timestamp = simulated_flight[simulated_flight["timestamp (ms)"] <= row["timestamp (ms)"]].tail(1)
if (float(over_timestamp["timestamp (ms)"]) - float(under_timestamp["timestamp (ms)"])) == 0:
rate = 0
else:
rate = (float(over_timestamp["timestamp (ms)"]) - row["timestamp (ms)"])/(float(over_timestamp["timestamp (ms)"]) - float(under_timestamp["timestamp (ms)"]))
tmp_sim["latitude"].append(rated_value(float(over_timestamp["latitude ()"]), float(under_timestamp["latitude ()"]), rate))
......
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