fr.cnes.genopus.orbits
Class GPParametersAbstract

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.orbits.GPParametersAbstract
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:
GPCartesianParameters, GPParametersAbstractWithAnomaly, GPReentryParameters

public abstract class GPParametersAbstract
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GClear, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GReadWrite, GPPatrius<org.orekit.orbits.orbitalparameters.IOrbitalParameters>, fr.cnes.genius.main.GCondensedStatusInterface

Abstract class defining the default methods to be implemented by any class that want to define a type of orbital parameters.

Author:
aadt

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
protected static fr.cnes.genius.unit.GUnit[] ANGLE_UNITS
          Units for angles available in the widget.
protected static fr.cnes.genius.unit.GUnit[] DISTANCE_UNITS
          Units for distance available in the widget.
protected static fr.cnes.genius.interval.GInterval INT_ERR_MNS_INF_TO_ZERO
          Validity interval: (-inf, 0).
protected static fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_EXC
          Validity interval: (-1, 1).
protected static fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_INC
          Validity interval: [-1, 1].
protected static fr.cnes.genius.interval.GInterval INT_ERR_MNS_SQRT_2_TO_SQRT_2
          Validity interval: [-sqrt(2), sqrt(2)].
protected static fr.cnes.genius.interval.GInterval INT_ERR_ZERO_EX_TO_INF
          Validity interval: (0, inf).
protected static fr.cnes.genius.interval.GInterval INT_ERR_ZERO_IN_TO_INF
          Validity interval: [0, inf).
protected static fr.cnes.genius.interval.GInterval INT_WARN_MNS_PI_TO_PI
          Validity interval: (-inf, (-pi, pi], inf).
protected static fr.cnes.genius.interval.GInterval INT_WARN_ZERO_TO_PI
          Validity interval: (-inf, [0, pi), inf).
protected static double[] NULL_PARAMS
          Null parameters (except Mu) associated to null orbits or empty constructor.
protected static fr.cnes.genius.unit.GUnit[] VELOCITY_UNITS
          Units for speed available in the widget.
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPParametersAbstract(String widgetId, String name, String label)
          Constructor.
 
Method Summary
protected abstract  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 aditionalActionsBefore1(fr.cnes.genius.main.GEvent e)
          Additional actions to be performed by the before() method of class GPParametersAbstract, to be implemented by its sub-classes.
 void after(fr.cnes.genius.main.GEvent e)
          
 void attachCopyPasteMenu(String label, fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
          
 void before(fr.cnes.genius.main.GEvent e)
          
protected abstract  fr.cnes.genius.interval.GIntervalAbstract.GStatus checkGlobalCoherence(fr.cnes.genius.interval.GIntervalAbstract.GStatus status)
          Checks if the the global coherence conditions are fulfilled by the parameters.
 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 .
protected  double[] copyNullParams()
          Initialize the array of orbital parameters to the null parameters defined by NULL_PARAMS.
 void display()
          
 void generic()
          
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealMu()
          Getter for the GEntryReal defining the gravitational constant of the central body.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the label of the set of cartesian parameters.
 String getName()
          Getter for the name of the set of orbital parameters.
protected  ArrayList<fr.cnes.genius.highLevel.GEntryReal> getParametersGEntryRealsList()
          Generic getter for the list of GEntryReals corresponding to the orbital parameters.
 double[] getParams()
          Gets the orbital parameters specified in the widget.
abstract  org.orekit.orbits.orbitalparameters.IOrbitalParameters getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
protected abstract  fr.cnes.genius.main.GItemTypeInterface getXMLType()
          Generic getter for the set of orbital parameters item type in the XML configuration file.
protected  boolean handleOrbitCopyPasteEvent(fr.cnes.genius.main.GEvent event)
          Handles the orbit copy-paste event if possible.
 boolean isBlockedConversions()
          Getter for the blocked conversions flag.
 boolean isEnabled()
          
 boolean isModified()
          
 boolean isParamsNull()
          Check whether the orbital parameters defined in the widget are null or not.
protected  void onGEntryRealParams(fr.cnes.genius.main.GEvent e)
          Actions when the event comes from any of the first 6 parameters GEntryReals.
 void read()
          
 void setBlockedConversions(boolean blockedConversions)
          Setter for the blocked conversions flag.
 void setConstraint(int labelGap, int paramsGap)
          Setter for the constraints of the orbital parameters.
protected  void setDefaultConstraint()
          Setter for the default constraint of the set of parameters.
 void setDefaultParams(double[] defaultParams)
          Sets the default orbital parameters.
 void setDefaultParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters defaultParams)
          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(org.orekit.orbits.orbitalparameters.IOrbitalParameters params)
          Sets the specified orbital parameters in the widget.
 void setSavedParams(double[] savedParams)
          Sets the saved orbital parameters.
 void setSavedParams(org.orekit.orbits.orbitalparameters.IOrbitalParameters savedParams)
          Sets the saved orbital parameters.
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
 void updateIsModifiedIndicator()
          
 void updateStatus()
          Update the status of the orbital parameters.
 void write()
          
 
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
 

