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

Beta development - Fix histograms on Bookworm #1069

Merged
merged 51 commits into from
Sep 10, 2024

Conversation

creas002
Copy link
Contributor

No description provided.

creas002 and others added 30 commits August 12, 2024 12:05
Tested PPM Offset was passed and processed by satdump correctly when receive scripts were called from AT jobs with settings.yml values of :

noaa_15_freq_offset: -2
noaa_18_freq_offset: -1
noaa_19_freq_offset: 0
meteor_m2_3_freq_offset: 1
meteor_m2_4_freq_offset: 2
OS Lite versions Bookworm 64 & Bullseye 32 fail on fresh OS install

I have tested this fix on Bookworm 64-bit full & lite as well as Bullseye 32-bit Full/lite

OS Lite versions do not have .config, but when its created as as part of the .config/meteordemod task below
The .config ownership of top directory is root:root 755 when this happens and it needs to be target_user:target_user 700
RN2 installs have been placing a second config/annotation directory under ${HOME} which is not used.

As part of this clean up the verification tool permissions list has this directory and is sub directory removed from being checked.
ppm_correction should only be used for RTPSDR and RTL-TCP, there may be other receivers that can use it but unknown
This was left out of ansible/roles/common/templates/noaa-v2.conf.j2 template file which caused an error for anyone enabling it.

# Coronal mass ejection activity
ENABLE_CORONAL={{ enable_coronal|lower }}
Modified receivenoaa.sh & receive_meteor.sh scripts to pass PPM & Offset based on receiver type.

Also added a log statement so everybody can see whats getting sent to satdump from output.log

/home/richard/raspberry-noaa-v2/scripts/receive_noaa.sh "NOAA 18" NOAA-18-20240813-153343 /home/richard/raspberry-noaa-v2/tmp/orbit.tle 1723563223 3 32 Southbound E

# I added setting FREQ_OFFSET=""  when its not an rtlsdr receiver to prevent the Offset being passed to satdump

if [[ "$receiver" == "rtlsdr" ]]; then
  gain_option="--gain"
  ppm_correction="--ppm_correction"
else
  gain_option="--general_gain"
  FREQ_OFFSET=""
fi

I tested it for NOAA 18 and you can see PPM and Offset was passed to satdump as desired:

richard@raspberrypi:~$ /home/richard/raspberry-noaa-v2/scripts/receive_noaa.sh "NOAA 18" NOAA-18-20240813-153343 /home/richard/raspberry-noaa-v2/tmp/orbit.tle 1723563223 3 32 Southbound E
INFO : The system has enough space to store a NOAA pass on RAM
INFO : Free : 7454 ; Required : 50
INFO : Direction Southbound
INFO : Cropping SatDump NOAA images enabled
INFO : Recording /home/richard/raspberry-noaa-v2 via rtlsdr at  MHz via SatDump live pipeline
INFO : /usr/bin/satdump live noaa_apt . --source rtlsdr --samplerate 1.024e6 --ppm_correction 0 --frequency 137.9125e6 --satellite_number 18 --sdrpp_noise_reduction   --gain 49.6  --autocrop_wedges --start_timestamp 1723563313 --save_wav  --timeout 3
INFO : Files recorded
INFO : Resampling down audio
INFO : Producing pristine image
INFO : Bulding pass map

Satdump log shows ppm was passed

14:08:43 - 13/08/2024] (D) Parameters :
[14:08:43 - 13/08/2024] (D)    - align_timestamps : true
[14:08:43 - 13/08/2024] (D)    - audio_samplerate : 50000.0
[14:08:43 - 13/08/2024] (D)    - autocrop_wedges : true
[14:08:43 - 13/08/2024] (D)    - baseband_format : "cf32"
[14:08:43 - 13/08/2024] (D)    - buffer_size : 1000000
[14:08:43 - 13/08/2024] (D)    - frequency : 137912500
[14:08:43 - 13/08/2024] (D)    - gain : 49.6
[14:08:43 - 13/08/2024] (D)    - max_crop_stddev : 3500
[14:08:43 - 13/08/2024] (D)    - ppm_correction : 0
[14:08:43 - 13/08/2024] (D)    - samplerate : 1024000

