Tagging Pointing Angle¶
This is an informational file for the curious about how pulses get tagged with azimuth and elevation data.
First, a little history:
Previously, the azimuth and elevation were inserted directly into the I/Q data stream in dma poller process. The dma poller would query the motor and actuator, and insert the fields directly into the data stream. The reason I chose to do it that way was that I wanted to minimize the latency so the pointing angle would be as accurate as possible. This led to two problems though:
- The biggest problem was that it c aused data to drop whenever the motor or actuator couldn’t respond quickly for whatever reason. (This could have been mitigated by doing this in another thread, but that’s not what I chose to do.)
- It still wasn’ t very accurate; when looking at plots of the radar data, the radials were not uniformly spaced as they ought to have been. This was for a couple reasons; the communication with the motor/actuator wasn’t deterministic, and the number of pulses that were collected from the DMA buffer was not deterministic. I was hoping that these would be “close enough” but they weren’t.
In order to solve these issues I added the position indicator process. All it does is associate position information with timestamps from the FPGA. That the timestamp is from the FPGA is crucial; it enables associating the az/el with events taking place in the FPGA. So in a loop, the position indicator just reads the timestamps, checks motor position, reads the timestamp, takes the average of the two timestamps and associates that average with the position. It does this for both azimuth and elevation.
The counter that position indicator reads is a 64-bit counter in the FPGA. It’s running on a 120MHz clock, so it will roll over every 4 thousand years. Every pulse of receive data is tagged with the same clock counter; therefore, in theory, the pulses can be associated with a pointing angle with high precision.
Associating the pulses with the pointing angle happens in the pulse processor.