fr.cnes.sirius.patrius.tools.ephemerisComparator
Class RotationDPFacade

java.lang.Object
  extended by fr.cnes.sirius.patrius.tools.ephemerisComparator.RotationDPFacade
All Implemented Interfaces:
DeviationProvider

public class RotationDPFacade
extends Object
implements DeviationProvider

This class is a facade for the use of dates.

Since:
1.0
Version:
$Id: RotationDPFacade.java 17581 2017-05-10 12:47:31Z bignon $
Author:
Philippe Pavero
See Also:
DeviationProvider
Concurrency :
immutable

Constructor Summary
RotationDPFacade(double angle)
          Constructor from an angle.
RotationDPFacade(double[][] matrix)
          Constructor from a matrix.
RotationDPFacade(Double angle1, Double angle2, Double angle3)
          Build a rotation from Cardan angles.
RotationDPFacade(double axisX, double axisY, double axisZ, double angle)
          Constructor from an axis and an angle.
 
Method Summary
static RotationDPFacade buildRotationDPFacade(double[] data)
          factory method.
 double computeDeviationTo(boolean absolute, DeviationProvider obj, boolean positive)
          computes the deviation in angle between the stored rotation and the given one.
 Rotation getRotation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotationDPFacade

public RotationDPFacade(double angle)
Constructor from an angle.

Parameters:
angle - the angle of the rotation around the Z-axis, in radians
Since:
1.0
See Also:
Rotation.Rotation(RotationOrder, double, double, double)

RotationDPFacade

public RotationDPFacade(Double angle1,
                        Double angle2,
                        Double angle3)
Build a rotation from Cardan angles.

Parameters:
angle1 - angle of the first elementary rotation, in radians
angle2 - angle of the second elementary rotation, in radians
angle3 - angle of the third elementary rotation, in radians
Since:
1.0
See Also:
Rotation.Rotation(RotationOrder, double, double, double)

RotationDPFacade

public RotationDPFacade(double axisX,
                        double axisY,
                        double axisZ,
                        double angle)
Constructor from an axis and an angle.

Parameters:
axisX - the x component of the axis vector
axisY - the y component of the axis vector
axisZ - the z component of the axis vector
angle - the rotation angle, in radians
Since:
1.0
See Also:
Rotation.Rotation(Vector3D, double)

RotationDPFacade

public RotationDPFacade(double[][] matrix)
Constructor from a matrix.

Parameters:
matrix - the rotation matrix
Since:
1.0
See Also:
Rotation.Rotation(double[][], double)
Method Detail

buildRotationDPFacade

public static RotationDPFacade buildRotationDPFacade(double[] data)
factory method.

Parameters:
data - describe the rotation. Can be either :
  • three Cardan angles, in radians
  • a vector and an angle, in radians
  • an array of the matrix terms, line after line (R11, R12, R13, R21, R22, R23, R31, R32, R33)
  • an angle. It will be a rotation of this angle around the z-axis, in radians
Returns:
a RotationDPFacade instance
Since:
1.0

computeDeviationTo

public final double computeDeviationTo(boolean absolute,
                                       DeviationProvider obj,
                                       boolean positive)
computes the deviation in angle between the stored rotation and the given one.

Specified by:
computeDeviationTo in interface DeviationProvider
Parameters:
absolute - absolute or relative deviation
obj - the DeviationProvider that should be a RotationDPFacade
positive - true if absolute value of deviations, false otherwise
Returns:
the deviation angle between the two values, in radians
Throws:
EphemerisComparatorRuntimeException - if the DeviationProvider is not of the correct type
See Also:
DeviationProvider.computeDeviationTo(boolean, DeviationProvider, boolean)

getRotation

public final Rotation getRotation()
Returns:
the rotation


Copyright © 2017 CNES. All Rights Reserved.