fr.cnes.sirius.patrius.assembly.models
Class InertiaSimpleModel

java.lang.Object
  extended by fr.cnes.sirius.patrius.assembly.models.InertiaSimpleModel
All Implemented Interfaces:
IInertiaModel, Cloneable, MassProvider

public final class InertiaSimpleModel
extends Object
implements IInertiaModel

Simple inertia model : the mass, mass center and inertia matrix are directly given by the user.

Note : when using this model within a propagation, it is necessary to feed the additional equations to the propagator. This has to be done prior to any propagation, to allow this model to account mass variations (i.e. due to maneuvers), using the method NumericalPropagator.setMassProviderEquation() which will register the additional equation and initialize the initial additional state.

Since:
1.2
Version:
$Id: InertiaSimpleModel.java 17587 2017-05-10 13:31:11Z bignon $
Author:
Thomas Trapier
See Also:
IInertiaModel
Concurrency :
not thread-safe
Concurrency comment :
the frame and setters makes this class not thread-safe

Field Summary
 
Fields inherited from interface org.orekit.propagation.MassProvider
MASS
 
Constructor Summary
InertiaSimpleModel(double mass, Vector3D massCenter, Matrix3D inertiaMatrix, Frame frame, String partName)
          Constructor for a simple inertia model.
InertiaSimpleModel(double mass, Vector3D massCenter, Matrix3D inertiaMatrix, Vector3D inertiaReferencePoint, Frame frame, String partName)
          Constructor for a simple inertia model; the inertia matrix is expressed with respect to a point that can be different from the mass center.
 
Method Summary
 void addMassDerivative(String partName, double flowRate)
          Add the mass derivate of the given part.
 AdditionalEquations getAdditionalEquation(String partName)
          Get the mass equation related to the part.
 List<String> getAllPartsNames()
          Get the list of the name of the parts.
 Matrix3D getInertiaMatrix(Frame frame, AbsoluteDate date)
          Getter for the inertia matrix of the spacecraft, expressed with respect to the MASS CENTER in a given frame.
 Matrix3D getInertiaMatrix(Frame frame, AbsoluteDate date, Vector3D inertiaReferencePoint)
          Getter for the inertia matrix of the spacecraft, once expressed with respect to a point that can be different from the mass center.
 double getMass(String partName)
          Return the mass of the given part.
 Vector3D getMassCenter(Frame frame, AbsoluteDate date)
          Getter for the mass center.
 double getTotalMass()
          Return the mass of the spacecraft.
 double getTotalMass(SpacecraftState state)
          Return the mass of the spacecraft following the order.
 void setMassDerivativeZero(String partName)
          Set mass derivative to zero.
 void updateIntertiaMatrix(Matrix3D inertiaMatrix)
          Updates the inertia matrix.
 void updateMass(String part, double mass)
          Update the mass of the given part.
 void updateMassCenter(Vector3D massCenter)
          Updates the mass center.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InertiaSimpleModel

public InertiaSimpleModel(double mass,
                          Vector3D massCenter,
                          Matrix3D inertiaMatrix,
                          Frame frame,
                          String partName)
                   throws OrekitException
Constructor for a simple inertia model.

Parameters:
mass - the global mass
massCenter - the mass center
inertiaMatrix - the inertia matrix, expressed with respect to the mass center
frame - the expression frame of the mass center vector and inertia matrix
partName - name of the part
Throws:
OrekitException - if the mass is negative (OrekitMessages.MASS_ARGUMENT_IS_NEGATIVE)

InertiaSimpleModel

public InertiaSimpleModel(double mass,
                          Vector3D massCenter,
                          Matrix3D inertiaMatrix,
                          Vector3D inertiaReferencePoint,
                          Frame frame,
                          String partName)
                   throws OrekitException
Constructor for a simple inertia model; the inertia matrix is expressed with respect to a point that can be different from the mass center.

