Skip to content

Commit

Permalink
Adding support for Adalm Pluto SDR #110
Browse files Browse the repository at this point in the history
  • Loading branch information
mgm8 committed Jul 11, 2024
1 parent a8f029e commit 83b4372
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ This program will support the satellites below:
* [SciPy](https://pypi.org/project/scipy/)
* [PyEphem](https://pypi.org/project/ephem/)
* [UHD](https://github.com/EttusResearch/uhd)
* [PyADI-IIO](https://github.com/analogdevicesinc/pyadi-iio)

## Installation on Ubuntu

```sudo apt install python3 python3-gi python3-numpy python3-scipy python3-ephem python3-uhd```

```pip install pyngham```
```pip install pyngham pyadi-iio```

## Installation on Fedora

```sudo dnf install python3 python3-gobject python3-numpy python3-scipy python3-ephem uhd uhd-devel```

```pip install pyngham```
```pip install pyngham pyadi-iio```

## Installing

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pyngham
numpy
scipy
ephem
pyadi-iio
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
],
download_url = "https://github.com/spacelab-ufsc/spacelab-transmitter/releases",
packages = setuptools.find_packages(),
install_requires = ['PyGObject','pyngham','numpy','scipy','ephem'],
install_requires = ['PyGObject','pyngham','numpy','scipy','ephem', 'pyadi-iio'],
entry_points = {
'gui_scripts': [
'spacelab-transmitter = spacelab_transmitter.__main__:main'
Expand Down
14 changes: 13 additions & 1 deletion spacelab_transmitter/spacelabtransmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import spacelab_transmitter.version
from spacelab_transmitter.gmsk import GMSK
from spacelab_transmitter.usrp import USRP
from spacelab_transmitter.pluto import Pluto
from spacelab_transmitter.tc_ping import Ping
from spacelab_transmitter.tc_enter_hibernation import Enter_hibernation

Expand Down Expand Up @@ -622,7 +623,18 @@ def _transmit_tc(self, pkt, tc_name):

samples, sample_rate, duration_s = mod.modulate(enc_pkt, 1000)

sdr = USRP(int(self.entry_sample_rate.get_text()), int(tx_gain))
sdr = None
if self.combobox_sdr.get_active() == 0: # USRP
sdr = USRP(int(self.entry_sample_rate.get_text()), int(tx_gain))
elif self.combobox_sdr.get_active() == 1: # Pluto SDR
sdr = Pluto(int(self.entry_sample_rate.get_text()), int(tx_gain))
else:
error_dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, "Error transmitting a" + tc_name + "telecommand!")
error_dialog.format_secondary_text("SDR device not supported yet!")
error_dialog.run()
error_dialog.destroy()

return

if sdr.transmit(samples, duration_s, sample_rate, int(carrier_frequency)):
self.write_log(tc_name + " transmitted to " + _SATELLITES[self.combobox_satellite.get_active()][0] + " from" + callsign + " in " + carrier_frequency + " Hz with a gain of " + tx_gain + " dB")
Expand Down
2 changes: 1 addition & 1 deletion spacelab_transmitter/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
__copyright__ = "Copyright The SpaceLab-Transmitter Contributors"
__credits__ = ["Gabriel Mariano Marcelino, Vitória Beatriz Bianchin"]
__license__ = "GPLv3"
__version__ = "0.4.5"
__version__ = "0.4.6"
__maintainer__ = "Gabriel Mariano Marcelino - PU5GMA"
__email__ = "gabriel.mm8@gmail.com"
__status__ = "Development"

0 comments on commit 83b4372

Please sign in to comment.