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

Add documentation about IQ files (Explain error: Ill-formed WAVE file: no RIFF tag found) #20

Open
pleira opened this issue May 16, 2020 · 3 comments

Comments

@pleira
Copy link

pleira commented May 16, 2020

My Satnogs Station 771 is configured to store the IQ files of the different satellite passes. I have tried using noaa-apt on the saved files, but it does not work and an error message is produced instead:
ERROR [noaa_apt] Ill-formed WAVE file: no RIFF tag found

So this issue is really to have a way to use noaa-apt with these kind of IQ files. Maybe this could be done in noaa-apt code or maybe it could be documented how IQs should be prepared. In that case, after and before the observations in satnogs, custom shell scripts can be run, which know details like TLE, can be used to provide some information for noaa-apt. In any case, it would be great if users get some feedback on what they can do in this case.

The IQs should be accessible under the URL http://satnogs771.freedombox.rocks/, it might be not always available pending to fix Dynamic DNS updates.

@martinber
Copy link
Owner

martinber commented May 17, 2020

Yes, this program can't demodulate IQ files. To do that, a FM demodulator should be implemented. Currently, only WAV files are supported because these are already FM demodulated by SDR#, GQRX, etc.

We could add documentation on how to demodulate IQ into WAV, but it is not very easy. The only way I know would be to open the IQ files in SDR# or GQRX, but there are different IQ formats, some work in some programs and not in others. As far as I know it would be hard to document because different steps are needed for different IQ files. I think that sox is the best tool to convert IQ files to different formats.

If you think that it is common to use Satnogs IQ files, we can document on how to convert with sox, open them in GQRX and export to WAV from there.

rtl_fm would be ideal for this, but I think it does not support loading of IQ files.

EDIT: Saving this link for later

@pleira
Copy link
Author

pleira commented May 18, 2020

Thanks for the interesting feedback. I have renamed my IQ files to use raw as extension.

Regarding documenting using rtl_fm and/or sox for preparing IQ files for noaa_apt, if simple to document, it might be worth to add a small description. Satnogs is going to be there producing IQ files in the future. This weather-satellites project, has a submit job script which uses rtl_fm, and apt.sh which does sox ${file}.wav -r 11025 ${file}_res.wav. Satnogs itself, is using gnuradio companion scripts. I lack expertise for the details, but well, I welcome a recipe if it were a few shell commands.

@martinber
Copy link
Owner

martinber commented Jul 7, 2020

I've added a short comment about this in the usage page.

This project looks really promising: https://github.com/cubehub/demod, as I can see, that program is able to demodulate any IQ file into WAV

The problem with IQ files is that there are different formats and it isn't evident from the filename. WAV files have this information inside the file (metadata) but with IQ files you have to know:

  • If it has float or integer numbers
  • The bit depth: 8 bit, 16 bit, etc.
  • The sample rate
  • Byte order: It is always little endian?
  • Number of channels: 1 or 2 if stereo

To solve this issue, a short tutorial about this program would be needed. And also a list of common IQ formats, e.g. GQRX uses 32bit floats, little endian, 1 or 2 channels and the sample rate is listed in the filename

@martinber martinber changed the title Users should get information on what to do for Error Ill-formed WAVE file: no RIFF tag found Add documentation about IQ files (Explain error: Ill-formed WAVE file: no RIFF tag found) Jul 7, 2020
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

2 participants