diff --git a/airpower/aircraft.py b/airpower/aircraft.py index 1e1e243f..28f45643 100644 --- a/airpower/aircraft.py +++ b/airpower/aircraft.py @@ -36,7 +36,7 @@ def __str__(self): self._name, aphexcode.fromxy(self._x, self._y), self._altitude, - apazimuth.toazimuth(self._facing), + apazimuth.fromfacing(self._facing), self._altitudecarry ) @@ -61,7 +61,7 @@ def _position(self): return "%2s %-9s %-3s %2d" % ( apmaps.fromxy(self._x, self._y), aphexcode.fromxy(self._x, self._y), - apazimuth.toazimuth(self._facing), + apazimuth.fromfacing(self._facing), self._altitude ) diff --git a/airpower/azimuth.py b/airpower/azimuth.py index 2b6f75ea..b2fa5a4a 100644 --- a/airpower/azimuth.py +++ b/airpower/azimuth.py @@ -29,7 +29,7 @@ def tofacing(azimuth): raise ValueError("use azimuth \"%s\" instead of \"%s\"" % (superseded[azimuth], azimuth)) return (_northfacing - azimuth) % 360 -def toazimuth(facing): +def fromfacing(facing): azimuth = (_northfacing - facing) % 360 if azimuth % 30 == 0: named = ["N", "NNE", "ENE", "E", "ESE", "SSE", "S", "SSW", "WSW", "W", "WNW", "NNW"]