altillimity / AltiWx

Yet another automated SDR-based station software
35 stars 11 forks source link

Segmentation fault on modem stop #10

Open libmarleu opened 3 years ago

libmarleu commented 3 years ago

Okay now I have a new problem... yeah i have no idea how to fix this

[07/15/21 - 14:58:38] (C) This is the Sample plugin, apparently AltiWx just finished starting.
[07/15/21 - 15:15:09] (I) AOS SPROUT
[R82XX] PLL not locked!
[07/15/21 - 15:15:10] (I) Tuned SDR to 0 Hz
[07/15/21 - 15:15:10] (D) Adding recorder for FM downlink on 437525000 Hz
Allocating 15 zero-copy buffers
[07/15/21 - 15:15:10] (D) Using file path /var/www/html/data/WXGirl/SPROUT/FM/20210715T191509Z/20210715T191509Z.wav
[07/15/21 - 15:15:10] (D) Setting up recorder for FM downlink on 437525000 Hz. Bandwidth 14000 Hz
[07/15/21 - 15:15:10] (D) Adding recorder for SSTV downlink on 437600000 Hz
[07/15/21 - 15:15:10] (D) Using file path /var/www/html/data/WXGirl/SPROUT/SSTV/20210715T191509Z/20210715T191509Z.wav
[07/15/21 - 15:15:10] (D) Setting up recorder for SSTV downlink on 437600000 Hz. Bandwidth 14000 Hz
[07/15/21 - 15:15:10] (I) Recording FM downlink on 437525000 Hz. Bandwidth 14000 Hz
[07/15/21 - 15:15:10] (D) Attaching and starting modem id 39770-FM-437525000 to DSP
[07/15/21 - 15:15:10] (D) Init modem at 437525000Hz bandwidth 14000Hz
[07/15/21 - 15:15:10] (D) Modem resampler rate 0.014000
[07/15/21 - 15:15:10] (D) Modem frequency shift -437525000Hz
[07/15/21 - 15:15:10] (I) Recording SSTV downlink on 437600000 Hz. Bandwidth 14000 Hz
[07/15/21 - 15:15:10] (D) Attaching and starting modem id 39770-SSTV-437600000 to DSP
[07/15/21 - 15:15:10] (D) Init modem at 437600000Hz bandwidth 14000Hz
[07/15/21 - 15:15:10] (D) Modem resampler rate 0.014000
[07/15/21 - 15:15:10] (D) Modem frequency shift -437600000Hz
[07/15/21 - 15:26:47] (D) Detaching modem id 39770-FM-437525000 from DSP
[07/15/21 - 15:26:47] (I) Stopping modem...
Segmentation fault
libmarleu commented 3 years ago

Here is my config file: I've removed the other satellites. (Full file is in edit history)

# How should this station be called?
station_name: WXGirl

# Location used for pass prediction, altitude in meters
station:
  latitude: 26.*****
  longitude: -80.*****
  altitude: 7

# How often should TLEs be checked for updates against Celestrak?
tle_update: 0 0 * * *

# Where to store collected data? (Eg, recordings, etc)
data_directory: /var/www/html/data/WXGirl

# How detailed should logging be?
# Available : trace, debug, info, warn, error, critical, off
# In production you should at least keep info, but debug can provide some valuable informations
log_level: trace

# Configure your SDR here, with some optional settings such as PPM correction
# The sample rate and frequency are in Hz, and the sample rate determines how much band you will be able to cover
# The gain is an INTEGER! Do not use floats (eg, 33.8), this is not supported and will cause the config to fail
radio:
  frequencies:
    - 137100000
    - 137500000
    - 145000000
  samplerate: 1000000
  gain: 49
  # ppm_correction: 0

# All satellites you want to track
satellites:
  - norad: 39770 # SPROUT
    min_elevation: 20
    priority: 2
    downlinks:
      - name: FM
        frequency: 437525000
        bandwidth: 14000
        doppler: true
        post_processing_script:
        output_extension: wav
        type: FM
        parameters:
          audio_samplerate: 48000
      - name: SSTV
        frequency: 437600000
        bandwidth: 14000
        doppler: true
        post_processing_script: sstv-iss.py
        output_extension: wav
        type: FM
        parameters:
          audio_samplerate: 48000

And here is the processing script for SSTV:

import altiwx
import subprocess
import os
from datetime import datetime

# define tmporary directory to use while calculating - mind the slash at the end
altiwx.info("Processing ISS SSTV data...")

# debug
altiwx.info("DEVELOPER DEBUG INFO")
altiwx.info("Freq: " + altiwx.frequency)
altiwx.info("Samplerate: " + altiwx.samplerate)
altiwx.info("Satellite: " + altiwx.satellite_name)
altiwx.info("Elevation: " + altiwx.elevation)
altiwx.info("Sun elevation: " + altiwx.sun_elevation)
altiwx.info("Input file: " + altiwx.input_file)
altiwx.info("Output file: " + altiwx.filename + ".png")
altiwx.info("Northbound: " + altiwx.northbound)
altiwx.info("Southbound: " + altiwx.southbound)

# start of script

command = "sstv -d " + altiwx.input_file + " -o " + altiwx.filename + ".png"
altiwx.debug(command)
subprocess.Popen([command], shell=1).wait()

altiwx.info("Done processing ISS SSTV data!")