Parameters:
mass - the global mass
massCenter - the mass center
inertiaMatrix - the inertia matrix
inertiaReferencePoint - the point with respect to the inertia matrix is expressed (in the reference frame)
frame - the expression frame of the mass center vector and inertia matrix
partName - name of the part
Throws:
OrekitException - if the mass is negative (OrekitMessages.MASS_ARGUMENT_IS_NEGATIVE)
Method Detail

getTotalMass

public double getTotalMass()
Return the mass of the spacecraft.

Specified by:
getTotalMass in interface MassProvider
Returns:
spacecraft mass

getTotalMass

public double getTotalMass(SpacecraftState state)
Return the mass of the spacecraft following the order.

Specified by:
getTotalMass in interface MassProvider
Parameters:
state - spacecraft state
Returns:
spacecraft mass

getMass

public double getMass(String partName)
Return the mass of the given part.

Specified by:
getMass in interface MassProvider
Parameters:
partName - given part
Returns:
mass of part

getMassCenter

public Vector3D getMassCenter(Frame frame,
                              AbsoluteDate date)
                       throws OrekitException
Getter for the mass center.

Specified by:
getMassCenter in interface IInertiaModel
Parameters:
frame - the expression frame of the mass center position
date - the current date (unused for simple the model)
Returns:
the mass center position vector
Throws:
OrekitException - if a problem occurs during frames transformations

getInertiaMatrix

public Matrix3D getInertiaMatrix(Frame frame,
                                 AbsoluteDate date)
                          throws OrekitException
Getter for the inertia matrix of the spacecraft, expressed with respect to the MASS CENTER in a given frame.

Specified by:
getInertiaMatrix in interface IInertiaModel
Parameters:
frame - the expression frame of the inertia matrix
date - the current date (unused for simple the model)
Returns:
the inertia matrix
Throws:
OrekitException - if a problem occurs during frames transformations

updateMass

public void updateMass(String part,
                       double mass)
                throws OrekitException
Update the mass of the given part.

Specified by:
updateMass in interface MassProvider
Parameters:
part - ignore this parameter
mass - mass of the given part
Throws:
OrekitException - if the mass is negative (OrekitMessages.MASS_ARGUMENT_IS_NEGATIVE)

updateMassCenter

public void updateMassCenter(Vector3D massCenter)
Updates the mass center.

Parameters:
massCenter - the new mass center

updateIntertiaMatrix

public void updateIntertiaMatrix(Matrix3D inertiaMatrix)
Updates the inertia matrix.

Parameters:
inertiaMatrix - the new inertia matrix.

getInertiaMatrix

public Matrix3D getInertiaMatrix(Frame frame,
                                 AbsoluteDate date,
                                 Vector3D inertiaReferencePoint)
                          throws OrekitException
Getter for the inertia matrix of the spacecraft, once expressed with respect to a point that can be different from the mass center. This point must be defined in the reference frame of expression of the matrix.

Specified by:
getInertiaMatrix in interface IInertiaModel
Parameters:
frame - the expression frame of the inertia matrix
date - the current date (unused for simple the model)
inertiaReferencePoint - the point with respect to the inertia matrix is expressed (in the reference frame)
Returns:
the inertia matrix
Throws:
OrekitException - if a problem occurs during frames transformations

addMassDerivative

public void addMassDerivative(String partName,
                              double flowRate)
Add the mass derivate of the given part.

Specified by:
addMassDerivative in interface MassProvider
Parameters:
partName - name of part subject to mass variation
flowRate - flow rate of specified part

setMassDerivativeZero

public void setMassDerivativeZero(String partName)
Set mass derivative to zero.

Specified by:
setMassDerivativeZero in interface MassProvider
Parameters:
partName - name of part whose mass derivative is set to zero

getAdditionalEquation

public AdditionalEquations getAdditionalEquation(String partName)
Get the mass equation related to the part.

Specified by:
getAdditionalEquation in interface MassProvider
Parameters:
partName - part name
Returns:
the associated mass equation

getAllPartsNames

public List<String> getAllPartsNames()
Get the list of the name of the parts.

Specified by:
getAllPartsNames in interface MassProvider
Returns:
the list of the spacecraft parts name.


Copyright © 2017 CNES. All Rights Reserved.