summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Bridges <bridges.anson@gmail.com>2023-11-15 21:56:14 -0500
committerAnson Bridges <bridges.anson@gmail.com>2023-11-15 21:56:14 -0500
commit0e869e1142607dfe9069096fd144ac84b2c29974 (patch)
treef576c59a4932953c400c3f2b0c4c825bccf2a1e3
parent2cd66acd8ccd81fbdc5e0d8ed71ef28e9c0ad1a7 (diff)
fixes for ethan
-rw-r--r--dashboard_website/datastructs.py2
-rw-r--r--dashboard_website/db.py1
2 files changed, 2 insertions, 1 deletions
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