Acu add sin el nod - #1072
Conversation
|
Thanks Michael. I recommend that you move this to "draft" PR until we finalize design and test it on a real system. Initial reactions:
|
|
Aaaah I didn't even know there was a draft PR feature... that's super helpful! (I am not great at git... lol). Changed.
I think rewriting the driver to yield whole number of nods and then rewriting the agent process will be good. One of the worries I had with the current implementation into |
|
Alright I reverted |
c8dee4c to
6db658d
Compare
|
I had to change part of the I also added some comments into the abort checks to make it clear what we're checking for abort mode. |
mhasself
left a comment
There was a problem hiding this comment.
Thanks -- those plots are quite convincing! Looking good but a few comments.
| wait_to_start (float): number of seconds to wait before | ||
| starting a scan, in the case that start_time is None. | ||
| The default is to compute a minimum time based on the | ||
| scan parameters and the ACU ramp-up algorithm; this is | ||
| typically 5-10 seconds. |
There was a problem hiding this comment.
I've removed it because I can't seem to see if its used for anything beyond the initial plan and move to scan start (which isn't used in this el nod function).
748cf3f to
b215786
Compare
mhasself
left a comment
There was a problem hiding this comment.
Last batch of comments (?). Mostly cosmetic but not all!
| def check_completed_nods(): | ||
| return num_nods is None or t * el_freq < num_nods |
There was a problem hiding this comment.
This is vulnerable to rounding error. Instead of using t, just count the nods and check that.
There was a problem hiding this comment.
Changed! Now each loop of generating a nod counts with a num_completed_nod variable
| Note that all parameters are optional except for | ||
| el_depth and el_freq. If only those two parameters | ||
| are passed, the Process will nod with that depth and frequency, | ||
| with the azimuth axis held in Stop, indefinitely (until | ||
| Process .stop method is called).. |
There was a problem hiding this comment.
In fact only el_depth is mandatory. The indefinitely bit is accurately communicated through the arg num_nods. The write-up here makes it sound like "will nod ... held in Stop" is only the case if one only passes those two parameters. Which is not the case. I think you should just mention here that the az axis is held in Stop.
There was a problem hiding this comment.
Fixed up wording to be a bit more clear w.r.t. the az axis. Removed reference to el_freq being mandatory.
| if el_depth == 0: | ||
| raise ValueError("El depth must not be equal to 0 for el nod!") |
There was a problem hiding this comment.
Why not? If zero is not ok ... is 0.0001 ok? Replace with a minimum depth.
There was a problem hiding this comment.
Replaced. I chose a super arbitrary value of abs(el_depth) < 0.1 as the condition. I'm not really sure what the real physical minimum should be. Maybe values less than 0.1 work or maybe values a bit higher than 0.1 don't work? I'm not sure without testing. Maybe we need to check this.
| if el_depth == 0: | ||
| raise ValueError("El depth must not be equal to 0 for el nod!") | ||
|
|
||
| # Could probably use a condition for if the el endpoints are too close? |
There was a problem hiding this comment.
Removed comment as it is resolved by changing the condition
| constant-velocity parts of the motion. The default is | ||
| None, which will cause an appropriate value to be | ||
| chosen automatically (typically 0.1 to 1.0). |
There was a problem hiding this comment.
Fixed. Default is properly commented as 0.1 seconds
| scan_params = {k: params.get(k) for k in [ | ||
| 'num_nods', 'start_time', 'step_time'] | ||
| if params.get(k) is not None} | ||
| step_time = scan_params['step_time'] |
There was a problem hiding this comment.
Careful here -- if indeed params['step_time'] could be None, then this bit will fail with KeyError.
There was a problem hiding this comment.
changed to step_time = 0.1 if 'step_time' not in scan_params.keys() else scan_params['step_time']
| for ax in track_axes: | ||
| # Convert between track axes names and status field names. | ||
| track_axes_names = {'az': 'Az', 'el': 'El'} # There's probably a better way to convert these. | ||
| if current_modes[track_axes_names[ax]] == 'ProgramTrack': |
There was a problem hiding this comment.
You could just use current_modes[ax.capitalize()].
| start_time=None, | ||
| wait_to_start=10., | ||
| step_time=0.05, | ||
| batch_size=500): |
|
|
||
| def generate_sin_el_nod(az, el_endpoint1, el_endpoint2, | ||
| el_freq=.15, | ||
| num_batches=None, |
|
Sorry I fell behind on this for a month due to some personal complications. I've resolved many of the lingering comments. One comment in particular about the minimum el_depth may need some further thinking. I set the minimum el_depth to 0.1 degrees rather arbitrarily. We may need to test what the minimum el_depth really is on the platforms (or just pick a value we know no one will ever try to nod smaller than...) |


Added the
gen_sin_el_nodscan generator function into the ACU drivers.Description
Added a new generator function for generating sinusoidal elevation nods into the ACU agent. This generator will allow us to generate sine wave el nods that do not move in azimuth. This is basically a replica of type3 scan behavior with no azimuth movement.
Motivation and Context
LAT ISO review requested sinusoidal elevation nods with no azimuth movement.
How Has This Been Tested?
I've simmed the

gen_sin_el_noddriver function output with success. The generator function should work as intended.I have not yet tested the changes to the agent
generate_scanfunction or tested an movement on the LAT. This needs to be tested before PR approval.Types of changes
Checklist: