PW-Sat2 Telemetry decoder


#21

Sorry for answering that late, but unfortunately I’m a bit busy!
There is a possibility to get telemetry “in realtime” (not really realtime in each case, details will follow).
Just to have it said: a proper implementation for a data warehouse is not yet available but at least it is work in progress :wink:

I’ll give some more hints later…


#22

Hah, I didn’t tell a date, anyway :slight_smile:

To get telemetry frames filtered by satellite you can touch the telemetry API endpoint at

New frames are accessible as soon as they are stored in DB - and that’s why it is not really in realtime! The sync mechanism runs in a periodic task that pushes frames from network observations to db and also the client has a periodic task that pushes observation data every two minutes. As I said: there is a proposal on a new version of the data warehouse API that still needs to be defined. Parts of that might already be WIP.

For the telemetry decoder I could put some effort into it over the next few days, but I would need some data verification - maybe you could help with this?

Best regards,
Patrick


#23

Sure, just tell me how can I help :slight_smile: Should I take the decoder (where can I find the latest version? SatNOGS gitlab?), feed it with some test data and check outputs?


#24

Exactly! You can start like that or we’re doing it both: me for satnogs-decoders and you with your decoder and we can compare results. Starting with some frames from SatNOGS-DB I would suggest!

I’ll sum up some steps how to start with satnogs-decoders - gimme ~ 60’


#25

You can start cloning the satnogs-decoders package at gitlab:

$ git clone git@gitlab.com:librespacefoundation/satnogs/satnogs-decoders.git

If you don’t want to mess up your local python installation you should add a virtualenv using:

$ virtualenv -p python3 env
$ source env/bin/activate

Now enter the satnogs-decoders folder and see if there are missing dependencies:

$ cd satnogs-decoders
$ ./contrib/docker-ksc.sh

At the first run the output should look something like this:

Using default tag: latest
latest: Pulling from librespace/kaitai
c5e155d5a1d1: Pull complete 
221d80d00ae9: Pull complete 
4250b3117dca: Pull complete 
3b7ca19181b2: Pull complete 
1eadaf4c0dff: Pull complete 
4c1388ac89fe: Pull complete 
73713755b9cb: Pull complete 
5784ff1c0372: Pull complete 
752f931db2bc: Pull complete 
5201ac6501dd: Pull complete 
Digest: sha256:6321529d6faad300c61478a575363f8e03354bcc356f19b17286a872ca2ec5af
Status: Downloaded newer image for librespace/kaitai:latest

Once the images are up to date it should look like:

Using default tag: latest
latest: Pulling from librespace/kaitai
Digest: sha256:6321529d6faad300c61478a575363f8e03354bcc356f19b17286a872ca2ec5af
Status: Image is up to date for librespace/kaitai:latest
KSYs compiled successfully!

If this works without any errors you can succeed and try to install the package inside the venv:

$ pip install -e .
Obtaining file:///home/pd/software/satnogs-decoders
Collecting kaitaistruct~=0.8.0 (from satnogsdecoders==0.9.3)
Collecting enum34~=1.1.0 (from satnogsdecoders==0.9.3)
  Using cached https://files.pythonhosted.org/packages/af/42/cb9355df32c69b553e72a2e28daee25d1611d2c0d9c272aa1d34204205b2/enum34-1.1.6-py3-none-any.whl
Installing collected packages: kaitaistruct, enum34, satnogsdecoders
  Running setup.py develop for satnogsdecoders
Successfully installed enum34-1.1.6 kaitaistruct-0.8 satnogsdecoders

If you have any errors please post them here - there are too much possible issues to make a full installation manual. Otherwise you already have a working satnogs-decoders packagae installed. There are some tools in the contrib folder to fetch and decode frames from SatNOGS-DB - you can find a basic description in the README.md file. I would suggest you fetch the snippets (which need to be converted into proper “commandline scripts”) written by me and @azisi from here:

I am holding exported frames from SatNOGS-DB in a folder one up from satnogs-decoders/ called sampledata/db-dumps/, where sampledata/ is used for single frames and db-dumps holds the exported frames in .csv files. To fetch exports from DB you will need an account, but I think you will already have one :wink:

Using the snippets above you can easily try to decode PW-Sat2 frames after downloading the exported frames for, e.g., the last week (down on the DB-Page for PW-Sat2) using the following command:

$ cd satnogs-decoders
$ python ../decode-multiple.py -d Pwsat2 -x ../sampledata/db-dumps/43814-293-20190519T151238Z-week.csv 

This should return a lot of json-like decoded frames.

So yeah, that’s a start :wink:
Let’s see what problems come up…


#26

Some of the values already seem to be right, but there maybe some illegal frames (need to find a possibility to check for valid frames yet), see:

pwsat2_obc_boot_ctr

The 0-values seem incorrect, the other values are 1045, 1088 and 1089.

Edit: