Difference between revisions of "SatNOGS Client Development"

From SatNOGS Wiki
m (Intro: fix typo)
(Setting up a gr-satnogs development environment)
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Intro ==
+
==Intro==
 
This page describes the setup of a development environment for the
 
This page describes the setup of a development environment for the
 
SatNOGS ground station reference setup based on [https://gitlab.com/librespacefoundation/satnogs/satnogs-client-ansible satnogs-client-ansible].
 
SatNOGS ground station reference setup based on [https://gitlab.com/librespacefoundation/satnogs/satnogs-client-ansible satnogs-client-ansible].
It is assumed you have already setup your ground station as explained in [[SatNOGS_Client_Ansible]].
+
It is assumed you have already setup your ground station as explained in [[SatNOGS_Client_Setup]].
  
== gr-satnogs and gr-satnogs-package ==
+
==satnogs-flowgraphs==
 +
For each Satellite Transmitter Mode there is a specific flowgraph in this package. There are generic (e.g. CW) and satellite-specific flowgraphs. The Satellite-Transmitter-Mode-to-flowgraph mapping is defined in satnogs-client. This package is using gr-soapy for SDR hardware support and gr-satnogs for required GNURadio blocks.
 +
<br />
 +
==gr-satnogs==
  
The gnuradio Out-Of-Tree module [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs gr-satnogs] is packaged by [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package gr-satnogs-package]. The gitlab-CI automatically builds the package in docker containers as nightlies and on each release (git-tag, e.g. [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/-/jobs/artifacts/1.3-1/raw/build/debian/output/armhf/gr-satnogs_1.3-1_armhf.deb?job=release-armhf gr-satnogs_1.3-1_armhf.deb]), configured by the [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs/blob/master/.gitlab-ci.yml .gitlab-ci.yml].
+
The gnuradio Out-Of-Tree module [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs gr-satnogs] provides blocks required by satnogs-flowgraphs. The gitlab-CI automatically builds the package in docker containers, configured by the [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs/blob/master/.gitlab-ci.yml .gitlab-ci.yml]. The built packages for releases are pushed to the librespace:satnogs package repository, the built package for the latest development version on master is pushed to the librespace:satnogs-unstable package repository.
  
To use a modified gr-satnogs module on a SatNOGS ground station, it’s recommended to build it using the gr-satnogs-package scripts. Otherwise you can build gr-satnogs manually and adjust the installation paths to match the paths specified by gr-satnogs-package.
+
To use a modified gr-satnogs module on a SatNOGS ground station, it’s recommended to clone your fork on your station, build the patched gr-satnogs packages and install it.
  
Building gr-satnogs with gr-satnogs-package can be automated via gitlab-CI, so that binary releases of your modified gr-satnogs module are available to download and install by the satnogs-client-ansible scripts (<code>satnogs-setup</code>).
+
To install the latest development version of gr-satnogs on your station, set <code>experimental=True</code> or configure  in <code>satnogs-setup</code>.
  
=== Steps. ===
+
<br />
  
* Fork gr-satnogs
+
===Setting up a gr-satnogs development environment===
* Fork gr-satnogs-package
 
* Adjust the repository url of gr-satnogs in [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/debian/debian/rules#L22 gr-satnogs-package/debian/debian/rules#L22]
 
* Adjust the repository url in the version detection in [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L13 gr-satnogs-package/.gitlab-ci.yml#L13] ,[https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L30 #L30] ,[https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L47 #L47]
 
* Wait for the gitlab-CI to build your first version of gr-satnogs-package (~45 min)
 
* Install your freshly built gr-satnogs-package by pointing the <code>SATNOGS_RADIO_GR_SATNOGS_PACKAGE</code> in satnogs-setup to the built artifact/debian package of your architecture (e.g. <code>armhf</code>, <code>amd64</code>). The build artifacts are available in your gr-satnogs-package fork by clicking CI/CD, selecting there the latest pipeline, the latest build-job and then in the right column <code>Browse</code>, path <code>build/debian/output/$your_arch/gr-satnogs_$your_arch.deb</code>
 
  
== satnogs-client ==
+
OUTDATED since [https://gitlab.com/librespacefoundation/satnogs/satnogs-client-ansible/-/commit/336a3206fbeec8e1a5257ce375578f31a92988e4 satnogs-client-ansible@336a320]!
The [https://gitlab.com/librespacefoundation/satnogs/satnogs-client satnogs-client] is a python package, and gets installed by satnogs-setup in a python virtual environment using [https://pip.pypa.io pip].
 
The development branch for the current releases 0.x is named <code>0</code>. It's the original client implementation and features a local web interface.
 
A new implementation which aimed at a more modular architecture and doesn't include the local web interface anymore is developed in the <code>master</code> branch (currently stale as of 2018-07-13).
 
  
Please note that satnogs-client and gr-satnogs must be installed in compatible versions, due to (frequent) changes in the arguments available in the demodulation scripts, see [[Compatibility]].
+
*Fork gr-satnogs
=== Steps. ===
+
*Fork gr-satnogs-package
TODO.
+
*Adjust the repository url of gr-satnogs in [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/debian/debian/rules#L22 gr-satnogs-package/debian/debian/rules#L22]
 +
*Adjust the repository url in the version detection in [https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L13 gr-satnogs-package/.gitlab-ci.yml#L13] ,[https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L30 #L30] ,[https://gitlab.com/librespacefoundation/satnogs/gr-satnogs-package/blob/master/.gitlab-ci.yml#L47 #L47]
 +
*Wait for the gitlab-CI to build your first version of gr-satnogs-package (~45 min)
 +
*Install your freshly built gr-satnogs-package by pointing the <code>SATNOGS_RADIO_GR_SATNOGS_PACKAGE</code> in satnogs-setup to the built artifact/debian package of your architecture (e.g. <code>armhf</code>, <code>amd64</code>). The build artifacts are available in your gr-satnogs-package fork by clicking CI/CD, selecting there the latest pipeline, the latest build-job and then in the right column <code>Browse</code>, path <code>build/debian/output/$your_arch/gr-satnogs_$your_arch.deb</code>
 +
 
 +
==satnogs-client==
 +
The [https://gitlab.com/librespacefoundation/satnogs/satnogs-client satnogs-client] is a python package, and gets installed by satnogs-setup in a python virtual environment using [https://pip.pypa.io/ pip]. The development is done in the  <code>master</code> branch.
 +
 
 +
Please note that satnogs-client and satnogs-flowgraphs must be installed in compatible versions, due to (frequent) changes in the arguments available in the demodulation scripts, see [[Compatibility]].
 +
===Setting up a satnogs-client development environment===
 +
 
 +
#Fork [https://gitlab.com/librespacefoundation/satnogs/satnogs-client satnogs-client]
 +
#Clone the repository on your development machine
 +
#Create a new branch (e.g. station123) with your changes & push it
 +
#Run satnogs-setup and change the value of <code>SATNOGS_CLIENT_URL</code> to point to your repository and branch as described in [[SatNOGS_Client_Setup#Advanced_Setup]]
 +
#Hit "Apply" in satnogs-setup to finally install your satnogs-client version
 +
#Profit.
 +
 
 +
=== Miscellaneous development notes ===
 +
 
 +
* [[How to bodge an immediate observation in for testing purposes]]
 +
 
 +
[[Category:Develop]]
 +
[[Category:Software]]

Latest revision as of 21:55, 12 August 2022

Intro

This page describes the setup of a development environment for the SatNOGS ground station reference setup based on satnogs-client-ansible. It is assumed you have already setup your ground station as explained in SatNOGS_Client_Setup.

satnogs-flowgraphs

For each Satellite Transmitter Mode there is a specific flowgraph in this package. There are generic (e.g. CW) and satellite-specific flowgraphs. The Satellite-Transmitter-Mode-to-flowgraph mapping is defined in satnogs-client. This package is using gr-soapy for SDR hardware support and gr-satnogs for required GNURadio blocks.

gr-satnogs

The gnuradio Out-Of-Tree module gr-satnogs provides blocks required by satnogs-flowgraphs. The gitlab-CI automatically builds the package in docker containers, configured by the .gitlab-ci.yml. The built packages for releases are pushed to the librespace:satnogs package repository, the built package for the latest development version on master is pushed to the librespace:satnogs-unstable package repository.

To use a modified gr-satnogs module on a SatNOGS ground station, it’s recommended to clone your fork on your station, build the patched gr-satnogs packages and install it.

To install the latest development version of gr-satnogs on your station, set experimental=True or configure in satnogs-setup.


Setting up a gr-satnogs development environment

OUTDATED since satnogs-client-ansible@336a320!

  • Fork gr-satnogs
  • Fork gr-satnogs-package
  • Adjust the repository url of gr-satnogs in gr-satnogs-package/debian/debian/rules#L22
  • Adjust the repository url in the version detection in gr-satnogs-package/.gitlab-ci.yml#L13 ,#L30 ,#L47
  • Wait for the gitlab-CI to build your first version of gr-satnogs-package (~45 min)
  • Install your freshly built gr-satnogs-package by pointing the SATNOGS_RADIO_GR_SATNOGS_PACKAGE in satnogs-setup to the built artifact/debian package of your architecture (e.g. armhf, amd64). The build artifacts are available in your gr-satnogs-package fork by clicking CI/CD, selecting there the latest pipeline, the latest build-job and then in the right column Browse, path build/debian/output/$your_arch/gr-satnogs_$your_arch.deb

satnogs-client

The satnogs-client is a python package, and gets installed by satnogs-setup in a python virtual environment using pip. The development is done in the master branch.

Please note that satnogs-client and satnogs-flowgraphs must be installed in compatible versions, due to (frequent) changes in the arguments available in the demodulation scripts, see Compatibility.

Setting up a satnogs-client development environment

  1. Fork satnogs-client
  2. Clone the repository on your development machine
  3. Create a new branch (e.g. station123) with your changes & push it
  4. Run satnogs-setup and change the value of SATNOGS_CLIENT_URL to point to your repository and branch as described in SatNOGS_Client_Setup#Advanced_Setup
  5. Hit "Apply" in satnogs-setup to finally install your satnogs-client version
  6. Profit.

Miscellaneous development notes