public class Geometry_Utilities extends java.lang.Object implements SPICE_Constants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static double |
MARS_OBLIQUITY
The obliquity of Mars in degrees.
|
static double |
SEARCH_MARGIN
The default margin for the roll angle search, in seconds.
|
AU, DEIMOS_ID, EARTH_ID, IAU_MARS_FRAME, J2000_FRAME, KM, KM_PER_AU, MARS_ID, MRO_HIGH_PRECISION_ID, MRO_ID, NO_ABCORR, PHOBOS_ID, SUN_ID
Modifier and Type | Method and Description |
---|---|
static double[] |
find_targeted_observation(double lon,
double lat,
double alt,
double guess)
Gets the observation time and roll angle for a targeted observation with
the given initial guess at time and target coordinates.
|
static double[] |
find_targeted_observation(double lon,
double lat,
double alt,
double guess,
double beg,
double end)
Gets the observation time and roll angle for a targeted observation with
the given initial guess at time, limits, and target coordinates.
|
static edu.asu.jmars.util.HVector[] |
intersect_planes(edu.asu.jmars.util.HVector n1,
edu.asu.jmars.util.HVector p1,
edu.asu.jmars.util.HVector n2,
edu.asu.jmars.util.HVector p2)
Derives the line that is the intersection of two planes.
|
static double |
mars_a_axis()
Gets the A-axis for Mars.
|
static double |
mars_b_axis()
Gets the B-axis for Mars.
|
static double |
mars_c_axis()
Gets the C-axis for Mars.
|
static double |
mars_equatorial_radius()
Gets the Mars equatorial radius.
|
static double |
mars_flattening()
Gets the flattening coefficient for Mars.
|
static double |
mars_polar_radius()
Gets the Mars polar radius.
|
static double |
normalize_longitude(double longitude)
Returns the input longitude normalized to fall in the range (0.0, 360.0).
|
static double |
planetocentric_latitude(double planetographic_latitude)
Converts a Mars planetographic latitude to planetocentric latitude.
|
static double |
planetographic_latitude(double planetocentric_latitude)
Converts a Mars planetocentric latitude to planetographic latitude.
|
static java.awt.geom.Point2D |
point2d_degrees(java.awt.geom.Point2D point2d_radians)
Converts a geographic point whose coordinates are in radians to one whose
coordinates are in degrees.
|
static java.awt.geom.Point2D |
point2d_radians(java.awt.geom.Point2D point2d_degrees)
Converts a geographic point whose coordinates are in degrees to one whose
coordinates are in radians.
|
static double[] |
recgeo_ocentric(double[] rec)
Converts a rectangular coordinate 3-vector to geographic coordinates in the
east-leading planetocentric system.
|
static double[] |
recgeo_ographic(double[] rec)
Converts a rectangular coordinate 3-vector to geographic coordinates in the
east-leading planetographic system.
|
static double |
reverse_longitude(double longitude)
Reverse a longitude from east-leading to west-leading or vice-versa.
|
static double |
solar_altitude(double target_longitude,
double target_latitude,
double et)
Gets the solar altitide, or elevation, for a target located at the given
coordinates at the given ephemeris time.
|
static double |
solar_altitude(double target_longitude,
double target_latitude,
double l_sub_s,
double subsolar_longitude)
Gets the solar altitide, or elevation, for a target located at the given
coordinates and with the given solar geometry.
|
static double |
solar_azimuth(double target_longitude,
double target_latitude,
double et)
Gets the solar azimuth angle for a target located at the given coordinates
at the given ephemeris time.
|
static double |
solar_azimuth(double target_longitude,
double target_latitude,
double l_sub_s,
double subsolar_longitude)
Gets the solar azimuth angle for a target located at the given coordinates
and with the given solar geometry.
|
static double |
solar_declination(double l_sub_s)
Gets the solar declination for the given solar longitude.
|
static java.awt.geom.Point2D |
subsolar_point(double et)
Gets the longitude and latitude coordinates of the sub-solar point on Mars
at the given time.
|
public static final java.lang.String ID
public static final double MARS_OBLIQUITY
public static final double SEARCH_MARGIN
public static double mars_a_axis()
public static double mars_b_axis()
public static double mars_c_axis()
public static double mars_equatorial_radius()
public static double mars_polar_radius()
public static double mars_flattening()
f = (re - rp) / re
where re is the equatorial
radius
and rp is the polar
radius
.
public static double planetocentric_latitude(double planetographic_latitude)
mars_flattening()
is used in the conversion.planetographic_latitude
- the planetographic latitude in radians.public static double planetographic_latitude(double planetocentric_latitude)
mars_flattening()
is used in the conversion.planetocentric_latitude
- the planetocentric latitude in radians.public static java.awt.geom.Point2D subsolar_point(double et) throws SPICE_Exception
Note The longitude returned is east-leading (i.e., positive in the east direction). The latitude is planetographic/geodetic.
et
- the input time.X
coordinate
and planetographic latititude in the Y
coordinate
, both in degrees.SPICE_Exception
- if the sub-solar point cannot be computed, likely
because the planetary constants kernel or the planetary ephemeris
kernel is not loaded.public static double solar_declination(double l_sub_s)
δs = sin-1(0.4256 sin Ls) + 0.25° sin Ls
where 0.4256 is the sine of Mars's obliquity
.
l_sub_s
- the planetocentric longitude of the Sun as seen by Mars (in
degrees).public static double solar_altitude(double target_longitude, double target_latitude, double l_sub_s, double subsolar_longitude)
a = cos-1(sin δs sin φ + cos δs cos φ cos H
where H is the hour angle Λ - Λs, φ is the target planetographic latitude, and δs is the solar declination, and where Λ is the target west-leading longitude and Λs is the sub-solar west-leading longitude.
Note The longitudes may technically be either west-leading (i.e.,
west-postitive) or east-leading, as long as they are consistent, because
they are only used in a cosine term. The companion function for solar azimuth
requires they be
west-leading, however, so it's probably easier just to force them to be so.
Finally, the solar zenith angle is simply 90.0 - a.
target_longitude
- the west-leading longitude of the target point
from which the Sun is observed.target_latitude
- the planetographic latitude of the target point from
which the Sun is observed.l_sub_s
- the solar longitude at the time of observation.subsolar_longitude
- the longitude of the sub-solar point at the
time of observation.public static double solar_altitude(double target_longitude, double target_latitude, double et) throws SPICE_Exception
target_longitude
- the west-leading longitude of the target point
from which the Sun is observed.target_latitude
- the planetographic latitude of the target point from
which the Sun is observed.et
- the time at which the Sun is observed.SPICE_Exception
- if the sub-solar longitude or the solar longitude
cannot be computed, likely due to missing kernels.solar_altitude(double,double,double,double)
,
subsolar_point(double)
,
Photometry_Utilities.l_sub_s(double)
public static double solar_azimuth(double target_longitude, double target_latitude, double l_sub_s, double subsolar_longitude)
A = tan-1(sin H / (cos φ tan δs - sin &phi cos H))
where H is the hour angle Λ - Λs, φ is the target planetographic latitude, and δs is the solar declination, and where Λ is the target west-leading longitude and Λs is the sub-solar west-leading longitude.
Note The longitudes must be west-leading (i.e., west-positive). If they are east-leading (east-positive), this function will return the counter-clockwise angle of the Sun's position.
target_longitude
- the west-leading longitude of the target point
from which the Sun is observed.target_latitude
- the planetographic latitude of the target point from
which the Sun is observed.l_sub_s
- the solar longitude at the time of observation.subsolar_longitude
- the longitude of the sub-solar point at the
time of observation.public static double solar_azimuth(double target_longitude, double target_latitude, double et) throws SPICE_Exception
target_longitude
- the west-leading longitude of the target point
from which the Sun is observed.target_latitude
- the planetographic latitude of the target point from
which the Sun is observed.et
- the time at which the Sun is observed.SPICE_Exception
- if the sub-solar longitude or the solar longitude
cannot be computed, likely due to missing kernels.solar_azimuth(double,double,double,double)
,
subsolar_point(double)
,
Photometry_Utilities.l_sub_s(double)
public static double reverse_longitude(double longitude)
longitude
- the longitude to be reversed, in degrees.public static double normalize_longitude(double longitude)
longitude
- the input longitude.public static double[] find_targeted_observation(double lon, double lat, double alt, double guess, double beg, double end) throws SPICE_Exception
This algorithm is lifted directly from the JMARS MRO observation layer; there is, however, no limit imposed on the roll angle.
lon
- the target longitude in degrees.lat
- the target planetographic latitude in degrees.alt
- the target altitude above the reference ellipsoid, in km.guess
- an initial guess for the observation time, in seconds.beg
- the lower limit on the observation time.end
- the upper limit on the observation time.SPICE_Exception
- if the geometry cannot be determined, typically
because of an insufficient SPICE kernel pool.public static double[] find_targeted_observation(double lon, double lat, double alt, double guess) throws SPICE_Exception
SEARCH_MARGIN
seconds.
This algorithm is lifted directly from the JMARS MRO observation layer; there is, however, no limit imposed on the roll angle.
lon
- the target longitude in degrees.lat
- the target planetographic latitude in degrees.alt
- the target altitude above the reference ellipsoid, in km.guess
- an initial guess for the observation time, in seconds.SPICE_Exception
- if the geometry cannot be determined, typically
because of an insufficient SPICE kernel pool.find_targeted_observation(double,double,double,double,double,double)
public static edu.asu.jmars.util.HVector[] intersect_planes(edu.asu.jmars.util.HVector n1, edu.asu.jmars.util.HVector p1, edu.asu.jmars.util.HVector n2, edu.asu.jmars.util.HVector p2)
This algorithm is lifted directly from the JMARS MRO observation layer.
n1
- the unit normal vector for plane 1.p1
- a point on plane 1.n2
- the unit normal vector for plane 2.p2
- a point on plane 2.public static double[] recgeo_ographic(double[] rec) throws SPICE_Exception
mars_radii()
, in the same units as the input coordinates.rec
- the rectangular coordinates.SPICE_Exception
- if the SPICE kernel pool does not contain sufficient
data to perform the conversion.public static double[] recgeo_ocentric(double[] rec) throws SPICE_Exception
mars_radii()
, in the same units as the input coordinates.rec
- the rectangular coordinates.SPICE_Exception
- if the SPICE kernel pool does not contain sufficient
data to perform the conversion.public static java.awt.geom.Point2D point2d_degrees(java.awt.geom.Point2D point2d_radians)
Point2D.getX()
)
is normalized to fall within the range 0.0, 360.0 degrees.point2d_radians
- a geographic point whose coordinates are in radians.public static java.awt.geom.Point2D point2d_radians(java.awt.geom.Point2D point2d_degrees)
Point2D.getX()
)
is normalized to fall within the range 0.0, 2π radians.point2d_degrees
- a geographic point whose coordinates are in degrees.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona