-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathComet.java
More file actions
58 lines (43 loc) · 1.41 KB
/
Comet.java
File metadata and controls
58 lines (43 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package comets;
/**
* Comet.java
*
* @author Charles Bell
*/
public abstract class Comet implements AbstractComet {
/**
* JPL Astrodynamic Constant Astronomical unit 1 AU= 149597870.691 km
* http://ssd.jpl.nasa.gov/?constants
*/
public double au = JPLConstants.AU;
/**
* JPL Astrodynamic Constant Speed of light c= 299792.458 km/s
* http://ssd.jpl.nasa.gov/?constants
*/
public double c = JPLConstants.C;
/**
* JPL Astrodynamic Constants 1 day= 86400.0 s number of seconds in a day 24
* x 3600 s = 6400.0 s http://ssd.jpl.nasa.gov/?constants
*/
public double day = JPLConstants.DAY;
public abstract String getName();
public abstract double getEpochJD();
public abstract double getPerihelionDistance();
public abstract double getPerihelionJD();
public abstract double getEccentricity();
public abstract double geInclination();
public abstract double getLongitudeOfAscendingNode();
public abstract double getArgumentOfPerihelion();
public boolean isElliptical() {
return (getEccentricity() < 1.0d);
}
public boolean isParabolic() {
return (getEccentricity() == 1.0d);
}
public boolean isHyperbolic() {
return (getEccentricity() > 1.0d);
}
public boolean isNearParabolic() {
return ((getEccentricity() > .98d) && (getEccentricity() < 1.02d) && !isParabolic());
}
}