Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sondehub Amateur Upload #6

Open
darksidelemm opened this issue Apr 18, 2022 · 8 comments
Open

Sondehub Amateur Upload #6

darksidelemm opened this issue Apr 18, 2022 · 8 comments

Comments

@darksidelemm
Copy link

Hi!

We are setting up a new HAB database, based on the SondeHub architecture. It's still early days, but the initial map is here: https://amateur.sondehub.org/

It would be awesome if we could have telemetry from TTN flights being uploaded into this DB!

Telemetry is uploaded to the API at: https://api.v2.sondehub.org/amateur/telemetry
Information on this API is here: https://github.com/projecthorus/sondehub-infra/wiki/API-(Beta)#amateurtelemetry

Telemetry is uploaded in a common format described here: https://github.com/projecthorus/sondehub-infra/wiki/%5BDRAFT%5D-Amateur-Balloon-Telemetry-Format

Unlikely Habitat, the SondeHub DB does not accept UKHAS strings (yet), and instead accepts a JSON object with some mandatory, and some optional fields. Multiple packets are uploaded by uploading a list of objects, which can be GZIPed to reduce transfer size. An example of an uploaded packet is as follows:

[
{
  "software_name": "ttnhabbridge", # Receiving software name
  "software_version": "0.0.1", # Receiving software version
  "uploader_callsign": "foobar",                 # Mandatory - TTN station name?
  "uploader_position": [ -34.0, 138.0, 0 ],  # Optional - TTN station location, if available
  "uploader_radio": "???",  # Optional - Any other details 
  "uploader_antenna": "???", # Optional - other rx details
  "snr": 11.79, # Optional - Receiver metadata - SNR
  "frequency": 434.201003, # Optional - Receiver Metadata - RX Frequency
  "modulation": "LoRaWAN - TTNv3", # Optional, but recommended - Modulation type
  "time_received": "2022-04-18T04:36:59.899304Z", # Time the packet was received on the TTN network
  "datetime": "2022-04-18T04:36:58.000000Z", # Date/time reported by the payload itself. Use todays UTC date if no date available.
  "payload_callsign": "CALLSIGN_HERE", # Callsign of the payload
  "frame": 6, # Optional - Frame number 
  "lat": -34.1, # Mandatory - Position
  "lon": 138.1,
  "alt": 100.0,
  "temp": 30, # Some examples of optional fields 
  "sats": 0,
  "batt": 3.15,
},
{ more packets },
{ more packets} 
]

Some example Python code that uploads to the DB is here: https://github.com/projecthorus/horusdemodlib/blob/master/horusdemodlib/sondehubamateur.py#L253

Noting that each packet from a LoRaWAN payload may be received by a large number of receivers, currently the best way to handle this is to put multiple copies of the packet into the uploaded list, with different uploader information in each packet.

@MedadRufus
Copy link
Contributor

Anybody planning to try integrating with Sondhub Amateur? I am planning to take a stab at it.

@darksidelemm
Copy link
Author

I had a chat with bertrik on IRC a few weeks back, he was going to take a look at it at some point.

If you're going to have a go, feel free to bug me on #highaltitude if you have questions/issues with the API.

@MedadRufus
Copy link
Contributor

Will the API end point be able to handle custom defined fields(e.g. radiation levels) or only the optional telemetry fields defined in https://github.com/projecthorus/sondehub-infra/wiki/%5BDRAFT%5D-Amateur-Balloon-Telemetry-Format?

@darksidelemm
Copy link
Author

You can feed in whatever you like, just anything unknown won't show up on the amateur.sondehub.org tracker at the moment (Still working on how to handle arbitrary field names cleanly).

@darksidelemm
Copy link
Author

You can also come chat with us on Discord here: https://discord.gg/uxwEBR7z

@SteveRan
Copy link

SteveRan commented Sep 3, 2022

What is the current situation with this?

@MedadRufus
Copy link
Contributor

What is the current situation with this?

I was doing some work to support sondehub uploads but have not completed it. Work in #8

@SteveRan
Copy link

SteveRan commented Sep 5, 2022

Thanks Medad - but you think you have all you need to finish it - you don't need any development work on SondeHub (as far as you know) the reason I ask is HabHub is most likely going to be decommissioned at the end of the month. I just checking round prior to putting a statement out on [UKHAS][GPSL][picoballoon].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants