Skip to content

Commit cc48224

Browse files
committed
location: Reject any locations with fix < 2 for add_location,
tracked_location
1 parent 3641e4a commit cc48224

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

trackedlocation.cc

+9
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ kis_tracked_location::kis_tracked_location(const kis_tracked_location *p) :
303303

304304
void kis_tracked_location::add_loc_with_avg(double in_lat, double in_lon, double in_alt,
305305
unsigned int fix, double in_speed, double in_heading) {
306+
307+
if (fix < 2) {
308+
return;
309+
}
310+
306311
add_loc(in_lat, in_lon, in_alt, fix, in_speed, in_heading);
307312

308313
if (avg_loc == nullptr) {
@@ -352,6 +357,10 @@ void kis_tracked_location::add_loc_with_avg(double in_lat, double in_lon, double
352357
void kis_tracked_location::add_loc(double in_lat, double in_lon, double in_alt,
353358
unsigned int fix, double in_speed, double in_heading) {
354359

360+
if (fix < 2) {
361+
return;
362+
}
363+
355364
if (fix > get_fix()) {
356365
set_fix(fix);
357366
}

0 commit comments

Comments
 (0)