Add frequency upload to habitat

pull/63/head
Mark Jessop 2022-02-05 18:50:42 +10:30
rodzic fe9c1192d2
commit 4f3947e6cb
5 zmienionych plików z 34 dodań i 2 usunięć

Wyświetl plik

@ -48,6 +48,14 @@ $ cd build
$ ctest
```
### Updates
In most cases, you can update this library by running:
```
$ git pull
```
and then following the build steps above from the `cd horusdemodlib` line.
### API Reference
The main demodulator API is [horus_api.h](https://github.com/projecthorus/horusdemodlib/blob/master/src/horus_api.h). An example of it in use in a C program is available in [horus_demod.c](https://github.com/projecthorus/horusdemodlib/blob/master/src/horus_demod.c)
@ -72,6 +80,21 @@ $ pip install -r requirements.txt
$ pip install -e .
```
### Updating
If you have installed horusdemodlib via pypi, then you can simply run:
```
$ pip install -U horusdemodlib
```
This will also install any new dependencies.
If you have installed 'directly', then you will need to run:
```
$ git stash
$ git pull
$ pip install -r requirements.txt
$ pip install -e .
```
## Further Reading

Wyświetl plik

@ -1 +1 @@
__version__ = "0.3.1"
__version__ = "0.3.2"

Wyświetl plik

@ -62,6 +62,8 @@ class HabitatUploader(object):
self.listener_antenna = listener_antenna
self.position_uploaded = False
self.last_freq_hz = None
self.callsign_init = False
self.uuids = []
@ -94,6 +96,11 @@ class HabitatUploader(object):
},
}
if self.last_freq_hz:
# Add in frequency information if we have it.
_data["receivers"][_user_call]["rig_info"] = {"frequency": self.last_freq_hz}
# The URl to upload to.
_url = f"{self.HABITAT_URL}{self.HABITAT_DB}/_design/payload_telemetry/_update/add_listener/{sha256(_sentence_b64).hexdigest()}"

Wyświetl plik

@ -182,6 +182,7 @@ def main():
# Add in frequency estimate, if we have been supplied a receiver frequency.
if args.freq_hz:
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
habitat_uploader.last_freq_hz = _decoded['f_centre']
# Send via UDP
send_payload_summary(_decoded, port=user_config['summary_port'])
@ -226,6 +227,7 @@ def main():
# Add in frequency estimate, if we have been supplied a receiver frequency.
if args.freq_hz:
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
habitat_uploader.last_freq_hz = _decoded['f_centre']
# Send via UDP
send_payload_summary(_decoded, port=user_config['summary_port'])

Wyświetl plik

@ -1,6 +1,6 @@
[tool.poetry]
name = "horusdemodlib"
version = "0.3.1"
version = "0.3.2"
description = "Project Horus HAB Telemetry Demodulators"
authors = ["Mark Jessop"]
license = "LGPL-2.1-or-later"