MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / AstroConverter

Class AstroConverter

Astronomy_/src/main/java/astroj/AstroConverter.java:150–5815  ·  view source on GitHub ↗

This plugin converts sky coordinates in a variety of formats. @author K.A. Collins, University of Louisville @version 1.0 @date 2011-12-27

Source from the content-addressed store, hash-verified

148 *
149 */
150public class AstroConverter extends LeapSeconds implements ItemListener, ActionListener, ChangeListener, MouseListener // PropertyChangeListener, MouseMotionListener, MouseWheelListener,
151{
152 public static final boolean FORWARD = true;
153 public static final boolean REVERSE = false;
154 static final double J2000 = 2451545.; // the julian epoch 2000
155 static final double DEG_IN_RADIAN = 57.2957795130823;
156 static final double HRS_IN_RADIAN = 3.81971863420549;
157 static final double ARCSEC_IN_RADIAN = 206264.806247096;
158 static final double PI_OVER_2 = 1.5707963267949;
159 static final double PI = 3.14159265358979;
160 static final double TWOPI = 6.28318530717959;
161 static final double EARTHRAD_IN_AU = 23454.7910556298; // earth radii in 1 AU
162 static final double EARTHRAD_IN_KM = 6378.1366; // equatorial
163 static final double KMS_AUDAY = 1731.45683633; // 1731 km/sec = 1 AU/d
164 static final double SPEED_OF_LIGHT = 299792.458; // exact, km/s.
165 static final double SS_MASS = 1.00134198; // solar system mass, M_sun
166 static final double ASTRO_UNIT = 1.4959787066e11; // 1 AU in meters
167 static final double LIGHTSEC_IN_AU = 499.0047863852; // 1 AU in SI meters
168 static final double OMEGA_EARTH = 7.292116e-5; // inertial ang vel of earth
169 static final double SID_RATE = 1.0027379093; // sidereal/solar ratio
170 static final double FLATTEN = 0.003352813; // flattening, 1/298.257
171 static final double EQUAT_RAD = 6378137.; // equatorial radius, meters
172 static final double[] mass = {1.660137e-7, 2.447840e-6, 3.040433e-6,
173 3.227149e-7, 9.547907e-4, 2.858776e-4, 4.355401e-5, 5.177591e-5,
174 7.69e-9}; // IAU 1976 masses of planets in terms of solar mass
175 String version = "3.4.0";
176 TimerTask task = null;
177 Timer timer = null;
178 TimerTask spinnertask = null;
179 Timer spinnertimer = null;
180 TimerTask scrollfinishedtask = null;
181 Timer scrollfinishedtimer = null;
182 JFrame dialogFrame;
183
184// DecimalFormatSymbols symbols = fourPlaces.getDecimalFormatSymbols();
185// char decSep = symbols.getDecimalSeparator();
186// char thouSep = symbols.getGroupingSeparator();
187 int dialogFrameLocationX = -999999;
188 int dialogFrameLocationY = -999999;
189 int moonPhase = 0;
190 SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
191 DecimalFormat uptoTwoPlaces = new DecimalFormat("0.##", IJU.dfs);
192 DecimalFormat noPlaces = new DecimalFormat("0", IJU.dfs);
193 DecimalFormat onePlaces = new DecimalFormat("0.0", IJU.dfs);
194 DecimalFormat twoPlaces = new DecimalFormat("0.00", IJU.dfs);
195 DecimalFormat threePlaces = new DecimalFormat("0.000", IJU.dfs);
196 DecimalFormat fourPlaces = new DecimalFormat("0.0000", IJU.dfs);
197 DecimalFormat fivePlaces = new DecimalFormat("0.00000", IJU.dfs);
198 DecimalFormat sixPlaces = new DecimalFormat("0.000000", IJU.dfs);
199 DecimalFormat sevenPlaces = new DecimalFormat("0.0000000", IJU.dfs);
200 DecimalFormat eightPlaces = new DecimalFormat("0.00000000", IJU.dfs);
201 DecimalFormat uptoFourPlaces = new DecimalFormat("0.####", IJU.dfs);
202 DecimalFormat uptoSixPlaces = new DecimalFormat("0.0#####", IJU.dfs);
203 DecimalFormat upto20Places = new DecimalFormat("0.####################", IJU.dfs);
204 DecimalFormat twoDigits = new DecimalFormat();
205 DecimalFormat fourDigits = new DecimalFormat();
206 double lstNow, epochNow, newnum, bjdEOI, hjdEOI, hjdEOICorr, bjdEOICorr;
207 double pmTwiJD, amTwiJD;

Callers

nothing calls this directly

Calls 3

getPrefsDirMethod · 0.95
startsWithMethod · 0.80
getPropertyMethod · 0.45

Tested by

no test coverage detected