diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/process_route.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/process_route.py b/scripts/process_route.py index 643d7dd..e2034fe 100644 --- a/scripts/process_route.py +++ b/scripts/process_route.py @@ -44,6 +44,13 @@ def calculate_timestamp(data, current_index): prev_timestamp = calculate_timestamp(data, current_index - 1) return prev_timestamp + data[current_index-1]['distance'] / data[current_index]['speed'] +# Function process_route +# Parameters: +# input_filename: Input file name +# output_filename: Output file name +# Returns: None +# This function calculates the bearings and timestamps for a route file in JSON-format +# with given latitude, longitude and speed parameters. def process_route(input_filename, output_filename): with open(input_filename, 'r') as infile: data = json.load(infile) |