Skip to content

Commit

Permalink
update metadata and dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed May 30, 2023
1 parent bdddd2b commit 41d4549
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 68 deletions.
42 changes: 19 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 20 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
name = "packetraven"
authors = ["Zach Burnett <zachary.r.burnett@gmail.com>"]
description = "track high-altitude balloon telemetry from a variety of sources"
version = "3.0.5"
version = "3.0.6"
edition = "2021"
readme = "README.md"
license = "GPL-3.0-or-later"
license-file = "LICENSE"
repository = "https://github.com/UMDBPP/PacketRaven.git"
homepage = "https://github.com/UMDBPP/PacketRaven"
documentation = "https://packetraven.readthedocs.io"
Expand All @@ -21,23 +20,23 @@ serial = ["dep:serialport"]
postgres = ["dep:postgres"]

[dependencies]
aprs-parser = "0.4.0"
chrono = { version = "0.4.24", features = ["clock"] }
clap = { version = "4.2.7", features = ["derive"] }
custom_error = "1.9.2"
geo = { version = "0.24.1", features = ["serde"] }
geojson = "0.24.0"
lazy_static = "1.4.0"
log = "0.4.17"
aprs-parser = ">=0.4.0"
chrono = { version = ">=0.4.24", features = ["clock"] }
clap = { version = ">=4.2.7", features = ["derive"] }
custom_error = ">=1.9.2"
geo = { version = ">=0.24.1", features = ["serde"] }
geojson = ">=0.24.0"
lazy_static = ">=1.4.0"
log = ">=0.4.17"
postgres = { version="0.19.5", optional=true }
ratatui = "0.20.1"
crossterm = "*"
regex = "1.8.1"
reqwest = { version = "0.11.17", features = ["json", "blocking", "gzip"] }
serde = "1.0.160"
serde_json = "1.0.96"
serde_with = { version = "3.0.0", features = ["chrono"] }
serde_yaml = "0.9.21"
serialport = { version= "4.2.0", optional=true }
url = "2.3.1"
geo-types = "0.7.9"
ratatui = ">=0.21.0"
crossterm = ">=0.26.1"
regex = ">=1.8.1"
reqwest = { version = ">=0.11.17", features = ["json", "blocking", "gzip"] }
serde = ">=1.0.160"
serde_json = ">=1.0.96"
serde_with = { version = ">=3.0.0", features = ["chrono"] }
serde_yaml = ">=0.9.21"
serialport = { version= ">=4.2.0", optional=true }
url = ">=2.3.1"
geo-types = ">=0.7.9"
48 changes: 24 additions & 24 deletions src/tui/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ pub fn draw<B: ratatui::backend::Backend>(
)
.split(size);

