-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
154 lines (131 loc) · 4.89 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# FILES AND FOLDERS
[folders]
auto_root = "~/OneDrive/Projects/Driving_Log"
import_root = "~/OneDrive/Import/"
[folders.raw]
_default = "Raw_Data/_default"
bad_elf = "Raw_Data/bad_elf"
garmin = "Raw_Data/garmin"
mytracks = "Raw_Data/mytracks"
# Files relative to the auto_root folder.
[files]
canonical_gpkg = "Driving_Log.gpkg"
canonical_backup = "./.Backup/Driving_Log.backup.gpkg"
output_kmz = "Driving.kmz"
bad_elf_outliers_log = "Documentation/Bad-Elf-Outliers.csv"
# Files relative to the script folder.
[files.script]
gpkg_template = "./templates/Driving_Log.template.gpkg"
# Files in an absolute location.
[files.absolute]
timelog = "~/iCloudDrive/Timelog/timelog.csv"
# TIMESTAMP FORMATS
[timestamps]
kml_name = "%Y-%m-%d %H:%M:%SZ"
[timestamps.raw]
bad_elf = "%Y%m%dT%H%M%SZ"
mytracks = "%Y%m%dT%H%M%SZ"
# MULTIPLIERS
# Multiplier needed to convert each device's native speed unit into meters/sec.
[speed_multiplier]
bad_elf = 1.0 # m/s
garmin = 1.0 # m/s
mytracks = 0.277778 # km/h
# DRIVING RANGE
[driving_range]
recharge_time_hours = 10 # Default time for recharging a car for driving range calculations
# IMPORT CONFIGURATION
[import]
min_points = 2 # Only keep linestrings with at least this many points
[import.gpx]
# Configure which scripts are run on GPX files from different devices (_default
# configuration is used if a GPX file doesn't match any of the other devices.)
# Scripts are run via the GPXFile class or its child classes process() method.
# If a script is not used by a particular GPX file type, the script's parameters
# do not need to be set.
#
# SCRIPTS
#
# filter_speed
# Filters low speeds from a GPX file.
# filter_speed.min_speed: Minimum speed to keep (meters per second).
# filter_speed.rolling_window: Length of rolling median window for avoiding
# outliers.
# filter_speed.method: (str "center"|"extended"): "center" centers the # # rolling window. "extended" uses both a left- and right-aligned window, and
# only rejects points if they fall below the minimum speed in both
# windows.
#
# merge_segments
# Joins consecutive track segments within a track.
# merge_segments.max_seconds (int): Segments with a time gap between them of
# greater than this number of seconds will not be joined.
#
# split_trksegs
# Splits individual track segments into multiple segments when there are gaps
# of time where no points are recorded.
# split_trksegs.threshold (int): The minimum time gap in seconds between
# points needed to create a split.
#
# trim
# Removes no-motion points at start or end of a segment.
#
# simplify
# Reduces the number of points in track segments by removing points that
# won't significantly change the shape of the segment (e.g. linear points on a
# straight portion of the segment). Uses a spherical Ramer-Douglas-Peucker
# simplification algorithm.
# simplify.epsilon (float): The epsilon parameter for the RDP algorithm.
# Determines the amount of error tolerated in the simplification; higher
# values result in fewer points but less well-fitting track segments. A good
# balanced value for driving tracks is 2e-6.
[import.gpx._default] # Unknown source (GPXFile class)
[import.gpx.bad_elf] # Bad Elf GPS Pro+ (BadElfGPXFile class)
split_trksegs.threshold = 300
simplify.epsilon = 2e-6
[import.gpx.garmin] # Garmin DriveSmart devices (GarminGPXFile class)
merge_segments.max_seconds = 600
[import.gpx.mytracks] # myTracks iOS app (MyTracksGPXFile class)
filter_speed.min_speed_m_s = 1.78816 # 4 MPH
filter_speed.rolling_window = 25
filter_speed.method = "center"
split_trksegs.threshold = 300
simplify.epsilon = 2e-6
# Tracks and track segments to ignore when importing Garmin trip logs. Tracks
# and track segments are identified by a UTC timestamp of their first waypoint.
[import.ignore]
trk = [
# Garmin GPX Tracks to ignore.
2015-10-11T15:37:00+00:00,
2016-05-06T15:40:01+00:00,
2016-05-06T22:59:02+00:00,
2016-05-07T02:00:00+00:00,
2016-09-02T19:18:05+00:00,
2017-07-15T21:58:02+00:00,
2017-09-19T22:50:46+00:00,
2017-12-19T03:44:05+00:00,
2018-03-30T14:27:05+00:00,
2018-04-16T20:16:58+00:00,
2018-04-18T21:53:16+00:00,
2018-05-17T23:31:20+00:00,
2018-06-12T23:01:29+00:00,
2018-06-12T23:51:41+00:00,
2018-06-13T00:20:59+00:00,
2018-12-08T15:53:00+00:00,
2019-04-25T01:23:08+00:00,
2019-08-18T14:11:48+00:00,
2019-09-01T19:46:33+00:00,
2020-07-06T23:23:54+00:00,
2020-07-25T16:00:50+00:00,
2021-08-02T16:14:10+00:00,
2021-08-02T19:04:43+00:00,
2021-08-02T19:50:55+00:00,
2021-10-11T03:18:43+00:00,
2021-10-11T04:15:42+00:00,
2022-01-10T16:49:29+00:00, # Track has offset error
2022-04-01T01:12:56+00:00, # Amy driving without me
]
trkseg = [
# Individual track segments to ignore when importing Garmin trip logs. (All
# track segments in a track ignored above will also be ignored.)
2021-10-03T18:31:26-04:00,
]