Field Detail

NULL_PARAMS

protected static final double[] NULL_PARAMS
Null parameters (except Mu) associated to null orbits or empty constructor.


INT_WARN_MNS_PI_TO_PI

protected static final fr.cnes.genius.interval.GInterval INT_WARN_MNS_PI_TO_PI
Validity interval: (-inf, (-pi, pi], inf).


INT_WARN_ZERO_TO_PI

protected static final fr.cnes.genius.interval.GInterval INT_WARN_ZERO_TO_PI
Validity interval: (-inf, [0, pi), inf).


INT_ERR_ZERO_EX_TO_INF

protected static final fr.cnes.genius.interval.GInterval INT_ERR_ZERO_EX_TO_INF
Validity interval: (0, inf).


INT_ERR_ZERO_IN_TO_INF

protected static final fr.cnes.genius.interval.GInterval INT_ERR_ZERO_IN_TO_INF
Validity interval: [0, inf).


INT_ERR_MNS_INF_TO_ZERO

protected static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_INF_TO_ZERO
Validity interval: (-inf, 0).


INT_ERR_MNS_ONE_TO_ONE_EXC

protected static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_EXC
Validity interval: (-1, 1).


INT_ERR_MNS_ONE_TO_ONE_INC

protected static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_INC
Validity interval: [-1, 1].


INT_ERR_MNS_SQRT_2_TO_SQRT_2

protected static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_SQRT_2_TO_SQRT_2
Validity interval: [-sqrt(2), sqrt(2)].


DISTANCE_UNITS

protected static final fr.cnes.genius.unit.GUnit[] DISTANCE_UNITS
Units for distance available in the widget.


VELOCITY_UNITS

protected static final fr.cnes.genius.unit.GUnit[] VELOCITY_UNITS
Units for speed available in the widget.


ANGLE_UNITS

protected static final fr.cnes.genius.unit.GUnit[] ANGLE_UNITS
Units for angles available in the widget.

Constructor Detail

GPParametersAbstract

public GPParametersAbstract(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

getName

public String getName()
Getter for the name of the set of orbital parameters.

Overrides:
getName in class fr.cnes.genius.main.GComponent
Returns:
the name of the set of orbital parameters.

getGLabel

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
Getter for the label of the set of cartesian parameters.

Returns:
the label of the set of cartesian parameters.

getParams

public double[] getParams()
Gets the orbital parameters specified in the widget.

Returns:
the orbital parameters in the same order and value as shown in the widget.

setParams

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

Parameters:
params - the orbital parameters in the same order as shown in the widget.
Throws:
GPOrbitException - if the given orbital parameters do not represent a valid orbit.

setParams

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

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)

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 .

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)

setDefaultParams

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

Parameters:
defaultParams - the default orbital parameters.
Throws:
GPOrbitException - in case of problem computing the orbital parameters values

setDefaultParams

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

Parameters:
defaultParams - the default orbital parameters in the same order as shown in the widget.

setSavedParams

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

Parameters:
savedParams - the saved orbital parameters in the same order as shown in the widget.

setSavedParams

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

Parameters:
savedParams - the saved orbital parameters.
Throws:
GPOrbitException - in case of problem computing the orbital parameters values

copyNullParams

protected double[] copyNullParams()
Initialize the array of orbital parameters to the null parameters defined by NULL_PARAMS.

Returns:
an array of null orbital parameters.

isParamsNull

public boolean isParamsNull()
Check whether the orbital parameters defined in the widget are null or not.

Returns:
true if orbital parameters are null.

