public class MassModel extends Object implements MassProvider
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(MassProvider)
which
will register the additional equation and initialize the initial additional state.
Assembly
,
MassProperty
,
Serialized FormMASS
Constructor and Description |
---|
MassModel(Assembly assembly)
Builds a mass model from an assembly and proceed to a first mass computation.
|
Modifier and Type | Method and Description |
---|---|
void |
addMassDerivative(String partName,
double flowRate)
Add the mass derivate of the given part.
|
AdditionalEquations |
getAdditionalEquation(String name)
Get the mass equation related to the part.
|
List<String> |
getAllPartsNames()
Get the list of the name of the parts.
|
double |
getMass(String partName)
Return the mass of the given part.
|
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 |
updateMass(String partName,
double newMass)
Update the mass of the given part.
|
public MassModel(Assembly assembly)
assembly
- the assemblypublic double getTotalMass()
getTotalMass
in interface MassProvider
public double getTotalMass(SpacecraftState state)
MassProvider.getTotalMass()
)getTotalMass
in interface MassProvider
state
- spacecraft statepublic double getMass(String partName)
getMass
in interface MassProvider
partName
- given partpublic void updateMass(String partName, double newMass) throws PatriusException
updateMass
in interface MassProvider
partName
- given partnewMass
- mass of the given partPatriusException
- thrown if the mass becomes negative (PatriusMessages.SPACECRAFT_MASS_BECOMES_NEGATIVE)public void addMassDerivative(String partName, double flowRate)
addMassDerivative
in interface MassProvider
partName
- name of part subject to mass variationflowRate
- flow rate of specified partpublic void setMassDerivativeZero(String partName)
setMassDerivativeZero
in interface MassProvider
partName
- name of part whose mass derivative is set to zeropublic AdditionalEquations getAdditionalEquation(String name)
getAdditionalEquation
in interface MassProvider
name
- part namepublic List<String> getAllPartsNames()
getAllPartsNames
in interface MassProvider
Copyright © 2021 CNES. All rights reserved.