fr.cnes.genopus.orbits
Class GPParametersAbstractWithAnomaly

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.orbits.GPParametersAbstract
              extended by fr.cnes.genopus.orbits.GPParametersAbstractWithAnomaly
All Implemented Interfaces:
fr.cnes.genius.main.GClear, fr.cnes.genius.main.GCondensedStatusInterface, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GReadWrite, GPPatrius<org.orekit.orbits.orbitalparameters.IOrbitalParameters>
Direct Known Subclasses:
GPApsisAltitudeParameters, GPApsisRadiusParameters, GPCircularParameters, GPEquatorialParameters, GPEquinoctialParameters, GPKeplerianParameters

public abstract class GPParametersAbstractWithAnomaly
extends GPParametersAbstract

Abstract class representing any kind of orbital parameters that includes anomaly, longitude or AoL as one of them. The particularity of this class is that since the type of anomaly/longitude/AoL is eligible by means of a popup list, the concept of Pivot is required to distinguish among the visible value and the value in memory.

Author:
ffsm

Nested Class Summary
 
Nested classes/interfaces inherited from class fr.cnes.genius.main.GComponent
fr.cnes.genius.main.GComponent.CopyPasteOperation, fr.cnes.genius.main.GComponent.DisplayIndicatorStatus, fr.cnes.genius.main.GComponent.ItemType, fr.cnes.genius.main.GComponent.Operation
 
Field Summary
 
Fields inherited from class fr.cnes.genopus.orbits.GPParametersAbstract
ANGLE_UNITS, DISTANCE_UNITS, INT_ERR_MNS_INF_TO_ZERO, INT_ERR_MNS_ONE_TO_ONE_EXC, INT_ERR_MNS_ONE_TO_ONE_INC, INT_ERR_MNS_SQRT_2_TO_SQRT_2, INT_ERR_ZERO_EX_TO_INF, INT_ERR_ZERO_IN_TO_INF, INT_WARN_MNS_PI_TO_PI, INT_WARN_ZERO_TO_PI, NULL_PARAMS, VELOCITY_UNITS
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPParametersAbstractWithAnomaly(String widgetId, String name, String label)
          Constructor.
 
Method Summary
protected  void aditionalActionsAfter1(fr.cnes.genius.main.GEvent e)
          Additional actions to be performed by the after() method of class GPParametersAbstract, to be implemented by its sub-classes.
protected abstract  void aditionalActionsAfter2(fr.cnes.genius.main.GEvent e)
          Additional actions to be performed by the after() method of class GPParametersAbstractWithAnomaly, to be implemented by its sub-classes.
 void clear()
          
protected abstract  double[] computeParamsArray(org.orekit.orbits.orbitalparameters.IOrbitalParameters params)
          Computes the orbital parameters array in the same order as shown in the widget .
 void display()
          
 void generic()
          
protected abstract  fr.cnes.genius.highLevel.GEntryReal getAnomalyEntryReal()
          Generic getter for the GEntryReal corresponding to the anomaly/longitude/AoL.
protected  org.orekit.orbits.PositionAngle getCurrentAnomalyType()
          Getter for the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC).
protected abstract  double getCurrentAnomalyValue()
          Getter for the current value of the anomaly/longitude/AoL.
abstract  fr.cnes.genius.highLevel.GPopupListWithLabel getGPopupList()
          Generic getter for the GPopupListWithLabel corresponding to the anomaly/longitude/AoL type selector (true, mean ou eccentric).
 double[] getParams()
          Getter for the parameters array.
 org.orekit.orbits.PositionAngle getPivotAnomalyType()
          Getter for the type of parameters of the pivot.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 boolean isButtonForcePivotVisible()
           
 boolean isInPivot()
          Returns if the current set of parameters are in pivot or not: the shown values corresponds exactly to the values in memory.
 boolean isModified()
          
 void onButtonForcePivot()
          Actions when the event comes from the pivot button.
protected  void onGEntryRealParams(fr.cnes.genius.main.GEvent e)
          Actions when the event comes from any of the first 6 parameters GEntryReals.
 void read()
          
protected abstract  void recomputeAnomaliesMap()
          Recomputes the three types of anomaly/longitude/AoL by creating an auxiliary orbit.
protected  void recomputePivot()
          Recompute the pivot anomaly/AoL/longitude from the specified data in the widget.
protected  void setAnomalies(Double trueAnomaly, Double eccentricAnomaly, Double meanAnomaly)
          Save in memory the three values of the anomaly/longitude/AoL.
 void setButtonForcePivotVisible(boolean buttonForcePivotVisible)
           
 void setConstraint(int labelGap, int paramsGap)
          Setter for the constraints of the orbital parameters.