isEnabled

public boolean isEnabled()

Overrides:
isEnabled in class fr.cnes.genius.main.GComponent

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).

Parameters:
displayIndicatorStatus - if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator is always shown, if Automatic the modifiedStatusIndicator is shown as needed.

isBlockedConversions

public boolean isBlockedConversions()
Getter for the blocked conversions flag. When the conversions are blocked changing the anomaly type will not change the numeric value of the anomaly.

Returns:
blockedConversions the flag to be set

setBlockedConversions

public void setBlockedConversions(boolean blockedConversions)
Setter for the blocked conversions flag. When the conversions are blocked changing the anomaly type will not change the numeric value of the anomaly.

Parameters:
blockedConversions - the flag to be set

generic

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

Specified by:
generic in class fr.cnes.genius.lowLevel.GContainer
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
Throws:
fr.cnes.genius.exception.GException

updateStatus

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


checkGlobalCoherence

protected abstract fr.cnes.genius.interval.GIntervalAbstract.GStatus checkGlobalCoherence(fr.cnes.genius.interval.GIntervalAbstract.GStatus status)
Checks if the the global coherence conditions are fulfilled by the parameters.

Parameters:
status - initial status.
Returns:
status after checking global coherence of the parameters.

attachCopyPasteMenu

public void attachCopyPasteMenu(String label,
                                fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)

Overrides:
attachCopyPasteMenu in class fr.cnes.genius.main.GComponent

handleOrbitCopyPasteEvent

protected boolean handleOrbitCopyPasteEvent(fr.cnes.genius.main.GEvent event)
                                     throws GPOrbitException
Handles the orbit copy-paste event if possible.

Parameters:
event - to be processed.
Returns:
true if the event was processed, false otherwise.
Throws:
GPOrbitException - in case the copy-paste operation raises an exception.

clear

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

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

getGEntryRealMu

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealMu()
Getter for the GEntryReal defining the gravitational constant of the central body.

Returns:
the GEntryReal defining the gravitational constant of the central body.

setConstraint

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

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

setDefaultConstraint

protected void setDefaultConstraint()
Setter for the default constraint of the set of parameters.


updateIsModifiedIndicator

public void updateIsModifiedIndicator()

Overrides:
updateIsModifiedIndicator in class fr.cnes.genius.main.GComponent

getParametersGEntryRealsList

protected ArrayList<fr.cnes.genius.highLevel.GEntryReal> getParametersGEntryRealsList()
Generic getter for the list of GEntryReals corresponding to the orbital parameters.

Returns:
an ArrayList of the parameters' GEntryReals.

before

public void before(fr.cnes.genius.main.GEvent e)
            throws GPOrbitException

Specified by:
before in interface fr.cnes.genius.main.GListener
Throws:
GPOrbitException

aditionalActionsBefore1

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

Parameters:
e - processed event
Throws:
GPOrbitException - if the previous parameters are not valid

after

public void after(fr.cnes.genius.main.GEvent e)
           throws GPOrbitException

Specified by:
after in interface fr.cnes.genius.main.GListener
Throws:
GPOrbitException

aditionalActionsAfter1

protected abstract 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.

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.

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

isModified

public boolean isModified()

Overrides:
isModified in class fr.cnes.genius.main.GComponent

setEnabled

public void setEnabled(boolean b)

Overrides:
setEnabled in class fr.cnes.genius.main.GComponent

getXMLType

protected abstract fr.cnes.genius.main.GItemTypeInterface getXMLType()
Generic getter for the set of orbital parameters item type in the XML configuration file.

Returns:
the parameters XML item type.

write

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

Specified by:
write in interface fr.cnes.genius.main.GReadWrite
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
Throws:
fr.cnes.genius.exception.GException

getPatriusObject

public abstract org.orekit.orbits.orbitalparameters.IOrbitalParameters getPatriusObject()
                                                                                 throws GPOrbitException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<org.orekit.orbits.orbitalparameters.IOrbitalParameters>
Returns:
the PATRIUS object associated to the widget.
Throws:
GPOrbitException - if the parameters cannot be created

getSubComponent

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

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

updateCondensedStatus

public void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)

Specified by:
updateCondensedStatus in interface fr.cnes.genius.main.GCondensedStatusInterface


Copyright © 2017. All rights reserved.