Commit b4a68f18 authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

Encoder. Set threshold for iceblock stacking detection to 25mm (instead of 50mm)

parent 97b3777b
Pipeline #167789 passed with stages
in 1 minute and 9 seconds
......@@ -86,8 +86,8 @@ def get_moveup_events(encoder_df: pd.DataFrame,
end_datetime = None
end_position = None
else:
# Compute the time difference to the 5th next speed-in-range, to make sure it is not just a few isolate value
# which are in range.
# Compute the time difference to the 5th next speed-in-range, to make sure it is not just a few isolate
# value which are in range.
in_range_df = in_range_df.copy()
in_range_df["diff_time"] = in_range_df.index.to_series().diff(periods=5).shift(-5)
end_df = in_range_df[in_range_df["diff_time"] < pd.Timedelta(seconds=5)].head(1)
......@@ -95,7 +95,7 @@ def get_moveup_events(encoder_df: pd.DataFrame,
end_datetime = end_df.index[0]
end_position = end_df["position"][0]
if end_position > (start_position + 50): # New iceblocks added
if end_position > (start_position + 25): # New iceblocks added
event_type = "stacking"
else: # No new iceblock. Encoder probably moved to un-block ice core.
event_type = "unblocking"
......
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