jerabaul29/OpenMetBuoy-v2021a

frequency vs period dyslexia

jerabaul29 opened this issue · 4 comments

It looks like I have suffered a case of frequency vs period dyslexia :) .

There (and in all files where this is repeated):

float tz = sqrt_m2 / sqrt_m0;
float tc = sqrt_m4 / sqrt_m2;

What I am really computing is fz and fc, NOT Tz and Tc. So, there is a factor 1.0 /. This is a general error, it would be error prone to correct it everywhere and to recompile the (otherwise fine) firmware, so I think that the best method is to "mark it as a quirk", and fix this in the decoder instead, by inverting the values to recover the correct value.

FYI @tnn77 @CatherineTaelman @jvoermans @MalinUiT , a "minor" issue ie a factor 1/ . I suppose you had noticed but "just corrected on your own" :) . The new decoder (pushed a few minutes ago) fixes that.

tnn77 commented

@jerabaul29
ah sorry, I use the decoder to obtain spectrum only, so I did not notice this.

No worries :) . Yes indeed, all of this is anyways only derived from the spectrum that we are transmitting in full, so this is just redundant - it is at least as good to work directly with the spectrum :) .

Good to know, thank you Jean!