Skip to content

Commit

Permalink
Accel fixed in matlab, not in c# some other nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
davallado committed Feb 1, 2025
1 parent 09b71d4 commit d136971
Show file tree
Hide file tree
Showing 8 changed files with 664 additions and 544 deletions.
11 changes: 4 additions & 7 deletions software/cs/AstroLib/Astrolib/AstroLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4031,7 +4031,6 @@ public void eq2rv
// lod - excess length of day sec
// xp - polar motion coefficient arc sec
// yp - polar motion coefficient arc sec
// terms - number of terms for ast calculation 0,2
// ddpsi, ddeps - corrections for fk5 to gcrf rad
// iau80arr - iau80 coefficients of eop
//
Expand All @@ -4053,9 +4052,9 @@ public void eq2rv
public void rv2flt
(
double[] reci, double[] veci, double[] aeci,
double ttt, double jdut1, double lod,
double xp, double yp, int terms, double ddpsi, double ddeps,
EOPSPWLib.iau80Class iau80arr,
double ttt, double jdut1, double lod,
double xp, double yp, double ddpsi, double ddeps,
out double lon, out double latgc, out double rtasc, out double decl,
out double fpa, out double az, out double magr, out double magv
)
Expand Down Expand Up @@ -4123,7 +4122,6 @@ public void rv2flt
// lod - excess length of day sec
// xp - polar motion coefficient arc sec
// yp - polar motion coefficient arc sec
// terms - number of terms for ast calculation 0,2
// ddpsi, ddeps - corrections for fk5 to gcrf rad
// iau80arr - iau80 coefficients of eop
//
Expand All @@ -4145,9 +4143,9 @@ public void rv2flt
public void flt2rv
(
double rmag, double vmag, double latgc, double lon, double fpa, double az,
double ttt, double jdut1, double lod,
double xp, double yp, int terms, double ddpsi, double ddeps,
EOPSPWLib.iau80Class iau80arr,
double ttt, double jdut1, double lod,
double xp, double yp, double ddpsi, double ddeps,
out double[] reci, out double[] veci
)
{
Expand All @@ -4159,7 +4157,6 @@ public void flt2rv
double[] hcrossr = new double[3];
double temp, rtasc, decl, fpav;

double twopi = 2.0 * Math.PI;
double small = 0.00000001;

// -------- form position vector
Expand Down
247 changes: 229 additions & 18 deletions software/cs/TestAll/TestAll/Form1.cs

Large diffs are not rendered by default.

Binary file not shown.
6 changes: 3 additions & 3 deletions software/matlab/ecef2eci.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@

% veci1 = prec*nut * (stdot*recef + st*pm*vecef') % alt approach using sidereal rate

temp = cross(omegaearth,rpef);
omgxr = cross(omegaearth,rpef);
% two additional terms not needed if satellite is not on surface
% of the Earth
aeci = prec*nut*st*( pm*aecef ) ...
+ cross(omegaearth,temp) + 2.0*cross(omegaearth,vpef);
aeci = prec*nut*st*( pm*aecef ...
+ cross(omegaearth,omgxr) + 2.0*cross(omegaearth,vpef) );

end
2 changes: 1 addition & 1 deletion software/matlab/eci2ecef.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@
temp = cross(omegaearth,rpef);

% two additional terms not needed if satellite is not on surface of the Earth
aecef = pm'*(st'*nut'*prec'*aeci) - cross(omegaearth,temp) - 2.0*cross(omegaearth,vpef);
aecef = pm'*(st'*nut'*prec'*aeci - cross(omegaearth,temp) - 2.0*cross(omegaearth,vpef) );

end
2 changes: 1 addition & 1 deletion software/matlab/eci2tod.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
% references :
% vallado 2022, 225
%
% [rtod, vtod, atod] = eci2tod(reci, veci, aeci, iau80arr, ttt, ddpsi, ddeps, ddx, ddy )
% [rtod, vtod, atod] = eci2tod(reci, veci, aeci, iau80arr, ttt, ddpsi, ddeps)
% ----------------------------------------------------------------------------

function [rtod, vtod, atod] = eci2tod(reci, veci, aeci, iau80arr, ttt, ddpsi, ddeps)
Expand Down
581 changes: 263 additions & 318 deletions software/matlab/ex3_1415.m

Large diffs are not rendered by default.

359 changes: 163 additions & 196 deletions software/matlab/testall.m

Large diffs are not rendered by default.

0 comments on commit d136971

Please sign in to comment.