From 04e5a1909b00e81bc0f4f4adb28c33f8ac12c912 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Mon, 9 Dec 2024 22:33:51 -0700 Subject: [PATCH 1/2] Add EPA gui --- anise-gui/icon-128.png | Bin 7955 -> 0 bytes anise-gui/icon-256.png | Bin 0 -> 16808 bytes anise-gui/src/epa.rs | 100 +++++++++++++++++++ anise-gui/src/main.rs | 4 +- anise-gui/src/pca.rs | 146 +++++++++++++++++++++++++++ anise-gui/src/ui.rs | 222 ++++++++--------------------------------- 6 files changed, 291 insertions(+), 181 deletions(-) delete mode 100644 anise-gui/icon-128.png create mode 100644 anise-gui/icon-256.png create mode 100644 anise-gui/src/epa.rs create mode 100644 anise-gui/src/pca.rs diff --git a/anise-gui/icon-128.png b/anise-gui/icon-128.png deleted file mode 100644 index 0bee42f2b326a4c4686292cf0a4c6874218234c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7955 zcmV+uAMD_XP)tw2D<)m%3aL>sAr8kjw;35d>F6Wzi%gGv~d3oHNO+$(-2|(BJd$ zkU7iueKY4h=X~G03VoCnGbq`kjp1Q9+y%16qL{Kr6y# zln+oo6nM`xSf@(!z*d@vEvB_MzE@vEdV2s-LQ^;h7blv+i2}z1hhbe{Czx2@si*Iy zzy@F?uu@D`_Uq5`L+7&1>9}`wdQAYDXVI^H8>gxA0})OF4oq`s3$Rv&wW6$1;Vl(D za7EaH@<~g7wv3xgN9+k&g{z^2y+tW?_hY}Xa)8TZhzdgy4nr9M91iRsb6P~;O%+}+ zm1U;#{MdTFD9D%ZLljj2vKIpY;313v%;rZ{W^uoQSs!n|B@KO4omWAo11$?VhN z=4cU)2F3v=0Q=ax+koc~{wfh3^DN|pLX4reDT)9DYuF#w4-%``?v3?2n4(j4-%z($2?;xBxMDi62}?x?6^Wj1~H7MrRl-(Jo+ z2sJ1Z00U@5xU;n%3&+i+rMJhJ4UPq1t)HP`cnuip;Is~4zDxPdsCw2r?X$1ZFr8s8 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5WW-wAd88F zm8p_>aRvvC6ACL663xH63SSBV02o`(7bOEZO@%+@vDp{Qc24eV;bKnMtrbD(2>I~Y zg(U{{cyMZ3MYyq|g_|-B!04-dDFpy5uiKriT&%*S#MbBSo*lqKmzz1eOBU2GtpG$> zF@uuwR!%@T6F34m1Q-IeVFiOWBdkJsZtqr}7`B+!-W+ef`G1|{GPOMvk&XZW002ov JPDHLkV1hdx1mpk! diff --git a/anise-gui/icon-256.png b/anise-gui/icon-256.png new file mode 100644 index 0000000000000000000000000000000000000000..6e294cd1b2c0afed9de873d415c22c7a42c6c3a4 GIT binary patch literal 16808 zcmXwhbyyqE_jPc0cXyZK6n80FEV#QC`QQ@V-HW?Bg+hwE7pJ&epv9rQ>G$`%e-QF) zGPAQgxijaUd(Osas4HNglA;0t01PEXSuFqn2KpB8f{X}#1!*WFL;s<;DH?bJ0Pvar z{$TEqq^qF^NxbCry|i6zynM_(tN}hgKAiS0j-Hn0Zq}Tx9=3T`Vx#~7H9$#LO2;?< zvcS(*=kRV+;&_IhzH1rbJS;XgIS0P1q@$rrueQU%QZ8FbGS1M^__?)K*Ra;vx!!0? zgC|F-xuk>hryT9WL}5)8*3ehUQ{Nk%BJ18=rB<=4&VI@fG@0M_OThi7(I>5s z;RW{KIj`-w|J=%U5|+PJmiXu|hZOV8r*9fm;8R@VXyoCblh;pc$=c!F_%arl^VX=1|MBizFa zaE7s*SG=B|^y@IwGon;Ncp)vQTwWOa!!fNV&GuqhxE5ogA;a1vmZSkjpm0q_7&3yY zbC(^8P(gxUa!<(SG;lFk&|E`*%N@eKxyV9BSa{a zIg}p69gsN3*fhp(a1y$rW}efS_7MC1SD^&Tb@b&bPWU`>DT22gN&N&TvZzI1zr}YM zja``FXuZqU^C|cil1Dj93--5CD1`?`2s}fP^s9TppNS^+}y- z^I)18@O^MpRfi3Nji0@9Pv216y^q9>bK-8Kos$=vCuOv7YhzZh&Cw04aqBV1zHf*0 zTFQSrkkzCB@0~i~o$u<0y3$<0J4x*!J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9lIzTL`U|uXiRr>PVK_>G3Dk0TCWM4c9^*!TU!f?0m4AqJQ<7kb z55EELw5zVL{Q7ezq*}j$l*DiN!JUD2M zMM7|;Z7pQCtz6Rq16F3G78?htsTtr8TZnq;=W+d*&_0>bY`A+n;;vJW*+tM_!sCD~ zzrTUo#V6FDsTXGl4+#7PU=4oubYMWfNO?QfQ>7DP~3^$TJhZeE*LS^%cRrV z{11*`q!Qe(le3~b+0QgnQn`vK9CHqsNGqvK$>iY)B_g2wyt|vUeFXAghZr&gku(as zFu@|I>@Y`YVq$fXqxs8QY}U}jiO8m(mrcB+{IGTz(zD=A$UhINT%moXgkBzvMT=_G z{e3;`HFYm1nfuz zEcDkYGev2_gKE%LCzgGV#Z$Q|uR|)|jNvw3P^R-ZmwU!KOSBQ8JoE){I4LtM0G8?_ zby+oH@TuAp3Go=-Nwmn@p~iwD=UQkxT4-`CT?*QBY*$_g z)LR26-5cl+HI8#uA+>KqVB{Xg#{Zqbio8VQ7kSeD@G^p^FEFz6@D|0=Q0JM23e7s5D(VIHNGu?Cj5 zSu4#48b7`OIN9?DyeYX7U`I>().to_vec(); + values.sort_by_key(|(opt_id, _)| match opt_id { + Some(id) => *id, + None => 0, + }); + + for (opt_id, opt_name) in values { + let data = if let Some(id) = opt_id { + epa.get_by_id(*id).unwrap() + } else { + epa.get_by_name(&opt_name.clone().unwrap()).unwrap() + }; + + body.row(30.0, |mut row| { + row.col(|ui| { + ui.label(match opt_name { + Some(name) => format!("{name}"), + None => "Unset".to_string(), + }); + }); + + row.col(|ui| { + ui.label(match opt_id { + Some(id) => format!("{id}"), + None => "Unset".to_string(), + }); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.w)); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.x)); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.y)); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.z)); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.from)); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.to)); + }); + }) + } + }); +} diff --git a/anise-gui/src/main.rs b/anise-gui/src/main.rs index 8fdeb06f..883f4d1d 100644 --- a/anise-gui/src/main.rs +++ b/anise-gui/src/main.rs @@ -6,7 +6,9 @@ mod ui; use ui::UiApp; mod bpc; +mod epa; mod spk; +mod pca; #[cfg(not(target_arch = "wasm32"))] fn main() { @@ -25,7 +27,7 @@ fn main() { viewport: egui::ViewportBuilder::default() .with_inner_size([1024.0, 640.0]) .with_icon( - eframe::icon_data::from_png_bytes(&include_bytes!("../icon-128.png")[..]).unwrap(), + eframe::icon_data::from_png_bytes(&include_bytes!("../icon-256.png")[..]).unwrap(), ), ..Default::default() }; diff --git a/anise-gui/src/pca.rs b/anise-gui/src/pca.rs new file mode 100644 index 00000000..2c203658 --- /dev/null +++ b/anise-gui/src/pca.rs @@ -0,0 +1,146 @@ +use anise::prelude::Almanac; +use egui_extras::{Column, TableBuilder}; + +pub fn pca_ui( + ui: &mut egui::Ui, + almanac: &Almanac, +) { + TableBuilder::new(ui) + .column(Column::auto().at_least(100.0).resizable(true)) + .column(Column::auto().at_least(50.0).resizable(true)) + .column(Column::auto().at_least(75.0).resizable(true)) + .column(Column::auto().at_least(75.0).resizable(true)) + .column(Column::auto().at_least(75.0).resizable(true)) + .column(Column::auto().at_least(125.0).resizable(true)) + .column(Column::auto().at_least(125.0).resizable(true)) + .column(Column::auto().at_least(125.0).resizable(true)) + .column(Column::remainder()) + .header(20.0, |mut header| { + header.col(|ui| { + ui.heading("Name"); + }); + header.col(|ui| { + ui.heading("ID"); + }); + header.col(|ui| { + ui.heading("Gravity param (km^3/s^2)"); + }); + + header.col(|ui| { + ui.heading("Major axis (km)"); + }); + header.col(|ui| { + ui.heading("Minor axis (km)"); + }); + header.col(|ui| { + ui.heading("Polar axis (km)"); + }); + + header.col(|ui| { + ui.heading("Pole right asc."); + }); + header.col(|ui| { + ui.heading("Pole declination"); + }); + header.col(|ui| { + ui.heading("Prime meridian"); + }); + }) + .body(|mut body| { + let pck = &almanac.planetary_data; + + let binding = pck.lut.entries(); + let mut values = binding.values().collect::>().to_vec(); + values.sort_by_key(|(opt_id, _)| match opt_id { + Some(id) => *id, + None => 0, + }); + + for (opt_id, opt_name) in values { + let data = if let Some(id) = opt_id { + pck.get_by_id(*id).unwrap() + } else { + pck.get_by_name(&opt_name.clone().unwrap()).unwrap() + }; + + body.row(30.0, |mut row| { + row.col(|ui| { + ui.label(match opt_name { + Some(name) => format!("{name}"), + None => "Unset".to_string(), + }); + }); + + row.col(|ui| { + ui.label(match opt_id { + Some(id) => format!("{id}"), + None => "Unset".to_string(), + }); + }); + + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", data.mu_km3_s2)); + }); + + match data.shape { + None => { + // Three empty columns + row.col(|ui| { + ui.label("Unset"); + }); + row.col(|ui| { + ui.label("Unset"); + }); + row.col(|ui| { + ui.label("Unset"); + }); + } + Some(shape) => { + row.col(|ui| { + ui.text_edit_singleline(&mut format!( + "{}", + shape.semi_major_equatorial_radius_km + )); + }); + row.col(|ui| { + ui.text_edit_singleline(&mut format!( + "{}", + shape.semi_minor_equatorial_radius_km + )); + }); + row.col(|ui| { + ui.text_edit_singleline(&mut format!("{}", shape.polar_radius_km)); + }); + } + } + + match data.pole_right_ascension { + None => row.col(|ui| { + ui.label("Unset"); + }), + Some(pole_ra) => row.col(|ui| { + ui.label(format!("{pole_ra}")); + }), + }; + + match data.pole_declination { + None => row.col(|ui| { + ui.label("Unset"); + }), + Some(pole_dec) => row.col(|ui| { + ui.label(format!("{pole_dec}")); + }), + }; + + match data.prime_meridian { + None => row.col(|ui| { + ui.label("Unset"); + }), + Some(pm) => row.col(|ui| { + ui.label(format!("{pm}")); + }), + }; + }); + } + }); +} diff --git a/anise-gui/src/ui.rs b/anise-gui/src/ui.rs index 71c95645..b8b9d945 100644 --- a/anise-gui/src/ui.rs +++ b/anise-gui/src/ui.rs @@ -1,14 +1,13 @@ use anise::{almanac::Almanac, errors::AlmanacError}; use eframe::egui; use egui::Theme; -use egui_extras::{Column, TableBuilder}; use hifitime::TimeScale; use log::error; #[cfg(target_arch = "wasm32")] use poll_promise::Promise; -use crate::{bpc::bpc_ui, spk::spk_ui}; +use crate::{bpc::bpc_ui, epa::epa_ui, pca::pca_ui, spk::spk_ui}; #[cfg(target_arch = "wasm32")] type AlmanacFile = Option<(String, Vec)>; @@ -128,7 +127,8 @@ impl eframe::App for UiApp { match &self.path { None => { let mut trigger_file_load = false; - trigger_file_load |= ui.button("Select file to inspect...").clicked(); + trigger_file_load |= + ui.button("Select file to inspect...").clicked(); // If we are in the browser, we need to also check if the file // is ready to be loaded instead of just checking if the button @@ -140,18 +140,17 @@ impl eframe::App for UiApp { // Show the open file dialog if trigger_file_load { - // Try to load this file - match self.load_almanac() { - FileLoadResult::NoFileSelectedYet => { - } - FileLoadResult::Ok((path, almanac)) => { - self.almanac = almanac; - self.path = Some(path); - } - FileLoadResult::Error(e) => { - error!("{e}"); - } + // Try to load this file + match self.load_almanac() { + FileLoadResult::NoFileSelectedYet => {} + FileLoadResult::Ok((path, almanac)) => { + self.almanac = almanac; + self.path = Some(path); } + FileLoadResult::Error(e) => { + error!("{e}"); + } + } } } Some(path) => { @@ -178,7 +177,7 @@ impl eframe::App for UiApp { let mut unload_file = false; ui.vertical(|ui| { - ui.horizontal(|ui|{ + ui.horizontal(|ui| { ui.label(format!("Inspecting {path}")); if ui.button("Close").clicked() { unload_file = true; @@ -192,11 +191,21 @@ impl eframe::App for UiApp { ui.text_edit_singleline(&mut format!("{crc}")); if label.ends_with("SPK") { - let num_summaries = self.almanac.spk_data[0].as_ref().unwrap().daf_summary().unwrap().num_summaries(); + let num_summaries = self.almanac.spk_data[0] + .as_ref() + .unwrap() + .daf_summary() + .unwrap() + .num_summaries(); ui.label("Number of summaries"); ui.label(format!("{num_summaries}")); } else if label.ends_with("PCK") { - let num_summaries = self.almanac.bpc_data[0].as_ref().unwrap().daf_summary().unwrap().num_summaries(); + let num_summaries = self.almanac.bpc_data[0] + .as_ref() + .unwrap() + .daf_summary() + .unwrap() + .num_summaries(); ui.label("Number of summaries"); ui.label(format!("{num_summaries}")); } @@ -226,176 +235,29 @@ impl eframe::App for UiApp { } }); - ui.checkbox( - &mut self.show_unix, - "UNIX timestamps", - ); + ui.checkbox(&mut self.show_unix, "UNIX timestamps"); }); } // Now display the data if label == "DAF/PCK" { - bpc_ui(ui, &self.almanac, self.show_unix, self.selected_time_scale); + bpc_ui( + ui, + &self.almanac, + self.show_unix, + self.selected_time_scale, + ); } else if label == "DAF/SPK" { - spk_ui(ui, &self.almanac, self.show_unix, self.selected_time_scale) + spk_ui( + ui, + &self.almanac, + self.show_unix, + self.selected_time_scale, + ); } else if label == "ANISE/PCA" { - TableBuilder::new(ui) - .column(Column::auto().at_least(100.0).resizable(true)) - .column(Column::auto().at_least(50.0).resizable(true)) - .column(Column::auto().at_least(75.0).resizable(true)) - .column(Column::auto().at_least(75.0).resizable(true)) - .column(Column::auto().at_least(75.0).resizable(true)) - .column(Column::auto().at_least(125.0).resizable(true)) - .column(Column::auto().at_least(125.0).resizable(true)) - .column(Column::auto().at_least(125.0).resizable(true)) - .column(Column::remainder()) - .header(20.0, |mut header| { - header.col(|ui| { - ui.heading("Name"); - }); - header.col(|ui| { - ui.heading("ID"); - }); - header.col(|ui| { - ui.heading("Gravity param (km^3/s^2)"); - }); - - header.col(|ui| { - ui.heading("Major axis (km)"); - }); - header.col(|ui| { - ui.heading("Minor axis (km)"); - }); - header.col(|ui| { - ui.heading("Polar axis (km)"); - }); - - header.col(|ui| { - ui.heading("Pole right asc."); - }); - header.col(|ui| { - ui.heading("Pole declination"); - }); - header.col(|ui| { - ui.heading("Prime meridian"); - }); - }) - .body(|mut body| { - let pck = &self.almanac.planetary_data; - - let binding = pck.lut.entries(); - let mut values = binding.values().collect::>().to_vec(); - values.sort_by_key(|(opt_id, _)| match opt_id { - Some(id) => *id, - None => 0 - }); - - for (opt_id, opt_name) in values - { - let data = if let Some(id) = opt_id { - pck.get_by_id(*id).unwrap() - } else { - pck.get_by_name(&opt_name.clone().unwrap()).unwrap() - }; - - body.row(30.0, |mut row| { - row.col(|ui| { - ui.label(match opt_name { - Some(name) => format!("{name}"), - None => "Unset".to_string(), - }); - }); - - row.col(|ui| { - ui.label(match opt_id { - Some(id) => format!("{id}"), - None => "Unset".to_string(), - }); - }); - - row.col(|ui| { - ui.text_edit_singleline(&mut format!( - "{}", - data.mu_km3_s2 - )); - }); - - match data.shape { - None => { - // Three empty columns - row.col(|ui| { - ui.label("Unset"); - }); - row.col(|ui| { - ui.label("Unset"); - }); - row.col(|ui| { - ui.label("Unset"); - }); - } - Some(shape) => { - row.col(|ui| { - ui.text_edit_singleline( - &mut format!( - "{}", - shape.semi_major_equatorial_radius_km - ), - ); - }); - row.col(|ui| { - ui.text_edit_singleline( - &mut format!( - "{}", - shape.semi_minor_equatorial_radius_km - ), - ); - }); - row.col(|ui| { - ui.text_edit_singleline( - &mut format!( - "{}", - shape.polar_radius_km - ), - ); - }); - } - } - - match data.pole_right_ascension { - None => row.col(|ui| { - ui.label("Unset"); - }), - Some(pole_ra) => { - row.col(|ui| { - ui.label(format!("{pole_ra}")); - }) - } - }; - - match data.pole_declination { - None => row.col(|ui| { - ui.label("Unset"); - }), - Some(pole_dec) => { - row.col(|ui| { - ui.label(format!("{pole_dec}")); - }) - } - }; - - match data.prime_meridian { - None => row.col(|ui| { - ui.label("Unset"); - }), - Some(pm) => { - row.col(|ui| { - ui.label(format!("{pm}")); - }) - } - }; - }); - } - }); + pca_ui(ui, &self.almanac); + } else if label == "ANISE/EPA" { + epa_ui(ui, &self.almanac); } }); From 8b171cb860351b66f820fd6cfe09f256ed5b0105 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Tue, 10 Dec 2024 07:20:13 -0700 Subject: [PATCH 2/2] Add deescription of EPA files --- anise-gui/src/main.rs | 2 +- anise-gui/src/pca.rs | 5 +- anise/src/almanac/metaload/mod.rs | 2 +- anise/src/almanac/mod.rs | 8 +++ anise/src/structure/dataset/mod.rs | 1 + anise/src/structure/dataset/pretty_print.rs | 70 +++++++++++++++++++++ 6 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 anise/src/structure/dataset/pretty_print.rs diff --git a/anise-gui/src/main.rs b/anise-gui/src/main.rs index 883f4d1d..0f0b852c 100644 --- a/anise-gui/src/main.rs +++ b/anise-gui/src/main.rs @@ -7,8 +7,8 @@ use ui::UiApp; mod bpc; mod epa; -mod spk; mod pca; +mod spk; #[cfg(not(target_arch = "wasm32"))] fn main() { diff --git a/anise-gui/src/pca.rs b/anise-gui/src/pca.rs index 2c203658..9a9e1869 100644 --- a/anise-gui/src/pca.rs +++ b/anise-gui/src/pca.rs @@ -1,10 +1,7 @@ use anise::prelude::Almanac; use egui_extras::{Column, TableBuilder}; -pub fn pca_ui( - ui: &mut egui::Ui, - almanac: &Almanac, -) { +pub fn pca_ui(ui: &mut egui::Ui, almanac: &Almanac) { TableBuilder::new(ui) .column(Column::auto().at_least(100.0).resizable(true)) .column(Column::auto().at_least(50.0).resizable(true)) diff --git a/anise/src/almanac/metaload/mod.rs b/anise/src/almanac/metaload/mod.rs index d3e583a5..720485ec 100644 --- a/anise/src/almanac/metaload/mod.rs +++ b/anise/src/almanac/metaload/mod.rs @@ -107,7 +107,7 @@ mod meta_test { let almanac = meta._process(true).unwrap(); // Shows everything in this Almanac - almanac.describe(None, None, None, None, None); + almanac.describe(None, None, None, None, None, None); // Process again to confirm that the CRC check works assert!(meta._process(true).is_ok()); diff --git a/anise/src/almanac/mod.rs b/anise/src/almanac/mod.rs index 7bf65d5d..227d7d4a 100644 --- a/anise/src/almanac/mod.rs +++ b/anise/src/almanac/mod.rs @@ -252,6 +252,7 @@ impl Almanac { spk: Option, bpc: Option, planetary: Option, + eulerparams: Option, time_scale: Option, round_time: Option, ) { @@ -292,5 +293,12 @@ impl Almanac { if planetary.unwrap_or(!print_any) { println!("=== PLANETARY DATA ==\n{}", self.planetary_data.describe()); } + + if eulerparams.unwrap_or(!print_any) { + println!( + "=== EULER PARAMETER DATA ==\n{}", + self.euler_param_data.describe() + ); + } } } diff --git a/anise/src/structure/dataset/mod.rs b/anise/src/structure/dataset/mod.rs index a5aa7758..793dc795 100644 --- a/anise/src/structure/dataset/mod.rs +++ b/anise/src/structure/dataset/mod.rs @@ -41,6 +41,7 @@ io_imports!(); mod datatype; mod error; +mod pretty_print; pub use datatype::DataSetType; pub use error::DataSetError; diff --git a/anise/src/structure/dataset/pretty_print.rs b/anise/src/structure/dataset/pretty_print.rs new file mode 100644 index 00000000..340dfde7 --- /dev/null +++ b/anise/src/structure/dataset/pretty_print.rs @@ -0,0 +1,70 @@ +use tabled::{settings::Style, Table, Tabled}; + +use crate::structure::EulerParameterDataSet; + +use super::NaifId; + +#[derive(Tabled, Default)] +struct EulerParamRow { + #[tabled(rename = "Name")] + name: String, + #[tabled(rename = "ID")] + id: String, + #[tabled(rename = "Quat w")] + qw: f64, + #[tabled(rename = "Quat x")] + qx: f64, + #[tabled(rename = "Quat y")] + qy: f64, + #[tabled(rename = "Quat z")] + qz: f64, + #[tabled(rename = "To ID")] + to: NaifId, + #[tabled(rename = "From ID")] + from: NaifId, +} + +impl EulerParameterDataSet { + /// Returns a table describing this planetary data set + pub fn describe(&self) -> String { + let binding = self.lut.entries(); + let mut values = binding.values().collect::>().to_vec(); + values.sort_by_key(|(opt_id, _)| match opt_id { + Some(id) => *id, + None => 0, + }); + + let mut rows = Vec::new(); + + for (opt_id, opt_name) in values { + let data = if let Some(id) = opt_id { + self.get_by_id(*id).unwrap() + } else { + self.get_by_name(&opt_name.clone().unwrap()).unwrap() + }; + + let row = EulerParamRow { + name: match opt_name { + Some(name) => format!("{name}"), + None => "Unset".to_string(), + }, + id: match opt_id { + Some(id) => format!("{id}"), + None => "Unset".to_string(), + }, + qw: data.w, + qx: data.x, + qy: data.y, + qz: data.z, + to: data.to, + from: data.from, + }; + + rows.push(row); + } + + let mut tbl = Table::new(rows); + tbl.with(Style::modern()); + format!("{tbl}") + } +}