Skip to content

Commit

Permalink
Added Debug and Clone to reference frames
Browse files Browse the repository at this point in the history
  • Loading branch information
IndigoCurnick committed Apr 5, 2023
1 parent 929aacc commit dbc9619
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reference_frames/ecef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use super::{
wgs84::WGS84Coord,
};

#[derive(Debug, Clone)]
pub struct ECEF {
// Wrapper for ECEF coordinates
pub x: f64,
Expand Down Expand Up @@ -109,6 +110,7 @@ impl ECEF {
}
}

#[derive(Debug, Clone)]
pub struct ECEFVel {
// Wrapper for ECEF velocities
pub x_vel: f64,
Expand Down
1 change: 1 addition & 0 deletions src/reference_frames/enu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::{ecef::ECEF, ned::NED, wgs84::WGS84Coord};

#[derive(Debug, Clone)]
pub struct ENU {
pub e: f64,
pub n: f64,
Expand Down
3 changes: 3 additions & 0 deletions src/reference_frames/ned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use super::{
enu::ENU,
};

#[derive(Debug, Clone)]
pub struct NED {
// Wrapper for NED coordinates
pub n: f64,
Expand Down Expand Up @@ -76,6 +77,7 @@ impl NED {
// pub fn new_from_ecef_ref(ecef: &ECEF, ref_point: &WGS84Coord) -> NED {} // TODO
}

#[derive(Debug, Clone)]
pub struct NEDVel {
pub n_vel: f64,
pub e_vel: f64,
Expand Down Expand Up @@ -109,6 +111,7 @@ impl NEDVel {
}
}

#[derive(Debug, Clone)]
pub struct NEDAccel {
pub n_accel: f64,
pub e_accel: f64,
Expand Down
2 changes: 2 additions & 0 deletions src/reference_frames/pef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use super::{
teme::{TEMEVel, TEME},
};

#[derive(Debug, Clone)]
pub struct PEF {
pub x: f64,
pub y: f64,
Expand Down Expand Up @@ -55,6 +56,7 @@ impl PEF {
}
}

#[derive(Debug, Clone)]
pub struct PEFVel {
// Wrapper for the PEF coordinate system
pub x_vel: f64,
Expand Down
2 changes: 2 additions & 0 deletions src/reference_frames/teme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::utils::{get_pef_tod_matrix, julian_to_gmst, old_maybe_broken_jday};

use super::pef::{PEFVel, PEF};

#[derive(Debug, Clone)]
pub struct TEME {
// Wrapper for TEME coordinates
// This is the coordinate system used by TLEs
Expand Down Expand Up @@ -32,6 +33,7 @@ impl TEME {
}
}

#[derive(Debug, Clone)]
pub struct TEMEVel {
// Wrapper for TEME velocities
pub x_vel: f64,
Expand Down
1 change: 1 addition & 0 deletions src/reference_frames/wgs84.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{

use super::{ecef::ECEF, ned::NED};

#[derive(Debug, Clone)]
pub struct WGS84Coord {
lat: Radians,
lon: Radians,
Expand Down

0 comments on commit dbc9619

Please sign in to comment.