org.orekit.bodies
Class OneAxisEllipsoid

java.lang.Object
  extended by org.orekit.bodies.OneAxisEllipsoid
All Implemented Interfaces:
Serializable, BodyShape

public class OneAxisEllipsoid
extends Object
implements BodyShape

Modeling of a one-axis ellipsoid.

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.

Author:
Luc Maisonobe
See Also:
Serialized Form

Constructor Summary
OneAxisEllipsoid(double ae, double f, Frame bodyFrame)
          Simple constructor.
 
Method Summary
 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 angularThreshold)
          Set the angular convergence threshold.
 void setCloseApproachThreshold(double closeApproachThreshold)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneAxisEllipsoid

public OneAxisEllipsoid(double ae,
                        double f,
                        Frame bodyFrame)
Simple constructor.

The following table provides conventional parameters for global Earth models:

modelae (m)f
GRS 806378137.01.0 / 298.257222101
WGS846378137.01.0 / 298.257223563

Parameters:
ae - equatorial radius
f - the flattening (f = (a-b)/a)
bodyFrame - body frame related to body shape
See Also:
FramesFactory.getITRF()
Method Detail

setCloseApproachThreshold

public void setCloseApproachThreshold(double closeApproachThreshold)
Set the close approach threshold.

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.

Parameters:
closeApproachThreshold - close approach threshold (no unit)

setAngularThreshold

public void setAngularThreshold(double angularThreshold)
Set the angular convergence threshold.

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.

Parameters:
angularThreshold - angular convergence threshold (rad)

set2ndConvergenceThreshold

public void set2ndConvergenceThreshold(double convergenceThreshold)
Set the 2nd convergence threshold.

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.

Parameters:
convergenceThreshold - convergence threshold (rad)
See Also:
setAngularThreshold(double)

getEquatorialRadius

public double getEquatorialRadius()
Get the equatorial radius of the body.

Returns:
equatorial radius of the body (m)

getBodyFrame

public Frame getBodyFrame()
Get the body frame related to body shape.

Specified by:
getBodyFrame in interface BodyShape
Returns:
body frame related to body shape

getIntersectionPoint

public GeodeticPoint getIntersectionPoint(Line line,
                                          Vector3D close,
                                          Frame frame,
                                          AbsoluteDate date)
                                   throws OrekitException
Get the intersection point of a line with the surface of the body.

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.

Specified by:
getIntersectionPoint in interface BodyShape
Parameters:
line - test line (may intersect the body or not)
close - point used for intersections selection
frame - frame in which line is expressed
date - date of the line in given frame
Returns:
intersection point at altitude zero or null if the line does not intersect the surface
Throws:
OrekitException - if line cannot be converted to body frame

transform

public Vector3D transform(GeodeticPoint point)
Transform a surface-relative point to a cartesian point.

Specified by:
transform in interface BodyShape
Parameters:
point - surface-relative point
Returns:
point at the same location but as a cartesian point

transformAndComputeJacobian

public Vector3D transformAndComputeJacobian(GeodeticPoint geodeticPoint,
                                            double[][] jacobian)
                                     throws OrekitException
Transform a surface-relative point to a cartesian point and compute the jacobian of the transformation.

Parameters:
geodeticPoint - geodetic point
jacobian - the jacobian matrix which will be computed (input and output of the method)
Returns:
point at the same location but as a cartesian point
Throws:
OrekitException - e

transform

public GeodeticPoint transform(Vector3D point,
                               Frame frame,
                               AbsoluteDate date)
                        throws OrekitException
Transform a cartesian point to a surface-relative point.

Specified by:
transform in interface BodyShape
Parameters:
point - cartesian point
frame - frame in which cartesian point is expressed
date - date of the point in given frame
Returns:
point at the same location but as a surface-relative point, expressed in body frame
Throws:
OrekitException - if point cannot be converted to body frame

transformAndComputeJacobian

public GeodeticPoint transformAndComputeJacobian(Vector3D point,
                                                 Frame frame,
                                                 AbsoluteDate date,
                                                 double[][] jacobian)
                                          throws OrekitException
Transform a cartesian point to a surface-relative point and compute the jacobian of the transformation.

Parameters:
point - cartesian point
frame - frame in which cartesian point is expressed
date - date of the point in given frame
jacobian - the jacobian matrix which will be computed (input and output of the method)
Returns:
point at the same location but as a surface-relative point, expressed in body frame
Throws:
OrekitException - if point cannot be converted to body frame


Copyright © 2016 CNES. All Rights Reserved.