-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
49 lines (36 loc) · 1.23 KB
/
main.py
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
#######################################################################################################################
#
# GPX AUDAX
#
# File: main.py
# Author: Simon Thompson
# Date: 4/11/2020
# Requirements: Python 3, argparse
# Licence: GPL v3
# Copyright: (c) Simon Thompson 2020
#
######################################################################################################################
# User Libraries
import GPXHandler as GPX
import GPXanalyse as analyse
# Published Libraries
import argparse
# Constants
### Classes
### Functions
def main():
print("Audax GPX Tool")
parser = argparse.ArgumentParser(description='Audax GPX Tool')
parser.add_argument('GPXfilename', help='Input GPX Filename')
args = parser.parse_args()
gpx = GPX.readGPXFileTracks(args.GPXfilename)
#analyse.printGPX(gpx)
climb = analyse.calculateClimb(gpx)
dist = analyse.getDistance(gpx)
dist1 = analyse.calculateQuickDistance2D(gpx)
analyse.smoothGPXfile(args.GPXfilename, "test.gpx")
gpxs = GPX.readGPXFileTracks("test.gpx")
climb = analyse.calculateClimb(gpxs)
dist1 = analyse.calculateQuickDistance2D(gpxs)
if __name__ == "__main__":
main()