protected  void setCurrentAnomalyType(org.orekit.orbits.PositionAngle anomalyType)
          Setter for the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC).
 void setDefaultParams(double[] defaultParams)
          Sets the default orbital parameters.
 void setDefaultParams(double[] defaultParams, org.orekit.orbits.PositionAngle defaultAnomalyType)
          Sets the default orbital parameters.
 void setDefaultParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters defaultParams)
          Sets the default orbital parameters.
 void setDefaultParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters defaultParams, org.orekit.orbits.PositionAngle anomalyType)
          Sets the default orbital parameters.
 void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
          Controls the display of the isModified indicator of all sub-widgets (except for Mu, because it is always comparable, it is always present in the rest of representations).
 void setEnabled(boolean b)
          
 void setParams(double[] params)
          Sets the specified orbital parameters in the widget.
 void setParams(double[] params, org.orekit.orbits.PositionAngle anomalyType)
          Setter for the widget parameters.
 void setParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters params)
          Sets the specified orbital parameters in the widget.
 void setParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters params, org.orekit.orbits.PositionAngle anomalyType)
          Sets the specified orbital parameters in the widget.
 void setSavedParams(double[] savedParams)
          Sets the saved orbital parameters.
 void setSavedParams(double[] savedParams, org.orekit.orbits.PositionAngle savedAnomalyType)
          Setter for the saved parameters.
 void setSavedParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters savedParams)
          Sets the saved orbital parameters.
 void setSavedParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters savedParams, org.orekit.orbits.PositionAngle anomalyType)
          Sets the saved orbital parameters.
 void updateIsModifiedIndicator()
          
protected  void updateIsPivotButtonEnabled()
          Update the status enabled/disabled of the force pivot button.
 void updateStatus()
          Update the status of the orbital parameters.
 void write()
          
 
Methods inherited from class fr.cnes.genopus.orbits.GPParametersAbstract
aditionalActionsBefore1, after, attachCopyPasteMenu, before, checkGlobalCoherence, copyNullParams, getGEntryRealMu, getGLabel, getName, getParametersGEntryRealsList, getPatriusObject, getXMLType, handleOrbitCopyPasteEvent, isBlockedConversions, isEnabled, isParamsNull, setBlockedConversions, setDefaultConstraint, updateCondensedStatus
 
Methods inherited from class fr.cnes.genius.lowLevel.GContainer
put
 
Methods inherited from class fr.cnes.genius.main.GComponent
activateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getNameInConfigFile, getOperationSaveValue, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setNameAndCommentInConfigFile, setNameInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPParametersAbstractWithAnomaly

public GPParametersAbstractWithAnomaly(String widgetId,
                                       String name,
                                       String label)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
name - name for the set of orbital parameters.
label - label for the set of orbital parameters
Method Detail

setParams

public void setParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters params)
               throws GPOrbitException
Sets the specified orbital parameters in the widget. Anomaly/Longitude/AoL must be TRUE.

Overrides:
setParams in class GPParametersAbstract
Parameters:
params - the orbital parameters as an IOrbitalParameters patrius object.
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

setParams

public void setParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters params,
                      org.orekit.orbits.PositionAngle anomalyType)
               throws GPOrbitException
Sets the specified orbital parameters in the widget.

Parameters:
params - the orbital parameters as a IOrbitalParameters patrius object.
anomalyType - type of anomaly (TRUE, MEAN or ECCENTRIC)
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

computeParamsArray

protected abstract double[] computeParamsArray(org.orekit.orbits.orbitalparameters.IOrbitalParameters params)
                                        throws GPOrbitException
Computes the orbital parameters array in the same order as shown in the widget .

Specified by:
computeParamsArray in class GPParametersAbstract
Parameters:
params - the orbital parameters as a IOrbitalParameters patrius object.
Returns:
the array of orbital parameters.
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

generic

public void generic()
             throws fr.cnes.genius.exception.GException

Overrides:
generic in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GException

display

public void display()
             throws fr.cnes.genius.exception.GException

Specified by:
display in interface fr.cnes.genius.main.GDisplay
Overrides:
display in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GException

recomputePivot

protected void recomputePivot()
                       throws GPOrbitException
Recompute the pivot anomaly/AoL/longitude from the specified data in the widget.

Throws:
GPOrbitException - if the widget orbital parameters do not represent a valid orbit.

getCurrentAnomalyValue

protected abstract double getCurrentAnomalyValue()
Getter for the current value of the anomaly/longitude/AoL.

Returns:
the current value of the anomaly/longitude/AoL.

getCurrentAnomalyType

protected org.orekit.orbits.PositionAngle getCurrentAnomalyType()
Getter for the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC).

Returns:
the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC)

setCurrentAnomalyType

