ukhas / habitat

Next Generation High Altitude Balloon Tracking
http://habitat.habhub.org/
GNU General Public License v3.0
41 stars 14 forks source link

APRS Daemon #296

Closed rossengeorgiev closed 1 year ago

rossengeorgiev commented 11 years ago

I am nearly finished with the APRS daemon. Currently, a check for active flights is only performed on startup. There are a few things I need to tweak, but that is for later.

Here is what the typical output is like:

$ hp ~/dev/habitat/bin/aprs_importer
[2013-02-21 01:13:53,796] INFO habitat.utils.startup MainThread: Log initialised
[2013-02-21 01:13:53,861] INFO habitat.aprs_daemon MainThread: Checking for active flights
[2013-02-21 01:13:53,872] INFO habitat.aprs_daemon MainThread: 0 active flights with 1 callsigns
[2013-02-21 01:13:53,872] INFO habitat.aprs MainThread: Setting filter to: b/LZ1DEV
[2013-02-21 01:13:53,872] INFO habitat.aprs MainThread: Attempting connection to first.aprs.net:14580
[2013-02-21 01:13:54,375] INFO habitat.aprs MainThread: Sending login information
[2013-02-21 01:13:54,488] INFO habitat.aprs MainThread: Login successful
[2013-02-21 01:14:04,999] INFO habitat.aprs MainThread: Parsing: LZ1DEV>APU25N,TCPIP*,qAC,THIRD:=/8sweTCpK-  BRTL-SDR RX-only
[2013-02-21 01:14:05,001] DEBUG habitat.aprs MainThread: ParseError: unknown format
[2013-02-21 01:15:07,067] INFO habitat.aprs MainThread: Parsing: LZ1DEV>APU25N,TCPIP*,qAC,THIRD:=4241.81N/02317.93E-RTL-SDR RX-only
[2013-02-21 01:15:07,068] DEBUG habitat.aprs MainThread: Parsing as normal uncompressed format
[2013-02-21 01:15:07,068] INFO habitat.aprs MainThread: Parsed ok.
[2013-02-21 01:15:07,703] ERROR habitat.aprs_daemon MainThread: {"error":"forbidden","reason":"New documents may only have _raw in data."}

Uploading listener_telemetry for chasers is ok, However, when I try to create a payload_telemetry doc, it fails with the error above. I figure, it is because how the parser is designed. How can we make it work ?

danielrichman commented 11 years ago

Thank you for writing this! It looks great.

I intend to:

Then I'll deploy it on beta.habitat.habhub.org

However, I can't do that today or tomorrow I'm afraid. Hopefully at the weekend :-)

danielrichman commented 11 years ago

I note that flight_check_interval isn't implemented. Will this be an issue?

rossengeorgiev commented 11 years ago

Thanks @danielrichman

I need to add a few things, including the making use of flight_check_inverval, which will control how often the daemon checks couchdb. Hopefully, I will code them tonight. Then you can make your to changes.

I've tried to follow the code style in habitat. I would love to hear some pointers.

rossengeorgiev commented 11 years ago

It is all yours @danielrichman

Are you sure about moving it to a separate repository? Shouldn't it stay here as it is integrated into habitat?

I think it can be taken further, by having APRS user-defined packets, which would be parsed based on the parser config. Or at least have extra data in the comment part of the packet. Something along those lines.

danielrichman commented 11 years ago

Cool, thanks. Will have a proper look at the weekend - afraid I'm a bit busy tomorrow.

The general plan is that core and important bits go in the habitat repository and then other stuff goes elsewhere, for example there are some parser sensor modules in habitat-extensions. The pythony logistics of doing this arn't too much of an issue.

Perhaps there's an argument for breaking the parser, couchdb bits, general utils, uploader, etc. out into separate repositories but this might be taking it a bit too far. The other thing is that stuff in habitat/ is all unit tested (coinciding with being the really important bits).

Don't worry about that - I'll sort out the repo layout / create a new ukhas repo and then git commit --author your_email

rossengeorgiev commented 11 years ago

Ah yes, I saw the large amount of unit tests. The parser will definitely need those. In fact, it shouldn't be much trouble to make them.

danielrichman commented 11 years ago

Have created https://github.com/ukhas/habitat-aprs

I'm half way through sorting out the telemetry uploading. I hope to do more on this tomorrow.

rossengeorgiev commented 1 year ago

This is old, there is no point keeping it open