Skip to content

Commit

Permalink
Use LVL rather than LV.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwatsonforster committed Sep 26, 2023
1 parent 2102b51 commit b01c3f7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions airpower/aircraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, name, aircrafttype, hexcode, azimuth, altitude, speed, config
self._altitudecarry = 0
self._speed = speed
self._configuration = configuration
self._flighttype = "LV"
self._flighttype = "LVL"
self._powersetting = "N"
self._fpcarry = 0
self._apcarry = 0
Expand Down Expand Up @@ -137,14 +137,14 @@ def _C(self, altitudechange):

def _D(self, altitudechange):

if not self._flighttype in ["LV", "SD", "UD", "VD"]:
if not self._flighttype in ["LVL", "SD", "UD", "VD"]:
raise ValueError("attempt to dive while flight type is %s." % self._flighttype)

initialaltitude = self._altitude
self._altitude, self._altitudecarry = apaltitude.adjustaltitude(self._altitude, self._altitudecarry, -altitudechange)
altitudechange = initialaltitude - self._altitude

if self._flighttype == "LV":
if self._flighttype == "LVL":
pass
elif self._flighttype == "SD":
if self._lastflighttype == "SD":
Expand Down Expand Up @@ -540,7 +540,7 @@ def _startmovepower(self, power):

def _startmoveflighttype(self, flighttype):

if flighttype not in ["LV", "SC", "ZC", "VC", "SD", "UD", "VD", "ST"]:
if flighttype not in ["LVL", "SC", "ZC", "VC", "SD", "UD", "VD", "ST"]:
raise ValueError("invalid flight type %r." % flighttype)

lastflighttype = self._lastflighttype
Expand Down Expand Up @@ -580,7 +580,7 @@ def _startmoveflighttype(self, flighttype):
self._turnsstalled = None

# See rule 5.5.
if lastflighttype == "LV" and (_isclimbing(flighttype) or _isdiving(flighttype)):
if lastflighttype == "LVL" and (_isclimbing(flighttype) or _isdiving(flighttype)):
requiredhfp = 1
elif (_isclimbing(lastflighttype) and _isdiving(flighttype)) or (_isdiving(lastflighttype) and _isclimbing(flighttype)):
if self._aircrafttype.hasproperty("HPR"):
Expand Down Expand Up @@ -764,7 +764,7 @@ def _endmove(self):
self._speed -= 0.5 * (ap // aprate)
self._apcarry = ap % aprate
else:
if self._flighttype == "LV" or _isclimbing(self._flighttype):
if self._flighttype == "LVL" or _isclimbing(self._flighttype):
maxspeed = self._aircrafttype.maxspeed(self._configuration, self._altitudeband)
elif _isdiving(self._flighttype) or self._flighttype == "ST":
maxspeed = self._aircrafttype.maxdivespeed(self._altitudeband)
Expand All @@ -777,7 +777,7 @@ def _endmove(self):
self._apcarry = ap % aprate

# See rule 6.3.
if self._flighttype == "LV" or _isclimbing(self._flighttype):
if self._flighttype == "LVL" or _isclimbing(self._flighttype):
maxspeed = self._aircrafttype.maxspeed(self._configuration, self._altitudeband)
if self._speed > maxspeed:
self._log("speed is faded back from %.1f." % self._speed)
Expand Down

0 comments on commit b01c3f7

Please sign in to comment.