public class OneAxisEllipsoid extends Object implements BodyShape
One-axis ellipsoids is a good approximate model for most planet-size and larger natural bodies. It is the equilibrium shape reached by a fluid body under its own gravity field when it rotates. The symmetry axis is the rotation or polar axis.
This class is a simple adaptation of the Ellipsoid example class implementing the algorithms described in the paper Quick computation of the distance between a point and an ellipse.
Constructor and Description |
---|
OneAxisEllipsoid(double aeIn,
double f,
Frame bodyFrameIn)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
Frame |
getBodyFrame()
Get the body frame related to body shape.
|
double |
getEquatorialRadius()
Get the equatorial radius of the body.
|
GeodeticPoint |
getIntersectionPoint(Line line,
Vector3D close,
Frame frame,
AbsoluteDate date)
Get the intersection point of a line with the surface of the body.
|
void |
set2ndConvergenceThreshold(double convergenceThreshold)
Set the 2nd convergence threshold.
|
void |
setAngularThreshold(double angularThresholdIn)
Set the angular convergence threshold.
|
void |
setCloseApproachThreshold(double closeApproachThresholdIn)
Set the close approach threshold.
|
Vector3D |
transform(GeodeticPoint point)
Transform a surface-relative point to a cartesian point.
|
GeodeticPoint |
transform(Vector3D point,
Frame frame,
AbsoluteDate date)
Transform a cartesian point to a surface-relative point.
|
Vector3D |
transformAndComputeJacobian(GeodeticPoint geodeticPoint,
double[][] jacobian)
Transform a surface-relative point to a cartesian point and compute the jacobian of
the transformation.
|
GeodeticPoint |
transformAndComputeJacobian(Vector3D point,
Frame frame,
AbsoluteDate date,
double[][] jacobian)
Transform a cartesian point to a surface-relative point and compute the jacobian of
the transformation.
|
public OneAxisEllipsoid(double aeIn, double f, Frame bodyFrameIn)
The following table provides conventional parameters for global Earth models:
model | ae (m) | f |
---|---|---|
GRS 80 | 6378137.0 | 1.0 / 298.257222101 |
WGS84 | 6378137.0 | 1.0 / 298.257223563 |
aeIn
- equatorial radiusf
- the flattening (f = (a-b)/a)bodyFrameIn
- body frame related to body shapeFramesFactory.getITRF()
public void setCloseApproachThreshold(double closeApproachThresholdIn)
The close approach threshold is a ratio used to identify special cases in the
transform(Vector3D, Frame, AbsoluteDate)
method.
Let d = (x2+y2+z2)½ be the distance between the point and the ellipsoid center.
If this method is not called, the default value is set to 10-10.
closeApproachThresholdIn
- close approach threshold (no unit)public void setAngularThreshold(double angularThresholdIn)
The angular threshold is the convergence threshold used to stop the iterations in the
transform(Vector3D, Frame, AbsoluteDate)
method. It applies directly to the latitude. When convergence
is reached, the real latitude is guaranteed to be between φ - δφ/2 and φ + δφ/2 where
φ is the computed latitude and δφ is the angular threshold set by this method.
If this method is not called, the default value is set to 10-14.
angularThresholdIn
- angular convergence threshold (rad)public void set2ndConvergenceThreshold(double convergenceThreshold)
The threshold is the 2nd convergence threshold used to stop the iterations in the
transform(Vector3D, Frame, AbsoluteDate)
method. This convergence threshold is used only if usual
convergence has not been reached under 1st threshold (very rare case). 1st threshold can be set using
setAngularThreshold(double)
.
Non-convergence may be resulting from numerical quality issues, found solution being very close to real solution but slightly above first threshold. As a result a second convergence criterion is used. This method sets the threshold of the second convergence criterion.
Criterion is based on evaluation of a 3rd order poynomial P whose solution if one of the roots: algorithm is stopped if P(solution) < threshold.
If this method is not called, the default value is set to 10-14.
convergenceThreshold
- convergence threshold (rad)setAngularThreshold(double)
public double getEquatorialRadius()
public Frame getBodyFrame()
getBodyFrame
in interface BodyShape
public GeodeticPoint getIntersectionPoint(Line line, Vector3D close, Frame frame, AbsoluteDate date) throws PatriusException
A line may have several intersection points with a closed surface (we consider the one point case as a degenerated two points case). The close parameter is used to select which of these points should be returned. The selected point is the one that is closest to the close point.
getIntersectionPoint
in interface BodyShape
line
- test line (may intersect the body or not)close
- point used for intersections selectionframe
- frame in which line is expresseddate
- date of the line in given framePatriusException
- if line cannot be converted to body framepublic Vector3D transform(GeodeticPoint point)
public Vector3D transformAndComputeJacobian(GeodeticPoint geodeticPoint, double[][] jacobian) throws PatriusException
geodeticPoint
- geodetic pointjacobian
- the jacobian matrix which will be computed (input and output of the method)PatriusException
- epublic GeodeticPoint transform(Vector3D point, Frame frame, AbsoluteDate date) throws PatriusException
transform
in interface BodyShape
point
- cartesian pointframe
- frame in which cartesian point is expresseddate
- date of the point in given framePatriusException
- if point cannot be converted to body framepublic GeodeticPoint transformAndComputeJacobian(Vector3D point, Frame frame, AbsoluteDate date, double[][] jacobian) throws PatriusException
point
- cartesian pointframe
- frame in which cartesian point is expresseddate
- date of the point in given framejacobian
- the jacobian matrix which will be computed (input and output of the method)PatriusException
- if point cannot be converted to body frameCopyright © 2019 CNES. All rights reserved.