The primary purpose of this PR is to fix an issue where in some, rare, cases the number of events per port visit
got very large (~400,000 in one case due to a ferry never leaving port, but generating lots of start/stop events).
The number of events listed in the visit is capped at 200. If there are more than 200, only the first 100 and last 100
are included.
In addition, two bugs I found were fixed.
Somehow we ended up with write_append instead of write_truncate when writing the new style tables. This was going
create more tables at each run. Replaced with truncate.
There was a small bug that might manifest when a break between segments cross the dateline. Fixed to keep the delta
lon in the range [-180, 180).
Also renamed one method: has_long_interseg_gap -> has_large_interseg_dist to better reflect that this is checking
the distance (nautical miles) not duration (seconds).
The primary purpose of this PR is to fix an issue where in some, rare, cases the number of events per port visit got very large (~400,000 in one case due to a ferry never leaving port, but generating lots of start/stop events). The number of events listed in the visit is capped at 200. If there are more than 200, only the first 100 and last 100 are included.
In addition, two bugs I found were fixed.
Also renamed one method:
has_long_interseg_gap
->has_large_interseg_dist
to better reflect that this is checking the distance (nautical miles) not duration (seconds).