Changeset 5306
- Timestamp:
- Oct 13, 2005, 10:23:57 AM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 7 edited
-
pslib.kdevelop (modified) (1 diff)
-
src/astro/psEarthOrientation.h (modified) (2 diffs)
-
src/astro/psSphereOps.c (modified) (2 diffs)
-
src/astro/psSphereOps.h (modified) (2 diffs)
-
test/astro/tst_psEarthOrientation.c (modified) (2 diffs)
-
test/astro/tst_psSphereOps.c (modified) (3 diffs)
-
test/astro/verified/tst_psSphereOps.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/pslib.kdevelop
r5231 r5306 49 49 <envvar value="1" name="WANT_AUTOMAKE_1_6" /> 50 50 </envvars> 51 <abortonerror>false</abortonerror>52 <numberofjobs>3</numberofjobs>53 <dontact>false</dontact>54 <makebin/>55 <prio>0</prio>56 51 </make> 57 52 </kdevautoproject> -
trunk/psLib/src/astro/psEarthOrientation.h
r5012 r5306 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005- 09-13 00:50:04$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-10-13 20:23:57 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psSphereOps.h" 22 22 23 /** 24 * 25 * 26 */ 23 27 typedef struct 24 28 { 25 double x; 26 double y; 27 double s; 29 double x; ///< 30 double y; ///< 31 double s; ///< 28 32 } 29 33 psEarthPole; 30 34 35 /** 36 * 37 * 38 */ 31 39 typedef enum { 32 PS_PRECESS_ROUGH, 33 PS_PRECESS_COMPLETE, 34 PS_PRECESS_IAU2000A, 40 PS_PRECESS_ROUGH, ///< 41 PS_PRECESS_COMPLETE, ///< 42 PS_PRECESS_IAU2000A, ///< 35 43 } psPrecessMethod; 36 44 45 /** 46 * 47 * 48 * 49 */ 37 50 psSphere *psAberration( 38 psSphere *apparent, 39 const psSphere *actual, 40 const psSphere *direction, 41 double speed 51 psSphere *apparent, ///< 52 const psSphere *actual, ///< 53 const psSphere *direction, ///< 54 double speed ///< 42 55 ); 43 56 57 /** 58 * 59 * 60 * 61 */ 44 62 psSphere *psGravityDeflection( 45 psSphere *apparent, 46 psSphere *actual, 47 psSphere *sun 63 psSphere *apparent, ///< 64 psSphere *actual, ///< 65 psSphere *sun ///< 48 66 ); 49 67 68 /** 69 * 70 * 71 */ 50 72 double psEOC_ParallaxFactor( 51 const psSphere *coords, 52 const psTime *time 73 const psSphere *coords, ///< 74 const psTime *time ///< 53 75 ); 54 76 77 /** 78 * 79 * 80 */ 55 81 psEarthPole *psEOC_PrecessionModel( 56 const psTime *time 82 const psTime *time ///< 57 83 ); 58 84 85 /** 86 * 87 * 88 */ 59 89 psEarthPole *psEOC_PrecessionCorr( 60 const psTime *time, 61 psTimeBulletin bulletin 90 const psTime *time, ///< 91 psTimeBulletin bulletin ///< 62 92 ); 63 93 94 /** 95 * 96 * 97 */ 64 98 psSphereRot *psSphereRot_CEOtoGCRS( 65 const psEarthPole *pole 99 const psEarthPole *pole ///< 66 100 ); 67 101 102 /** 103 * 104 * 105 */ 68 106 psSphereRot *psSphereRot_TEOtoCEO( 69 const psTime *time 107 const psTime *time ///< 70 108 ); 71 109 110 /** 111 * 112 * 113 */ 72 114 psEarthPole *psEOC_GetPolarMotion( 73 const psTime *time, 74 psTimeBulletin bulletin 115 const psTime *time, ///< 116 psTimeBulletin bulletin ///< 75 117 ); 76 118 119 /** 120 * 121 * 122 */ 77 123 psEarthPole *psEOC_PolarTideCorr( 78 const psTime *time 124 const psTime *time ///< 79 125 ); 80 126 127 /** 128 * 129 * 130 * 131 */ 81 132 psEarthPole *psEOC_NutationCorr( 82 psTime *time 133 psTime *time ///< 83 134 ); 84 135 136 /** 137 * 138 * 139 * 140 */ 85 141 psSphereRot *psSphereRot_ITRStoTEO( 86 const psEarthPole *motion 142 const psEarthPole *motion ///< 87 143 ); 88 144 -
trunk/psLib/src/astro/psSphereOps.c
r4898 r5306 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2005- 08-30 01:14:10$9 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-10-13 20:23:57 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 153 153 154 154 // following came from ADD 155 out->q0 = b3*a0 + b2*a1 - b1*a2 + b0*a3; 156 out->q1 = b3*a1 - b2*a0 + b1*a3 + b0*a2; 157 out->q2 = b3*a2 + b2*a3 + b1*a0 - b0*a1; 158 out->q3 = b3*a3 - b3*a2 - b1*a1 - b0*a0; 155 // out->q0 = b3*a0 + b2*a1 - b1*a2 + b0*a3; 156 // out->q1 = b3*a1 - b2*a0 + b1*a3 + b0*a2; 157 // out->q2 = b3*a2 + b2*a3 + b1*a0 - b0*a1; 158 out->q0 = a3*b0 + a0*b3 + a1*b2 - a2*b1; 159 out->q1 = a3*b1 - a0*b2 + a1*b3 + a2*b0; 160 out->q2 = a3*b2 + a0*b1 - a1*b0 + a2*b3; 161 162 out->q3 = b3*a3 - b2*a2 - b1*a1 - b0*a0; 159 163 160 164 return out; -
trunk/psLib/src/astro/psSphereOps.h
r4937 r5306 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2005- 08-31 22:28:35$9 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-10-13 20:23:57 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 73 73 ); 74 74 75 psSphereRot* psSphereRotAlloc2( 76 double alphaP, ///< north pole latitude 77 double deltaP, ///< north pole longitude 78 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 79 ); 80 81 psSphereRot* psSphereRotAlloc3( 82 double alphaP, ///< north pole latitude 83 double deltaP, ///< north pole longitude 84 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 85 ); 86 87 psSphereRot* psSphereRotAlloc4( 88 double alphaP, ///< north pole latitude 89 double deltaP, ///< north pole longitude 90 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 91 ); 92 93 psSphereRot* psSphereRotAlloc5( 94 double alphaP, ///< north pole latitude 95 double deltaP, ///< north pole longitude 96 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 97 ); 98 99 psSphereRot* psSphereRotAlloc6( 100 double alphaP, ///< north pole latitude 101 double deltaP, ///< north pole longitude 102 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 103 ); 104 105 psSphereRot* psSphereRotAlloc7( 106 double alphaP, ///< north pole latitude 107 double deltaP, ///< north pole longitude 108 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 109 ); 110 111 psSphereRot* psSphereRotAlloc8( 112 double alphaP, ///< north pole latitude 113 double deltaP, ///< north pole longitude 114 double phiP ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares). 115 ); 116 75 117 76 118 /** Checks the type of a particular pointer. -
trunk/psLib/test/astro/tst_psEarthOrientation.c
r5235 r5306 1 /** @file tst_ps Coord.c1 /** @file tst_psEarthOrientation.c 2 2 * 3 3 * @brief The code will go on ... … … 6 6 * @author d-Rob, MHPCC 7 7 * 8 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10- 07 21:27:50$8 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-13 20:23:57 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/test/astro/tst_psSphereOps.c
r5254 r5306 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10- 08 03:51:20$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-13 20:23:57 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 #define ERROR_TOL 0.0001 49 49 50 #define ALPHA_P 0.5 * M_PI51 #define DELTA_P 1.0 * M_PI52 #define PHI_P 1.5 * M_PI50 #define ALPHA_P M_PI/6 51 #define DELTA_P M_PI/4 52 #define PHI_P M_PI/2 53 53 54 54 psS32 testSphereRotAlloc( void ) … … 62 62 return 1; 63 63 } 64 // Verify sin member is updated 65 double vx = cos(DELTA_P)*cos(ALPHA_P); 66 double vy = cos(DELTA_P)*sin(ALPHA_P); 67 double vz = sin(DELTA_P); 68 double q0 = vx * sin(PHI_P/2.0); 69 double q1 = vy * sin(PHI_P/2.0); 70 double q2 = vz * sin(PHI_P/2.0); 71 double q3 = cos(PHI_P/2.0); 72 double len = sqrt(q0*q0 + q1*q1 + q2*q2 + q3*q3); 73 printf("\nvz = %lf\n", vz); 74 q0 = q0/len; 75 q1 = q1/len; 76 q2 = q2/len; 77 q3 = q3/len; 78 64 65 double a0 = (ALPHA_P - PHI_P)/2.0; 66 double a1 = (ALPHA_P - PHI_P)/2.0; 67 double a2 = (ALPHA_P + PHI_P)/2.0; 68 double a3 = (ALPHA_P + PHI_P)/2.0; 69 70 double q3 = cos(a3)*cos(DELTA_P/2); 71 double q0 = sin(a0)*sin(DELTA_P/2); 72 double q1 = cos(a1)*sin(DELTA_P/2); 73 double q2 = sin(a2)*cos(DELTA_P/2); 74 75 printf("\n q0=%lf, q1=%lf, q2=%lf, q3=%lf,\n", q0, q1, q2, q3); 76 printf("myq0=%lf, myq1=%lf, myq2=%lf, myq3=%lf\n", myST->q0, myST->q1, myST->q2, myST->q3); 79 77 if (FLT_EPSILON < fabs(q0 - myST->q0)) { 80 psError(PS_ERR_UNKNOWN,true,"myST->q0 is % f, should be %f\n", myST->q0, q0);78 psError(PS_ERR_UNKNOWN,true,"myST->q0 is %lf, should be %lf\n", myST->q0, q0); 81 79 return 2; 82 80 } -
trunk/psLib/test/astro/verified/tst_psSphereOps.stdout
r5235 r5306 1 2 q0=-0.191342, q1=0.331414, q2=0.800103, q3=0.461940, 3 myq0=-0.191342, myq1=0.331414, myq2=0.800103, myq3=0.461940
Note:
See TracChangeset
for help on using the changeset viewer.
