Commit 6331971f 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 04d0b871
......@@ -135,11 +135,7 @@ 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)"]))
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))
tmp_sim["longitude"].append(rated_value(float(over_timestamp["longitude ()"]), float(under_timestamp["longitude ()"]), 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