kopia lustrzana https://github.com/projecthorus/horusdemodlib
Add frequency upload to habitat
rodzic
fe9c1192d2
commit
4f3947e6cb
23
README.md
23
README.md
|
@ -48,6 +48,14 @@ $ cd build
|
||||||
$ ctest
|
$ 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
|
### 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)
|
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 .
|
$ 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
|
## Further Reading
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.3.1"
|
__version__ = "0.3.2"
|
||||||
|
|
|
@ -62,6 +62,8 @@ class HabitatUploader(object):
|
||||||
self.listener_antenna = listener_antenna
|
self.listener_antenna = listener_antenna
|
||||||
self.position_uploaded = False
|
self.position_uploaded = False
|
||||||
|
|
||||||
|
self.last_freq_hz = None
|
||||||
|
|
||||||
self.callsign_init = False
|
self.callsign_init = False
|
||||||
self.uuids = []
|
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.
|
# The URl to upload to.
|
||||||
_url = f"{self.HABITAT_URL}{self.HABITAT_DB}/_design/payload_telemetry/_update/add_listener/{sha256(_sentence_b64).hexdigest()}"
|
_url = f"{self.HABITAT_URL}{self.HABITAT_DB}/_design/payload_telemetry/_update/add_listener/{sha256(_sentence_b64).hexdigest()}"
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,7 @@ def main():
|
||||||
# Add in frequency estimate, if we have been supplied a receiver frequency.
|
# Add in frequency estimate, if we have been supplied a receiver frequency.
|
||||||
if args.freq_hz:
|
if args.freq_hz:
|
||||||
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(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 via UDP
|
||||||
send_payload_summary(_decoded, port=user_config['summary_port'])
|
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.
|
# Add in frequency estimate, if we have been supplied a receiver frequency.
|
||||||
if args.freq_hz:
|
if args.freq_hz:
|
||||||
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(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 via UDP
|
||||||
send_payload_summary(_decoded, port=user_config['summary_port'])
|
send_payload_summary(_decoded, port=user_config['summary_port'])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "horusdemodlib"
|
name = "horusdemodlib"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
description = "Project Horus HAB Telemetry Demodulators"
|
description = "Project Horus HAB Telemetry Demodulators"
|
||||||
authors = ["Mark Jessop"]
|
authors = ["Mark Jessop"]
|
||||||
license = "LGPL-2.1-or-later"
|
license = "LGPL-2.1-or-later"
|
||||||
|
|
Ładowanie…
Reference in New Issue