Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous NOAA SAME codes #26

Open
abirger opened this issue Jun 9, 2017 · 2 comments
Open

Erroneous NOAA SAME codes #26

abirger opened this issue Jun 9, 2017 · 2 comments

Comments

@abirger
Copy link

abirger commented Jun 9, 2017

I am generating and decoding NOAA SAME sequences with minimodem on Raspberry Pi 3. Minimodem decodes all right any "live" sequence that I generated with another instance of minimodem as well as any recorded one. However, when I tried to use a professional grade hardware SAME decoder on the sequences generated with minimodem, I got less than perfect results - the HW decoder recognizes about a half of the generated sequence. For example, the decoder reports just this:
ZCZC-WXR-FFW-012011-012086-012099=99?8+,
when I feed it with the result of the following command:
echo "ZCZC-WXR-FFW-012011-012086-012099-012103+0015-1231545-WXYZ/NWS-" | minimodem --tx -A0 same

It looks like the minimodem generates just half of the sequence right, and the second half is faulty. Any idea on why it is happening, and help with a fix would be greatly appreciated.

@abirger abirger changed the title NOAA SAME codes Erroneous NOAA SAME codes Jun 9, 2017
@nkeck720
Copy link

If you're having the same issues I am - that would be pops and clicks in some of the transmissions - try running minimodem --tx --tx-carrier 300 a couple of times until the noise (repeated clicking/popping) stops. I don't know what causes this, I think that a buffer between minimodem and pulseaudio is overflowing or getting overwritten with garbage data. Either way, doing this seems to clear up the issue for a while. It also helps to not have my volume set up all the way, but that could just be because my sound card is wonky. If this doesn't see a fix soon I might just fork the repo and see if I can find a fix myself

@zutroy97
Copy link

zutroy97 commented Dec 5, 2017

I'm using rtl_fm to pipe audio into pulseaudio and a different process to pipe from pulseaudio into minimodem for reading NOAA SAME codes. Minimodem output is not consistent yet reports a confidence level of over 18. Perhaps this is helpful to someone else.

pipeNoaa.sh - Read from Weather broadcast, convert and dump into a pulseaudio sink.

#!/bin/bash
while :
do
 rtl_fm -M fm -f 162.550M  | \
  pacat -p --rate=24000 --channels=1 -d Weather \
   --raw --stream-name=NoaaWeather -n WeatherRadio
 sleep 0.5
done

monitorNoaa.sh - Read from pulseaudio weather radio sink, convert to a wav format, pipe to minimodem.

while :
do
 FILENAME=noaaMonitoring_`date +%F`.txt
 pactl set-sink-volume 2 58000
 parec -d Weather.monitor --raw | \
   sox -r 44100 -t raw -es -b 16 -c 2 -V1 - -c 1 -t wav - | \
   minimodem --rx same --rx-one -c 3 -f - \
   >> $FILENAME 2>&1
 sleep 0.5
done```

Based on nkeck720's comment, I added the set-sink-volume to set the sink volume to 90% of maximum. I'm waiting for another event to determine if it helps with consistency. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants