From 0e869e1142607dfe9069096fd144ac84b2c29974 Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Wed, 15 Nov 2023 21:56:14 -0500 Subject: fixes for ethan --- dashboard_website/datastructs.py | 2 +- dashboard_website/db.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard_website/datastructs.py b/dashboard_website/datastructs.py index 24625d0..b6b67f2 100644 --- a/dashboard_website/datastructs.py +++ b/dashboard_website/datastructs.py @@ -34,7 +34,7 @@ class Point: R = 3958.8 # Radius of the earth lat_d = math.radians(lat2-lat1); lon_d = math.radians(lon2-lon1); - a = math.sin(dLat/2) * math.sin(dLat/2) + math.cos(radians(lat1)) * math.cos(radians(lat2)) * math.sin(dLon/2) * math.sin(dLon/2) + a = math.sin(lat_d/2) * math.sin(lat_d/2) + math.cos(radians(lat1)) * math.cos(radians(lat2)) * math.sin(lon_d/2) * math.sin(lon_d/2) c = 2 * math.atan2(math.sqrt(a), math.sqrt(1-a)); d = R * c; # Distance in mi return d diff --git a/dashboard_website/db.py b/dashboard_website/db.py index d4b0186..6a638e7 100644 --- a/dashboard_website/db.py +++ b/dashboard_website/db.py @@ -171,6 +171,7 @@ def visitClueTeam(team_name, clue_name): for bike in bikes: if bike.name == team_name: b = bike + break else: return 4 # team not found c = None -- cgit v1.2.3