# Since I don't have another SDR receiver type, I flipped the logic to test that neither --ppm_correction or Offset values were passed to setdump using:

if [[ "$receiver" == "rtlsdr" ]]; then
  gain_option="--general_gain"
  FREQ_OFFSET=""
else
  gain_option="--gain"
  ppm_correction="--ppm_correction"
fi

richard@raspberrypi:~$ /home/richard/raspberry-noaa-v2/scripts/receive_noaa.sh "NOAA 18" NOAA-18-20240813-153343 /home/richard/raspberry-noaa-v2/tmp/orbit.tle 1723563223 3 32 Southbound E
INFO : The system has enough space to store a NOAA pass on RAM
INFO : Free : 7452 ; Required : 50
INFO : Direction Southbound
INFO : Cropping SatDump NOAA images enabled
INFO : Recording /home/richard/raspberry-noaa-v2 via rtlsdr at  MHz via SatDump live pipeline
INFO : /usr/bin/satdump live noaa_apt . --source rtlsdr --samplerate 1.024e6   --frequency 137.9125e6 --satellite_number 18 --sdrpp_noise_reduction   --general_gain 49.6  --autocrop_wedges --start_timestamp 1723563313 --save_wav  --timeout 3
^CINFO : Files recorded
INFO : Resampling down audio
INFO : Producing pristine image
INFO : Bulding pass map

Satdump log shows ppm & offset was not passed

[14:11:17 - 13/08/2024] (D) Parameters :
[14:11:17 - 13/08/2024] (D)    - align_timestamps : true
[14:11:17 - 13/08/2024] (D)    - audio_samplerate : 50000.0
[14:11:17 - 13/08/2024] (D)    - autocrop_wedges : true
[14:11:17 - 13/08/2024] (D)    - baseband_format : "cf32"
[14:11:17 - 13/08/2024] (D)    - buffer_size : 1000000
[14:11:17 - 13/08/2024] (D)    - frequency : 137912500
[14:11:17 - 13/08/2024] (D)    - general_gain : 49.6
[14:11:17 - 13/08/2024] (D)    - max_crop_stddev : 3500
[14:11:17 - 13/08/2024] (D)    - samplerate : 1024000

I modified receive_metoer.sh and performed the same testing

/home/richard/raspberry-noaa-v2/scripts/receive_meteor.sh "METEOR-M2 4" METEOR-M2-4-20240813-194754 /home/richard/raspberry-noaa-v2/tmp/orbit.tle 1723578474 3 83 Northbound W

I tested it for M2-4  and you can see PPM and Offset was passed to satdump as desired:

INFO : The system has enough space to store a Meteor pass on RAM
INFO : Free : 7462 ; Required : 10
INFO : Direction Northbound
INFO : I'll flip this image pass because FLIP_METEOR_IMG is set to true and PASS_DIRECTION is Northbound
INFO : Recording /home/richard/raspberry-noaa-v2 via rtlsdr at 137.9000 MHz using SatDump record
INFO : /usr/bin/satdump live meteor_m2-x_lrpt . --source rtlsdr --samplerate 1.024e6 --ppm_correction 0 --frequency 137.9000e6   --gain 49.6   --fill_missing --timeout 3
INFO : Removing old bmp, gcp, and dat files
INFO : Running MeteorDemod to demodulate OQPSK file, rectify (spread) images, create heat map and composites and convert them to JPG
INFO : Waiting for files to close

Satdump log shows ppm was passed

