Skip to content

Commit

Permalink
Renamed folders and deleted unused logic files
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestaylr committed Oct 29, 2015
1 parent 0c8ad5c commit 176a5a7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 69 deletions.
21 changes: 0 additions & 21 deletions src/modules/Logic/ShipData.py

This file was deleted.

38 changes: 0 additions & 38 deletions src/modules/Logic/calc.py

This file was deleted.

13 changes: 3 additions & 10 deletions src/modules/calc.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#!/usr/bin/python
import math

""" The file contains help methods to logic functions.
These are object independent; they only need the data given as parameters
to return a result.
"""

point_proximity_radius = 5
import ship_data

def direction_to_point(current_point, target_point):
a = math.radians(current_point['latitude'])
Expand All @@ -23,8 +16,8 @@ def get_heading_angle(heading, current_point, target_point):

return heading - angle

def point_proximity(current_point, target_point):
return (distance(current_point, target_point) <= point_proximity_radius)
def within_radius_of_target(current_point, target_point):
return (distance(current_point, target_point) <= ship_data.point_proximity_radius)

def distance(point1, point2):
a = math.sin(math.radians(point1['latitude']))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 176a5a7

Please sign in to comment.