Skip to content

Commit

Permalink
ACU sun: generate_scan initial seek must be sun-safe too!
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasself committed Nov 3, 2023
1 parent d70ac29 commit 496d07a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions socs/agents/acu/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,10 +1639,14 @@ def generate_scan(self, session, params):

# Seek to starting position
self.log.info(f'Moving to start position, az={plan["init_az"]}, el={init_el}')
ok, msg = yield self._go_to_axes(session, az=plan['init_az'], el=init_el)

if not ok:
return False, f'Start position seek failed with message: {msg}'
legs, msg = yield self._get_sunsafe_moves(plan['init_az'], init_el)
if msg is not None:
self.log.error(msg)
return False, msg
for leg_az, leg_el in legs:
ok, msg = yield self._go_to_axes(session, az=leg_az, el=leg_el)
if not ok:
return False, f'Start position seek failed with message: {msg}'

# Prepare the point generator.
g = sh.generate_constant_velocity_scan(az_endpoint1=az_endpoint1,
Expand Down

0 comments on commit 496d07a

Please sign in to comment.