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 the last few realizations of WGS84 #114

Merged
merged 1 commit into from
Feb 25, 2025
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
9 changes: 9 additions & 0 deletions swiftnav/src/reference_frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ pub enum ReferenceFrame {
#[allow(non_camel_case_types)]
#[strum(to_string = "DREF91(R2016)", serialize = "DREF91_R2016")]
DREF91_R2016,
#[allow(non_camel_case_types)]
#[strum(to_string = "WGS84(G1762)", serialize = "WGS84_G1762")]
WGS84_G1762,
#[allow(non_camel_case_types)]
#[strum(to_string = "WGS84(G2139)", serialize = "WGS84_G2139")]
WGS84_G2139,
#[allow(non_camel_case_types)]
#[strum(to_string = "WGS84(G2296)", serialize = "WGS84_G2296")]
WGS84_G2296,
}

/// 15-parameter Helmert transformation parameters
Expand Down
68 changes: 67 additions & 1 deletion swiftnav/src/reference_frame/params.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{ReferenceFrame, TimeDependentHelmertParams, Transformation};

pub const TRANSFORMATIONS: [Transformation; 31] = [
pub const TRANSFORMATIONS: [Transformation; 34] = [
Transformation {
from: ReferenceFrame::ITRF2020,
to: ReferenceFrame::ITRF2014,
Expand Down Expand Up @@ -652,4 +652,70 @@ pub const TRANSFORMATIONS: [Transformation; 31] = [
epoch: 2021.0,
},
},
// WGS84(G2296) is defined to be the same as ITRF2020 at epoch 2024.0
Transformation {
from: ReferenceFrame::ITRF2020,
to: ReferenceFrame::WGS84_G2296,
params: TimeDependentHelmertParams {
tx: 0.0,
tx_dot: 0.0,
ty: 0.0,
ty_dot: 0.0,
tz: 0.0,
tz_dot: 0.0,
s: 0.0,
s_dot: 0.0,
rx: 0.0,
rx_dot: 0.0,
ry: 0.0,
ry_dot: 0.0,
rz: 0.0,
rz_dot: 0.0,
epoch: 2024.0,
},
},
// WGS84(G2139) is defined to be the same as ITRF2014 at epoch 2016.0
Transformation {
from: ReferenceFrame::ITRF2014,
to: ReferenceFrame::WGS84_G2139,
params: TimeDependentHelmertParams {
tx: 0.0,
tx_dot: 0.0,
ty: 0.0,
ty_dot: 0.0,
tz: 0.0,
tz_dot: 0.0,
s: 0.0,
s_dot: 0.0,
rx: 0.0,
rx_dot: 0.0,
ry: 0.0,
ry_dot: 0.0,
rz: 0.0,
rz_dot: 0.0,
epoch: 2016.0,
},
},
// WGS84(G1762) is defined to be the same as ITRF2008 at epoch 2005.0
Transformation {
from: ReferenceFrame::ITRF2008,
to: ReferenceFrame::WGS84_G1762,
params: TimeDependentHelmertParams {
tx: 0.0,
tx_dot: 0.0,
ty: 0.0,
ty_dot: 0.0,
tz: 0.0,
tz_dot: 0.0,
s: 0.0,
s_dot: 0.0,
rx: 0.0,
rx_dot: 0.0,
ry: 0.0,
ry_dot: 0.0,
rz: 0.0,
rz_dot: 0.0,
epoch: 2005.0,
},
},
];
Loading