Skip to content

Commit c252cff

Browse files
modified out of bounds corrections in rot2prog.ROT2Prog.set()
1 parent 7c982d0 commit c252cff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rot2prog/rot2prog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ def set(self, az, el):
160160
# make sure the inputs are within bounds and correct violations
161161
if(az > self.max_az):
162162
while(az > self.max_az):
163-
az -= 360
163+
az -= self.max_az
164164
logging.warning('Azimuth corrected to: ' + str(round(float(az), 2)))
165165
if(az < self.min_az):
166166
while(az < self.min_az):
167-
az += 360
167+
az += self.min_az
168168
logging.warning('Azimuth corrected to: ' + str(round(float(az), 2)))
169169

170170
if(el > self.max_el):

0 commit comments

Comments
 (0)