diff --git a/mapillary_tools/exiftool_read_video.py b/mapillary_tools/exiftool_read_video.py index f5562747..21812d84 100644 --- a/mapillary_tools/exiftool_read_video.py +++ b/mapillary_tools/exiftool_read_video.py @@ -180,9 +180,9 @@ def _aggregate_float_values_same_length( lat=lat, alt=alt, angle=direction, - gps_fix=None, - gps_precision=None, - gps_ground_speed=ground_speed, + fix=None, + precision=None, + ground_speed=ground_speed, ) ) @@ -281,7 +281,7 @@ def _aggregate_gps_track_by_sample_time( for idx, point in enumerate(points): point.time = sample_time + idx * avg_timedelta track.extend( - dataclasses.replace(point, gps_fix=gps_fix, gps_precision=gps_precision) + dataclasses.replace(point, fix=gps_fix, precision=gps_precision) for point in points ) diff --git a/mapillary_tools/geotag/gpmf_gps_filter.py b/mapillary_tools/geotag/gpmf_gps_filter.py index 4ae4e505..c57698d1 100644 --- a/mapillary_tools/geotag/gpmf_gps_filter.py +++ b/mapillary_tools/geotag/gpmf_gps_filter.py @@ -38,9 +38,7 @@ def remove_outliers( "Split to %d sequences with max distance %f", len(sequences), max_distance ) - ground_speeds = [ - p.gps_ground_speed for p in sequence if p.gps_ground_speed is not None - ] + ground_speeds = [p.ground_speed for p in sequence if p.ground_speed is not None] if len(ground_speeds) < 2: return sequence @@ -64,7 +62,7 @@ def remove_noisy_points( p for p in sequence # include points **without** GPS fix - if p.gps_fix is None or p.gps_fix.value in constants.GOPRO_GPS_FIXES + if p.fix is None or p.fix.value in constants.GOPRO_GPS_FIXES ] if len(sequence) < num_points: LOG.debug( @@ -78,7 +76,7 @@ def remove_noisy_points( p for p in sequence # include points **without** precision - if p.gps_precision is None or p.gps_precision <= constants.GOPRO_MAX_DOP100 + if p.precision is None or p.precision <= constants.GOPRO_MAX_DOP100 ] if len(sequence) < num_points: LOG.debug( diff --git a/mapillary_tools/geotag/gpmf_parser.py b/mapillary_tools/geotag/gpmf_parser.py index 907afa02..dabe41b1 100644 --- a/mapillary_tools/geotag/gpmf_parser.py +++ b/mapillary_tools/geotag/gpmf_parser.py @@ -213,9 +213,9 @@ def gps5_from_stream( lat=lat, lon=lon, alt=alt, - gps_fix=gpsf_value, - gps_precision=gpsp_value, - gps_ground_speed=ground_speed, + fix=gpsf_value, + precision=gpsp_value, + ground_speed=ground_speed, angle=None, ) @@ -271,9 +271,9 @@ def gps9_from_stream( lat=lat, lon=lon, alt=alt, - gps_fix=GPSFix(gps_fix), - gps_precision=dop * 100, - gps_ground_speed=speed_2d, + fix=GPSFix(gps_fix), + precision=dop * 100, + ground_speed=speed_2d, angle=None, ) diff --git a/tests/cli/gpmf_parser.py b/tests/cli/gpmf_parser.py index f32efd0d..cb7d0eeb 100644 --- a/tests/cli/gpmf_parser.py +++ b/tests/cli/gpmf_parser.py @@ -8,10 +8,10 @@ import gpxpy import gpxpy.gpx import mapillary_tools.geo as geo -import mapillary_tools.telemetry as telemetry import mapillary_tools.geotag.gpmf_parser as gpmf_parser import mapillary_tools.geotag.gps_filter as gps_filter +import mapillary_tools.telemetry as telemetry import mapillary_tools.utils as utils from mapillary_tools.mp4 import mp4_sample_parser