[14:32:22 - 13/08/2024] (D) Parameters :
[14:32:22 - 13/08/2024] (D)    - baseband_format : "cf32"
[14:32:22 - 13/08/2024] (D)    - buffer_size : 1000000
[14:32:22 - 13/08/2024] (D)    - cadu_size : 8192
[14:32:22 - 13/08/2024] (D)    - constellation : "oqpsk"
[14:32:22 - 13/08/2024] (D)    - derandomize : true
[14:32:22 - 13/08/2024] (D)    - fill_missing : true
[14:32:22 - 13/08/2024] (D)    - frequency : 137900000
[14:32:22 - 13/08/2024] (D)    - gain : 49.6
[14:32:22 - 13/08/2024] (D)    - nrzm : true
[14:32:22 - 13/08/2024] (D)    - ppm_correction : 0
[14:32:22 - 13/08/2024] (D)    - rs_dualbasis : false
[14:32:22 - 13/08/2024] (D)    - rs_i : 4
[14:32:22 - 13/08/2024] (D)    - rs_type : "rs223"
[14:32:22 - 13/08/2024] (D)    - rs_usecheck : true
[14:32:22 - 13/08/2024] (D)    - samplerate : 1024000

# Since I don't have another SDR receiver type, I flipped the logic to test that neither --ppm_correction or Offset values were passed to setdump using:

NFO : The system has enough space to store a Meteor pass on RAM
INFO : Free : 7463 ; Required : 10
INFO : Direction Northbound
INFO : I'll flip this image pass because FLIP_METEOR_IMG is set to true and PASS_DIRECTION is Northbound
INFO : Recording /home/richard/raspberry-noaa-v2 via rtlsdr at 137.9000 MHz using SatDump record
INFO : /usr/bin/satdump live meteor_m2-x_lrpt . --source rtlsdr --samplerate 1.024e6   --frequency 137.9000e6   --general_gain 49.6   --fill_missing --timeout 3
INFO : Removing old bmp, gcp, and dat files
INFO : Running MeteorDemod to demodulate OQPSK file, rectify (spread) images, create heat map and composites and convert them to JPG
INFO : Waiting for files to close

Satdump log shows ppm & offset was not passed

[14:35:06 - 13/08/2024] (D) Parameters :
[14:35:06 - 13/08/2024] (D)    - baseband_format : "cf32"
[14:35:06 - 13/08/2024] (D)    - buffer_size : 1000000
[14:35:06 - 13/08/2024] (D)    - cadu_size : 8192
[14:35:06 - 13/08/2024] (D)    - constellation : "oqpsk"
[14:35:06 - 13/08/2024] (D)    - derandomize : true
[14:35:06 - 13/08/2024] (D)    - fill_missing : true
[14:35:06 - 13/08/2024] (D)    - frequency : 137900000
[14:35:06 - 13/08/2024] (D)    - general_gain : 49.6
[14:35:06 - 13/08/2024] (D)    - nrzm : true
[14:35:06 - 13/08/2024] (D)    - rs_dualbasis : false
[14:35:06 - 13/08/2024] (D)    - rs_i : 4
[14:35:06 - 13/08/2024] (D)    - rs_type : "rs223"
[14:35:06 - 13/08/2024] (D)    - rs_usecheck : true
[14:35:06 - 13/08/2024] (D)    - samplerate : 1024000
Corrected testing syntax and added a useful link to get page token
Change include: to include_tasks:
removed AIM 31304 satellite (decom'd) allowing satdump to download/build its. TLE files in ${HOME}/.config/satdump/satdump_tles.txt
Ensure config file in /usr/share/satdump/satdump/satdump_cfg.json is removed, so future installs/cloing/in-situ upgrades are sure to generate a file reflective of the template in ansible.
Update configs.yml - Added force: yes to /usr/share/satdump/satdump_cfg.json
updated for validation tool permissions.list for 5 new DEB files
Enhanced histogram fix so it will working on RPi's and VM's running Bookworm or Bullseye
@MihajloPi MihajloPi merged commit a89fe9d into jekhokie:beta-development Sep 10, 2024
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

Successfully merging this pull request may close these issues.

2 participants