APT decoding with wxtoimg

I am working on script to decode APT images from NOAA sat.
When executed after a satellite pass no file were created !!!

With sudo satnogs-setup command I set variable POST_OBSERVATION_SCRIPT to execute simple_decoder.sh

Here is my very simple script simple_decoder.sh (829 Bytes)

As you can see in following log post_observation_script.log (9.0 KB)

ls: cannot access ‘./*.ogg’: No such file or directory

It seems there is no ogg files in /tmp/.satnogs/data. But ogg file is present with ls command
content_satnogs_data.log (552 Bytes)

Any ideas to acces ogg file ?

Moreover how can I accept terms of wxtoimg with satnogs user ?

Type YES to accept the above terms:

Thanks in advance

Bonjour,

I’m pretty sure that the script will run after all the other scripts have been running meaning after the ogg file was uploaded and deleted from your local server.

73’s Martin 9V1RM / F8UKP

The file is renamed to .ogg after running of the post observation script. Before that, the file extension is .out.

1 Like
  1. I will try to copy .out file to .ogg file
  2. I dont know how to type YES to accept wxtoimg terms.

Is there a best way to call my script ?

using wxtoimg without the gui shouldn’t require any terms acceptance. Have you looked at the code shown in the link below?

Just make sure that you do not copy it into the same directory as the client will try to do it later.

Copy *.out file to another folder done

Now I am facing starting wxtoimg by satnogs user
Indeed it seems post-obersvation scripts are executed by satnogs user.
Here is my script simple_script.sh (14.2 KB) and the execution log execution.log (9.9 KB)

At the first time we execute wxtoimg we need to accept : WXTOIMG TERMS and type YES
Do you know how to accept terms by satnogs user ?

This may not directly address your issues but here is my recent experience using wxtoimg / xwxtoimg, been having a lot of fun manually making images like

(hurricane Laura over Louisiana)

the wxtoimg website was abandoned and author cannot be found: https://leshamilton.co.uk/wxtoimg.htm

Restored website: https://wxtoimgrestored.xyz/

Under ‘Software’ / ‘Downloads’ at the bottom are registration keys for Kevin Schuchmann -
image

My process is to get the raw iq (at 66560 samples/sec) and replay with gqrx and create an audio file - probably redundant if we have the ogg, I’ll have to try that :sunglasses: Convert the 48k 2 channel audio to 11025 1 channel with:

sox ~/gqrx_20200827_142816_14237000.wav -r 11025 -c 1 202008271303.wav remix 1,2 <-- file name end time UTC

touch -t 202008270903 202008271303.wav <-- set file timestamp to same local time

Uh, then I start up the gui xwxtoimg to create the map overlay - open audio file above, let it decode - I do not see the map but it is there in

~/wxtoimg/maps/202008271303.map

then create a test image with:

wxtoimg -o -m ../maps/202008271303.map -f 11024 202008271303.wav 202008271303.png

and check the output image - usually the map will be off a little bit, so touch the file time again with an offset in seconds and play with that until they are aligned

touch -t 202008270903.30 202008271303.wav

That is my working, likely non-optimal, manual process. Of course you have to be able to do it manually before scripting it :slight_smile:

Thanks you for sharing your process.

I already coded a Python script (NOAA_decoder) in order decode APT images with wxtoimg. It’s works very well.
But now I want to decode images and uplaod results to Satnogs server.

Ok looks very good - that gave me a clue on how to create the map from command line (wxmap) :slight_smile:

Ok - here is what I have with the map all command line :slight_smile:

NOAA 18 https://network.satnogs.org/observations/2795813/

$ wget https://ia601507.us.archive.org/30/items/satnogs-observation-2795813/satnogs_2795813_2020-09-05T15-43-25.ogg

$ sox satnogs_2795813_2020-09-05T15-43-25.ogg -r 11025 -c 1 wx.wav

$ touch -t 202009051152.20 wx.wav

$ date +%s -d"2020-09-05 11:52:20"
1599321140

$ wxmap -o  -T "NOAA 18" -H /usr/local/lib/wx/tle/weather.txt -L "38.353664/-81.687318/270" 1599321140 /tmp/map.png
Satellite: NOAA 18
Pass Start: 2020-09-05 15:40:06 UTC
Pass Duration: 15:31
Elevation: 53
Azimuth: 289
Direction: southbound

Then

$ wxtoimg -v -c -k. -t n -e "HVC-precip" -m /tmp/map.png -A -f 11025 wx.wav 2795813b.png
Status: using 16 bit LSB 1 channel 11025 Hz WAVE file...
Satellite: NOAA 18
Status: signal processing............................
Scan Lines: 1060
Status: building image............................
Status: despeckling............................
Status: normalising...
Gain: 17.9
Black Body Temp: 288.10 K
Back Scan Level A: 1
Back Scan Level B: 115
Space Level A: 10
Space Level B: 248
Patch Temp: 105.50 K.........................
Channel A: 1 (visible)
Channel B: 4 (thermal infrared)
Scan Lines: 1061
Status: creating false colour image....................
Status: overlaying map............................
Status: cropping image...
Status: gamma correcting...........................
Status: converting to 8 bits...
Status: writing 909 x 1061 PNG image to 2795813b.png...

and the pic is aligned with the map

I fixed my problem “At the first time we execute wxtoimg we need to accept : WXTOIMG TERMS and type YES”.

Now APT image is correctly decoded. I copied that file in /tmp/.satnogs/data folder in order to be uploaded to satnogs server in observation’s data tab.
I don’t see my file in this tab.

Do you have an idea ?
Is my process correct ?

Hello,

For upload png pics the file must begin with data_ and observation number, date, time…

I upload my apt png pics manually to my satnogs station. This own pdf attached shows the steps for upload manually.

https://community.libre.space/uploads/short-url/g2VI6YzsaKn5dnN9WXq9hO9kLSx.pdf

Greetings.
Oscar.

2 Likes

Thank you for these details.
I uploaded my first decoded image few minutes ago.
https://network.satnogs.org/observations/2821167/

1 Like

Regarding https://network.satnogs.org/observations/2839772/
I decoded many enhancements. All pictures are in data tab.
I completed a big step :slight_smile:

However I don’t know why I don’t see precipitations on images “*-precip”. Is there a configuration file to modify ?