Skip to content

Commit

Permalink
Cosmetic changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 22, 2008
1 parent 9c5fbd6 commit ec9daf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions igc2kmz/coord.py
Expand Up @@ -19,13 +19,13 @@


R = 6371000.0
cardinal = 'N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW'.split()
cardinals = 'N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW'.split()


def rad_to_cardinal(rad):
while rad < 0.0:
rad += 2 * pi
return cardinal[int(8 * rad / pi + 0.5) % 16]
return cardinals[int(8 * rad / pi + 0.5) % 16]


class degreeattr(object):
Expand Down Expand Up @@ -111,7 +111,7 @@ def interpolate(self, other, delta):

def coord_at(self, theta, d):
"""Return the point d from self in direction theta."""
lat = asin(sin(self.lat) * cos(d / R) \
lat = asin(sin(self.lat) * cos(d / R)
+ cos(self.lat) * sin(d / R) * cos(theta))
lon = self.lon + atan2(sin(theta) * sin(d / R) * cos(self.lat),
cos(d / R) - sin(self.lat) * sin(lat))
Expand Down

0 comments on commit ec9daf0

Please sign in to comment.