Closed ecbland closed 1 year ago
@ecbland I think this has to do with a change in how IQ samples were treated in the QNX4 vs Linux/QNX6 ROS. The short answer can be found in the IQEncode
function:
From what I can tell, the QNX4 code set an nchannel
parameter as either one or two depending on whether XCFs were present. This nchannel
was used to both populate the IQ data array, and then set the value of an intermediate rxchn
and then iq->chnnum
which is stored in the iqdat
files themselves:
On the other hand, in the Linux/QNX6 ROS on which the RST 3+ series of code is based, it appears rxchn
is instead treated as the number of receiver channels (because the MSI-style QNX6 radars were theoretically capable of up to 4 independent transmit/receive channels):
For most of the MSI-style QNX6 radars rxchn
(and thus iq->chnnum
) is likely always set to one (eg Fort Hays, Christmas Valley, Iceland), so maybe that extra multiplication by 2 in IQEncode
makes sense. But when applied to iqdat
files from any other radar that probably won't be correct.
after a little further digging, it seems the way the size of the IQ sample array is calculated in IQEncode
changed between versions 3.2 and 3.3 of the RST
I think the appropriate way to handle this is to remove the extra multiplication by 2 in IQEncode
, modify the ROS code used by the Linux/QNX6-style radars to set iq->chnnum
equal to 2, and make the corresponding edits to make_raw
. That should bring the iqdat
files of as many of the ROS-style radars in line as possible.
Fixed with #566, thanks @egthomas 😄
When creating an
iqdat
file usingtrim_iq
, thedata
array has double the number of elements as the input file (and the output file approximately doubles in size).I expect that this behaviour comes from the
iq
library rather thantrim_iq
itself. Does anyone know if this behaviour is intended?