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

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

public final class QuaternionDPFacade
extends Object
implements DeviationProvider

This class is a facade for the use of quaternions.

Since:
1.0
Version:
$Id: QuaternionDPFacade.java 12495 2015-03-05 14:43:16Z maggiorani $
Author:
Philippe Pavero
See Also:
DeviationProvider
Concurrency :
immutable

Method Summary
static QuaternionDPFacade buildQuaternionDPFacade(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.
 Quaternion getQuaternion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildQuaternionDPFacade

public static QuaternionDPFacade buildQuaternionDPFacade(double[] data)
factory method.

Parameters:
data - describe the quaternion. Can be either :
  • the 4 components of a quaternion
  • a 3 dimension vector. In this case, a pure quaternion is created
Returns:
a QuaternionDPFacade instance
Since:
1.0

computeDeviationTo

public 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.
Throws:
EphemerisComparatorRuntimeException - if the DeviationProvider is not of the correct type
See Also:
DeviationProvider.computeDeviationTo(boolean, DeviationProvider, boolean)

getQuaternion

public Quaternion getQuaternion()
Returns:
the quaternion


Copyright © 2016 CNES. All Rights Reserved.