From ccc6855d073fd291c8f15d2f12cf81df63328e62 Mon Sep 17 00:00:00 2001 From: Jack Sweeney Date: Fri, 12 May 2023 14:34:00 -0400 Subject: [PATCH] Update calculate_headings.py Move function explanation def --- calculate_headings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculate_headings.py b/calculate_headings.py index 437ca37..617227b 100644 --- a/calculate_headings.py +++ b/calculate_headings.py @@ -17,10 +17,10 @@ def calculate_cardinal(d): card = dirs[ix % len(dirs)] return card def calculate_deg_change(new_heading, original_heading): + """Calculates change between two headings, returns negative degree if change is left, positive if right""" if new_heading is None: print("Track heading missing. No change") return 0 - """Calculates change between two headings, returns negative degree if change is left, positive if right""" normal = abs(original_heading-new_heading) across_inital = 360 - abs(original_heading-new_heading) if across_inital < normal: