Look around DCs dive time for automatically fixed positions.
dive = find_dive_including(gpsfix->when); only finds dives which have a fix during the underwater time. If the positions have been fixed before or after the dive, fails quietly. So let's test this situation and, in case, pass the job to find_dive_n_near(). Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0deee63b5e
commit
2ae6f8078a
@ -50,8 +50,7 @@ static bool merge_locations_into_dives(void)
|
|||||||
sort_table(&gps_location_table);
|
sort_table(&gps_location_table);
|
||||||
|
|
||||||
for_each_gps_location (i, gpsfix) {
|
for_each_gps_location (i, gpsfix) {
|
||||||
if (is_automatic_fix(gpsfix)) {
|
if (is_automatic_fix(gpsfix) && (dive = find_dive_including(gpsfix->when))) {
|
||||||
dive = find_dive_including(gpsfix->when);
|
|
||||||
if (dive && !dive_has_gps_location(dive)) {
|
if (dive && !dive_has_gps_location(dive)) {
|
||||||
#if DEBUG_WEBSERVICE
|
#if DEBUG_WEBSERVICE
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user