Skip to content

Commit

Permalink
Misc. cleanup (strictly non-functional changes)
Browse files Browse the repository at this point in the history
Changes worth saving from stale old branch (now deleted).
  • Loading branch information
ErikPGJ committed May 2, 2022
1 parent 58fe5af commit 2547354
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
7 changes: 4 additions & 3 deletions fix_linux_nativelibs_fkjn.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!bin/bash
# Remove *.so.1 files and replace them with links.
#!/bin/bash
# Remove *.so.1 files and replace them with links to corresponding *.so files.

cd ~/OVT/ovt/dist_static/natives/Linux/

filename_list=$(ls *.so.1 );

for filename in ${filename_list[@]}
do
# ${string/%substring/replacement} If $substring matches back end of $string, substitute $replacement for $substring
echo "Removing" $filename
rm $filename
ln -s ${filename%.1} $filename
ln -s ${filename%.1} $filename
echo "Creating link "${filename%.1} to $filename
done
17 changes: 16 additions & 1 deletion src/ovt/util/Trans.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,23 @@ protected static Matrix3x3 geo_gsm_trans_matrix(double mjd, double[] Eccdz) {

public static Matrix3x3 gei_gse_trans_matrix(double mjd) {
final double[][] gei_gse = new double[3][];

/* Normal vector to the ecliptic (in GEI).
*
* ==> Earth's axial tilt: epsilon_OVT = arctan(0.398/0.917)) = 23.4620 degrees
* Compare, Hapgood 1992 (complete reference above), eq (3) & eq between (4) and (5):
* epsilon = 23.439 - 0.013*((MJD-51544.5/36525.0))
* J1950 : T_0 = -0.5 ==> epsilon = 23.4455 degrees
* J2000 : T_0 = 0 ==> epsilon = 23.4390 degrees
* epsilon = epsilon_OVT ==> T_0 = -1.7692 ==> ~J1823 (Earth axial tilt corresponding to year 1823).
* NOTE: The inference above does not make use of any movements in the first point of Aries
* and only assumes a 1-to-1 correspondence between Earth's axial tilt and time.
* Erik P G Johansson 2019-11-07
*/
final double eqlipt[] = { 0.0, -0.398, 0.917 };
gei_gse[0] = Utils.sunmjd(mjd); // NOTE: Time dependent.

// Can be intrepreted as three (orthonormal) vectors expressed in GEI.
gei_gse[0] = Utils.sunmjd(mjd); // Time-dependent vector from Earth pointing toward the Sun.
gei_gse[1] = Vect.crossn(eqlipt, gei_gse[0]);
gei_gse[2] = Vect.crossn(gei_gse[0], gei_gse[1]);
final Matrix3x3 m = new Matrix3x3(gei_gse);
Expand Down
2 changes: 1 addition & 1 deletion src/ovt/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public static double[] sunmjd(double mjd) {

/**
* vector from earth to sun. NOTE: The use of this function in "sunmjd"
* implies that the returned value is in GEI.
* hints that the returned value is in GEI or GSE.
*/
public static double[] sun_vect(Julian mjd) {
return sun_vectJNI(mjd.integer, mjd.fraction);
Expand Down

0 comments on commit 2547354

Please sign in to comment.