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

add images to the README #91

Merged
merged 5 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/images/*.png filter=lfs diff=lfs merge=lfs -text
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,37 @@ track high-altitude balloon telemetry with a TNC-equipped radio connected via US

## Installation

retrieve the latest compiled executable from the [Releases page](https://github.com/UMDBPP/PacketRaven/releases)
download the latest compiled executable from the [Releases page](https://github.com/UMDBPP/PacketRaven/releases)

---
**NOTE**

Alternatively, you may download the source code and compile the program yourself:

```shell
git clone https://github.com/UMDBPP/PacketRaven.git
cd packetraven
cargo build
```
> **Note**
> Alternatively, you can download the source code and compile the program yourself:
> ```shell
> git clone https://github.com/UMDBPP/PacketRaven.git
> cd packetraven
> cargo build --release
> ls target/release
> ```

## Usage

To run ``packetraven``, open a terminal window and type the path to the executable file.
The program accepts a single argument; the configuration filename.
For more information on creating configuration files, [read the documentation](https://packetraven.readthedocs.io).

For example, to run ``packetraven`` on ``examples/example_1.yaml``, run the following:

```shell
packetraven examples/example_1.yaml
```

For usage examples, see the `examples/` directory or [read the documentation](https://packetraven.readthedocs.io).
![log messages tab](/docs/images/example1_log.png)

Use the left and right arrow keys (or `Tab` and `Shift+Tab`) to switch between tabs:
![track tab w/ plot of altitude over time](/docs/images/example1_altitude.png)

Use the up and down arrow keys to switch between plots:
![track tab w/ plot of ascent rate over time](/docs/images/example1_ascent_rate.png)
![track tab w/ plot of ground speed over altitude](/docs/images/example1_ground_speed.png)
![track tab w/ plot of unprojected coordinates](/docs/images/example1_coordinates.png)

To quit the program, press `q` or `Esc`.
3 changes: 3 additions & 0 deletions docs/images/example1_altitude.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/example1_ascent_rate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/example1_coordinates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/example1_ground_speed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/example1_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/rk5l_20230528_altitude.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/rk5l_20230528_coordinates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/rk5l_20230528_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions src/utilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@ pub mod local_datetime_string {
let value: String = String::deserialize(deserializer)?;
Ok(match chrono::DateTime::parse_from_rfc3339(&value) {
Ok(datetime) => datetime.with_timezone(&chrono::Local),
Err(_) => match chrono::Local.datetime_from_str(&value, FORMAT) {
Ok(datetime) => datetime,
Err(_) => chrono::NaiveDate::parse_from_str(&value, "%Y-%m-%d")
.map_err(serde::de::Error::custom)?
.and_hms_opt(0, 0, 0)
.unwrap()
.and_local_timezone(chrono::Local)
.unwrap(),
Err(_) => match chrono::DateTime::parse_from_str(&value, "%Y-%m-%d %H:%M:%S %Z") {
Ok(datetime) => datetime.with_timezone(&chrono::Local),
Err(_) => match chrono::Local.datetime_from_str(&value, FORMAT) {
Ok(datetime) => datetime,
Err(_) => chrono::NaiveDate::parse_from_str(&value, "%Y-%m-%d")
.map_err(serde::de::Error::custom)?
.and_hms_opt(0, 0, 0)
.unwrap()
.and_local_timezone(chrono::Local)
.unwrap(),
},
},
})
}
Expand Down