Prepare Predicted Tracks for Effort Aggregation
Source:R/aggregate-effort.R
prepare_tracks_for_effort.RdEnriches predicted fishing track points with time-based effort, H3 cell assignment, and per-trip total hours (used downstream for the fidelity metric). For each trip the inter-ping time interval (`dt_hours`) is computed from consecutive timestamps and capped at 4 hours to guard against GPS-off gaps inflating effort estimates.
Value
The input data frame with additional columns:
- `year`
Integer year extracted from `timestamp`.
- `dt_hours`
Interval in hours to the previous ping within the same trip (0 for the first ping; capped at 4).
- `h3_index`
H3 cell identifier at resolution `h3_res`.
- `trip_total_hours`
Total fishing hours for the trip across all H3 cells (sum of `dt_hours` within the trip). Used to compute the per-cell trip share for the fidelity metric.