mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:37:07 +00:00
There is no concept of ‘current survey’ in Dougal, and assigning navigation data to a particular survey is full of edge cases but sometimes it is necessary or at least convenient to do so. This commit implements once such strategy, which consists of checking the distance to the preplots of all active surveys (well, those that do have preplots anyway) and picking the nearest one. To reduce load, we only do this every once in a while as governed by the `offline_survey_detect_interval` option in the configuration. This strategy is only active if the configuration option `offline_survey_heuristics == "nearest_preplot"` for the corresponding navigation header.