protected void setCurrentAnomalyType(org.orekit.orbits.PositionAngle anomalyType)
Setter for the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC).

Parameters:
anomalyType - the current type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC)

recomputeAnomaliesMap

protected abstract void recomputeAnomaliesMap()
                                       throws GPOrbitException
Recomputes the three types of anomaly/longitude/AoL by creating an auxiliary orbit.

Throws:
GPOrbitException - if the current orbital parameters (with pivot anomaly/longitude/AoL) do not represent a valid orbit.

updateIsPivotButtonEnabled

protected void updateIsPivotButtonEnabled()
Update the status enabled/disabled of the force pivot button.
It will be enabled if all conditions are fulfilled:
- The widget is enabled
- The widget is not in error status
- The widget is not pivoted already
- The widget is not null


getPivotAnomalyType

public org.orekit.orbits.PositionAngle getPivotAnomalyType()
Getter for the type of parameters of the pivot.

Returns:
the pivot anomaly type.

setEnabled

public void setEnabled(boolean b)

Overrides:
setEnabled in class GPParametersAbstract

getAnomalyEntryReal

protected abstract fr.cnes.genius.highLevel.GEntryReal getAnomalyEntryReal()
Generic getter for the GEntryReal corresponding to the anomaly/longitude/AoL.

Returns:
the anomaly/longitude/AoL GEntryReal

getGPopupList

public abstract fr.cnes.genius.highLevel.GPopupListWithLabel getGPopupList()
Generic getter for the GPopupListWithLabel corresponding to the anomaly/longitude/AoL type selector (true, mean ou eccentric).

Returns:
the GPopupListWithLabel for the anomaly/longitude/AoL type selector (true, mean ou eccentric).

updateIsModifiedIndicator

public void updateIsModifiedIndicator()

Overrides:
updateIsModifiedIndicator in class GPParametersAbstract

setDisplayIsModifiedIndicatorAll

public void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
Controls the display of the isModified indicator of all sub-widgets (except for Mu, because it is always comparable, it is always present in the rest of representations).

Overrides:
setDisplayIsModifiedIndicatorAll in class GPParametersAbstract
Parameters:
displayIndicatorStatus - if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator is always shown, if Automatic the modifiedStatusIndicator is shown as needed.

isButtonForcePivotVisible

public boolean isButtonForcePivotVisible()
Returns:
the m_buttonForcePivotVisible

setButtonForcePivotVisible

public void setButtonForcePivotVisible(boolean buttonForcePivotVisible)
Parameters:
buttonForcePivotVisible - the m_buttonForcePivotVisible to set

isInPivot

public boolean isInPivot()
Returns if the current set of parameters are in pivot or not: the shown values corresponds exactly to the values in memory.

Returns:
true if parameters are in pivot, false otherwise.

clear

public void clear()
           throws fr.cnes.genius.exception.GException

Specified by:
clear in interface fr.cnes.genius.main.GClear
Overrides:
clear in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GException

isModified

public boolean isModified()

Overrides:
isModified in class GPParametersAbstract

write

public void write()
           throws fr.cnes.genius.exception.GException

Specified by:
write in interface fr.cnes.genius.main.GReadWrite
Overrides:
write in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GException

read

public void read()
          throws fr.cnes.genius.exception.GException

Specified by:
read in interface fr.cnes.genius.main.GReadWrite
Overrides:
read in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GException

aditionalActionsAfter1

protected void aditionalActionsAfter1(fr.cnes.genius.main.GEvent e)
                               throws GPOrbitException
Additional actions to be performed by the after() method of class GPParametersAbstract, to be implemented by its sub-classes.

Specified by:
aditionalActionsAfter1 in class GPParametersAbstract
Parameters:
e - processed event
Throws:
GPOrbitException - in case of any problem

aditionalActionsAfter2

protected abstract void aditionalActionsAfter2(fr.cnes.genius.main.GEvent e)
                                        throws GPOrbitException
Additional actions to be performed by the after() method of class GPParametersAbstractWithAnomaly, to be implemented by its sub-classes.

Parameters:
e - processed event
Throws:
GPOrbitException - in case of any problem

onGEntryRealParams

protected void onGEntryRealParams(fr.cnes.genius.main.GEvent e)
                           throws GPOrbitException
Actions when the event comes from any of the first 6 parameters GEntryReals.

Overrides:
onGEntryRealParams in class GPParametersAbstract
Parameters:
e - event
Throws:
GPOrbitException - if the widget orbital parameters do not represent a valid orbit.

onButtonForcePivot

public void onButtonForcePivot()
                        throws GPOrbitException
Actions when the event comes from the pivot button.

Throws:
GPOrbitException - if the widget orbital parameters do not represent a valid orbit.

