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

rewrite entire program in Rust #89

Merged
merged 62 commits into from
May 27, 2023
Merged

rewrite entire program in Rust #89

merged 62 commits into from
May 27, 2023

Conversation

zacharyburnett
Copy link
Member

@zacharyburnett zacharyburnett commented May 9, 2023

preliminary refactor for most functionality. Example output running on examples/example_1.yml:

> cargo run examples/example_1.yml
warning: `packetraven` (bin "packetraven") generated 21 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 7.36s
     Running `target/debug/packetraven ./examples/example_1.yaml`
[2023-05-09T18:48:02Z INFO  packetraven] starting
[2023-05-09T18:48:02Z INFO  packetraven] retrieving packets
[2023-05-09T18:48:02Z INFO  packetraven] reading text file http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-11%20raw.txt
[2023-05-09T18:48:02Z INFO  packetraven] reading text file http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-8%20raw.txt
[2023-05-09T18:48:02Z INFO  packetraven] listening for packets every 10 s from 2 source(s)
[2023-05-09T18:48:03Z INFO  packetraven] W3EAX-8 - location #51 (-76.9995, 39.44566666666666, 2431.0848 m); packet time is 2023-05-09 11:49:33 -04:00 (150 s since the previous packet); traveled 1090.509392496289 m (7.270062616641926 m/s) over the ground and -974.4456 m (-6.496304 m/s) vertically
[2023-05-09T18:48:03Z INFO  packetraven] W3EAX-8 - altitude: 2431.0848 m; avg. ascent rate: 5.874808611842108 m/s; avg. descent rate: -11.796273462788688 m/s; avg. ground speed: 15.040322350263034 m/s; avg. packet interval: 110.32 s
[2023-05-09T18:48:03Z INFO  packetraven] W3EAX-11 - location #107 (-77.05916666666667, 39.420833333333334, 517.8552000000001 m); packet time is 2023-05-09 14:48:03.089828883 -04:00 (0 s since the previous packet); traveled 18.503920416846587 m (inf m/s) over the ground and -309.06719999999996 m (-inf m/s) vertically
[2023-05-09T18:48:03Z INFO  packetraven] W3EAX-11 - altitude: 517.8552000000001 m; avg. ascent rate: inf m/s; avg. descent rate: -inf m/s; avg. ground speed: inf m/s; avg. packet interval: 0 s
[2023-05-09T18:48:03Z INFO  packetraven] received 158 new packets
[2023-05-09T18:48:13Z INFO  packetraven] received 0 new packets

TODO:

  • file output
    • log
    • packet locations (GeoJSON)
    • prediction
  • plotting
    • altitude / time
    • ascent rate / time
    • ground speed / altitude
    • press key to color packets by source w/ legend
  • GUI TUI
  • PostGres support (read and send) relegated to an optional crate feature
    • query
    • post
  • APRS-IS support (read and send)
  • track time interpolation (useful for plotting)
  • SondeHub support
    • query
    • post
  • indication of key mapping (currently Esc or q to quit, Spacebar or r to refresh, Tab or -> to move to the next tab, and Shift+Tab or <- to move to the previous tab)
  • fix log scrolling when pressing up and down keys

@michaelshipman
Copy link
Member

YES

@zacharyburnett
Copy link
Member Author

YES

lol I got sick of Python packaging

still got a whole lot of TODOs though

@zacharyburnett
Copy link
Member Author

zacharyburnett commented May 18, 2023

built a TUI:
image
image
@michaelshipman as I don't have a Windows machine, would you mind testing it with

cargo run examples/example_1.yaml
```

EDIT: that is, if you're still involved in the program, I don't mean to assume

@zacharyburnett
Copy link
Member Author

zacharyburnett commented May 20, 2023

added a plot
image

@michaelshipman
Copy link
Member

Yep still around! I'll try to give it a shot this weekend.

@zacharyburnett
Copy link
Member Author

zacharyburnett commented May 26, 2023

@michaelshipman the compiled binary for Windows is here: https:/UMDBPP/PacketRaven/suites/13162348747/artifacts/715910247

It should work with the first example file:

packetraven.exe examples/example_1.yaml

EDIT: I forgot to mention, the configuration files are tweaked a bit to support more configuration; you can use this example file to test that binary:

packets:
text:
- path: ~/aprs_frames.txt
- path: http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-8%20raw.txt
callsigns: ["W3EAX-8"]

@zacharyburnett
Copy link
Member Author

TUI tested on Windows; merging after other tests pass

@zacharyburnett zacharyburnett enabled auto-merge (squash) May 27, 2023 18:20
@zacharyburnett zacharyburnett merged commit 648204b into main May 27, 2023
@zacharyburnett zacharyburnett deleted the rust branch May 27, 2023 18:20
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

Successfully merging this pull request may close these issues.

2 participants