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

Intertial ECI #41

Open
arf20 opened this issue May 4, 2024 · 0 comments
Open

Intertial ECI #41

arf20 opened this issue May 4, 2024 · 0 comments

Comments

@arf20
Copy link
Owner

arf20 commented May 4, 2024

public double [] rotateEcef2Eci(double[] PosEcef, double dT) {
 /* Compensate for Earth Rotation
 PosEcef:  array [3x1] containing ECEF x,y,z in meters
 dT: RX Time - SV TX Time in s */

   final double omegaE = 7.2921151467e-5; // WGS-84 value of the earth rotation rate [rad/s]
   double theta = (omegaE * dT);
   double [] posEci = new double[3];

   posEci[0] = Math.cos(theta)*PosEcef[0] + Math.sin(theta)*PosEcef[1];
   posEci[1] = -Math.sin(theta)*PosEcef[0] + Math.cos(theta)*PosEcef[1];
   posEci[2] = PosEcef[2];

   return posEci;
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant