Closed rsuzuki0 closed 2 years ago
The ADIF specification allows it (Frequency is in Mhz and supports decimals) I still need to check for the FLE specification.
I will try to implement something like: normalize to Khz (3 digits after Mhz) unless there are more significant digits (down to the Hz). Need some more thoughts to do properly.
My preference is not to change the number of significant digits by truncation. I would probably only record/specify what I find meaningful myself. But I can't predict others' behavior... Thanks!
So you decided to truncate to 100Hz? The document says 500Hz.
Rounding when using floats (internal storage) and converting to string can be tricky. I chose a quick solution.
The principle is that if the frequency has been entered in the FLE file with more than 3 digits after the "." (checked with a regex), I truncate to the 100 Hz(no rounding), otherwise the frequency is aligned on the Khz. See https://github.com/on4kjm/FLEcli/blob/43f26eda695abeb85bf15bc3c9baa9b169d5fd5b/fleprocess/parse_line.go#L185
I don't know what is the behaviour of the original (windows) program. And I can't check as the old family windows machine died last summer.
But we can definitely revisit this behaviour (and open a new issue). Let's see if the first "production run" gives other issues.
I think the frequency is currently truncated to a whole kHz, but can that be left untruncated?
I often QSY by 500Hz or so to avoid QRM. I usually log that fact on paper and it'd be nicer if that stays in the ADIF.