let mut titles: Vec<ratatui::text::Spans> = app
let mut titles: Vec<ratatui::text::Line> = app
.tracks
.iter()
.map(|track| {
ratatui::text::Spans::from(vec![ratatui::text::Span::styled(
ratatui::text::Line::from(vec![ratatui::text::Span::styled(
track.name.to_owned(),
ratatui::style::Style::default().fg(ratatui::style::Color::Green),
)])
})
.collect();
titles.insert(
0,
ratatui::text::Spans::from(vec![ratatui::text::Span::raw("Log")]),
ratatui::text::Line::from(vec![ratatui::text::Span::raw("Log")]),
);
let tabs = ratatui::widgets::Tabs::new(titles)
.block(ratatui::widgets::Block::default().borders(ratatui::widgets::Borders::ALL))
Expand All @@ -58,7 +58,7 @@ pub fn draw<B: ratatui::backend::Backend>(
_ => bold_style,
};

ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled(
format!("{:} ", time.format(&crate::DATETIME_FORMAT)),
bold_style,
Expand All @@ -67,7 +67,7 @@ pub fn draw<B: ratatui::backend::Backend>(
ratatui::text::Span::raw(message),
])
})
.collect::<Vec<ratatui::text::Spans>>(),
.collect::<Vec<ratatui::text::Line>>(),
)
.scroll((app.log_messages_scroll_offset, 0))
.wrap(ratatui::widgets::Wrap { trim: true })
Expand Down Expand Up @@ -177,7 +177,7 @@ pub fn draw<B: ratatui::backend::Backend>(

let last_location = track.locations.last().unwrap();

let mut last_location_info = vec![ratatui::text::Spans::from(vec![
let mut last_location_info = vec![ratatui::text::Line::from(vec![
ratatui::text::Span::styled("time: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand All @@ -189,15 +189,15 @@ pub fn draw<B: ratatui::backend::Backend>(
])];

if track.locations.len() > 1 {
last_location_info.push(ratatui::text::Spans::from(vec![
last_location_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("since prev.: ", bold_style),
ratatui::text::Span::raw(crate::utilities::duration_string(
intervals.last().unwrap(),
)),
]));
}

last_location_info.push(ratatui::text::Spans::from(vec![
last_location_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("coordinates: ", bold_style),
ratatui::text::Span::raw(format!(
"({:.2}, {:.2})",
Expand All @@ -206,22 +206,22 @@ pub fn draw<B: ratatui::backend::Backend>(
]));

if let Some(altitude) = last_location.location.altitude {
last_location_info.push(ratatui::text::Spans::from(vec![
last_location_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("altitude: ", bold_style),
ratatui::text::Span::raw(format!("{:.2} m", altitude)),
]));
}

if track.locations.len() > 1 {
last_location_info.extend([
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("over ground: ", bold_style),
ratatui::text::Span::raw(format!(
"{:.2} m",
overground_distances.last().unwrap(),
)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("ground speed: ", bold_style),
ratatui::text::Span::raw(format!(
"{:.2} m/s",
Expand All @@ -232,11 +232,11 @@ pub fn draw<B: ratatui::backend::Backend>(

if has_altitude {
last_location_info.extend([
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("ascent: ", bold_style),
ratatui::text::Span::raw(format!("{:.2} m", ascents.last().unwrap(),)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("ascent rate: ", bold_style),
ratatui::text::Span::raw(format!(
"{:.2} m/s",
Expand All @@ -259,7 +259,7 @@ pub fn draw<B: ratatui::backend::Backend>(
let mut descent_info = vec![];
if track.descending() {
if has_altitude {
descent_info.push(ratatui::text::Spans::from(vec![
descent_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("max altitude: ", bold_style),
ratatui::text::Span::raw(format!("{:.2} m", altitude_range[1])),
]));
Expand All @@ -268,7 +268,7 @@ pub fn draw<B: ratatui::backend::Backend>(
if let Some(estimated_time_to_ground) = track.estimated_time_to_ground() {
let landing_time = last_location.location.time + estimated_time_to_ground;

descent_info.push(ratatui::text::Spans::from(vec![
descent_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("est. landing: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand All @@ -284,7 +284,7 @@ pub fn draw<B: ratatui::backend::Backend>(
let landing_time =
last_location.location.time + freefall_estimate.time_to_ground;

descent_info.push(ratatui::text::Spans::from(vec![
descent_info.push(ratatui::text::Line::from(vec![
ratatui::text::Span::styled("@ term. vel.: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand All @@ -300,7 +300,7 @@ pub fn draw<B: ratatui::backend::Backend>(
if let Some(prediction) = &track.prediction {
if let Some(predicted_landing_location) = prediction.last() {
descent_info.extend([
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("pred. landing: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand All @@ -314,7 +314,7 @@ pub fn draw<B: ratatui::backend::Backend>(
.format(&crate::DATETIME_FORMAT)
)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("pred. landing: ", bold_style),
ratatui::text::Span::raw(format!(
"({:.2}, {:.2})",
Expand Down Expand Up @@ -357,7 +357,7 @@ pub fn draw<B: ratatui::backend::Backend>(
as i64,
);
let ascent_info = ratatui::widgets::Paragraph::new(vec![
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("est. max alt.: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand All @@ -368,7 +368,7 @@ pub fn draw<B: ratatui::backend::Backend>(
)
)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("pred. max alt.: ", bold_style),
ratatui::text::Span::raw(format!(
"{:} ({:})",
Expand Down Expand Up @@ -397,7 +397,7 @@ pub fn draw<B: ratatui::backend::Backend>(
let mut track_info = vec![];
if has_altitude {
track_info.extend([
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled(
format!("{:<10}", "pos. ascent rate: "),
bold_style,
Expand All @@ -408,7 +408,7 @@ pub fn draw<B: ratatui::backend::Backend>(
/ positive_ascent_rates.len() as f64
)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled(
format!("{:<10}", "neg. ascent rate: "),
bold_style,
Expand All @@ -423,14 +423,14 @@ pub fn draw<B: ratatui::backend::Backend>(
}

track_info.extend([
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("ground speed: ", bold_style),
ratatui::text::Span::raw(format!(
"{:.2} m/s",
ground_speeds.iter().sum::<f64>() / ground_speeds.len() as f64,
)),
]),
ratatui::text::Spans::from(vec![
ratatui::text::Line::from(vec![
ratatui::text::Span::styled("time interval: ", bold_style),
ratatui::text::Span::raw(crate::utilities::duration_string(
&chrono::Duration::seconds(
Expand Down

0 comments on commit 41d4549

Please sign in to comment.