Skip to content

Commit

Permalink
ACU: limit the scan accel according to max jerk
Browse files Browse the repository at this point in the history
This is documented, and tested, for SATP.  Unclear if limits are same
for LAT.
  • Loading branch information
mhasself committed Oct 11, 2023
1 parent eab28c2 commit db2f447
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion socs/agents/acu/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ def generate_scan(self, session, params):
Process .stop method is called)..
"""
log.info('User scan params: {params}', params=params)
self.log.info('User scan params: {params}', params=params)

az_endpoint1 = params['az_endpoint1']
az_endpoint2 = params['az_endpoint2']
Expand All @@ -1406,6 +1406,16 @@ def generate_scan(self, session, params):
if az_accel is None:
az_accel = self.scan_params['az_accel']

# Do we need to limit the az_accel? This limit comes from a
# maximum jerk parameter; the equation below (without the
# empirical 0.85 adjustment) is stated in the SATP ACU ICD.
min_turnaround_time = (0.85 * az_speed / 9 * 11.616)**.5
max_turnaround_accel = 2 * az_speed / min_turnaround_time
if az_accel > max_turnaround_accel:
self.log.warn('WARNING: user requested accel=%.2f; limiting to %.2f' %
(az_accel, max_turnaround_accel))
az_accel = max_turnaround_accel

# If el is not specified, drop in the current elevation.
init_el = None
if el_endpoint1 is None:
Expand Down

0 comments on commit db2f447

Please sign in to comment.