setSavedParams

public void setSavedParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters savedParams)
                    throws GPOrbitException
Sets the saved orbital parameters. Anomaly/Longitude/AoL must be TRUE.

Overrides:
setSavedParams in class GPParametersAbstract
Parameters:
savedParams - the orbital parameters as an IOrbitalParameters patrius object to be set as saved one.
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

setSavedParams

public void setSavedParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters savedParams,
                           org.orekit.orbits.PositionAngle anomalyType)
                    throws GPOrbitException
Sets the saved orbital parameters.

Parameters:
savedParams - the orbital parameters as a IOrbitalParameters patrius object to be set as saved one.
anomalyType - type of anomaly (TRUE, MEAN or ECCENTRIC)
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

setSavedParams

public void setSavedParams(double[] savedParams,
                           org.orekit.orbits.PositionAngle savedAnomalyType)
Setter for the saved parameters.

Parameters:
savedParams - the array of parameters to set as saved ones.
savedAnomalyType - the type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC) to be set as saved one.

setSavedParams

public void setSavedParams(double[] savedParams)
Sets the saved orbital parameters.

Overrides:
setSavedParams in class GPParametersAbstract
Parameters:
savedParams - the saved orbital parameters in the same order as shown in the widget.

setDefaultParams

public void setDefaultParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters defaultParams)
                      throws GPOrbitException
Sets the default orbital parameters. Anomaly/Longitude/AoL must be TRUE.

Overrides:
setDefaultParams in class GPParametersAbstract
Parameters:
defaultParams - the orbital parameters as an IOrbitalParameters patrius object to be set as default one.
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

setDefaultParams

public void setDefaultParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters defaultParams,
                             org.orekit.orbits.PositionAngle anomalyType)
                      throws GPOrbitException
Sets the default orbital parameters.

Parameters:
defaultParams - the orbital parameters as a IOrbitalParameters patrius object to be set as default one.
anomalyType - type of anomaly (TRUE, MEAN or ECCENTRIC)
Throws:
GPOrbitException - if params is an instance of CartesianParameters and they represent an hyperbolic orbit (Patrius limitation)

setDefaultParams

public void setDefaultParams(double[] defaultParams,
                             org.orekit.orbits.PositionAngle defaultAnomalyType)
Sets the default orbital parameters.

Parameters:
defaultParams - the array of parameters to be set as default ones.
defaultAnomalyType - the type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC) to be set as default one.

setDefaultParams

public void setDefaultParams(double[] defaultParams)
Sets the default orbital parameters.

Overrides:
setDefaultParams in class GPParametersAbstract
Parameters:
defaultParams - the default orbital parameters in the same order as shown in the widget.

setParams

public void setParams(double[] params,
                      org.orekit.orbits.PositionAngle anomalyType)
               throws GPOrbitException
Setter for the widget parameters.

Parameters:
params - the array of parameters to be set.
anomalyType - the type of anomaly/longitude/AoL (TRUE, MEAN or ECCENTRIC) to be set
Throws:
GPOrbitException - if the given orbital parameters do not represent a valid orbit.

setParams

public void setParams(double[] params)
               throws GPOrbitException
Sets the specified orbital parameters in the widget.

Overrides:
setParams in class GPParametersAbstract
Parameters:
params - the orbital parameters in the same order as shown in the widget.
Throws:
GPOrbitException

getParams

public double[] getParams()
Getter for the parameters array. The anomaly/longitude/AoL is always returned in the pivot type.

Overrides:
getParams in class GPParametersAbstract
Returns:
the array of parameters (anomaly/longitude/AoL in the pivot type)

setAnomalies

protected void setAnomalies(Double trueAnomaly,
                            Double eccentricAnomaly,
                            Double meanAnomaly)
Save in memory the three values of the anomaly/longitude/AoL.

Parameters:
trueAnomaly - true anomaly
eccentricAnomaly - eccentric anomaly
meanAnomaly - mean anomaly

setConstraint

public void setConstraint(int labelGap,
                          int paramsGap)
Setter for the constraints of the orbital parameters.

Overrides:
setConstraint in class GPParametersAbstract
Parameters:
labelGap - left gap from panel border to display the label of the orbital parameters
paramsGap - left gap from panel border to display the orbital parameters

getSubComponent

public fr.cnes.genius.main.GComponent getSubComponent(int position)
                                               throws fr.cnes.genius.exception.GComponentException

Overrides:
getSubComponent in class GPParametersAbstract
Throws:
fr.cnes.genius.exception.GComponentException

updateStatus

public void updateStatus()
Update the status of the orbital parameters.

Overrides:
updateStatus in class GPParametersAbstract


Copyright © 2017. All rights reserved.