fr.cnes.genopus.attitudes
Class GPSpinStabilizedAbstract

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.attitudes.GPAttitudeLawAbstract
              extended by fr.cnes.genopus.attitudes.GPSpinStabilizedAbstract
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<CustomAttitudeLaw>
Direct Known Subclasses:
GPBodyCenterGroundPointingAttitudeLaw, GPInertialAttitudeLaw, GPLOFAttitudeLaw, GPNadirPointingAttitudeLaw, GPSunPointingAttitudeLaw, GPTargetGroundPointingAttitudeLaw

public abstract class GPSpinStabilizedAbstract
extends GPAttitudeLawAbstract
implements fr.cnes.genius.main.GListener

Abstract class defining the default methods to be implemented by any spinned stabilized attitude law class.

Author:
ffsm

Nested Class Summary
static class GPSpinStabilizedAbstract.GPLawsEvolution
          Law evolutions enumerate.
 
Nested classes/interfaces inherited from class fr.cnes.genopus.attitudes.GPAttitudeLawAbstract
GPAttitudeLawAbstract.GPAttitudeLawWithEarthShape
 
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.attitudes.GPAttitudeLawAbstract
ANGLE_UNITS, ANGULAR_SPEED_UNITS, SUB_GAP
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPSpinStabilizedAbstract(String widgetId, String label)
          Constructor.
GPSpinStabilizedAbstract(String widgetId, String label, boolean withShowAxisMechanism, String checkboxTooltip)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void clear()
          
protected  void displaySpinStabilizedData()
          Calls put method for all subwidgets related to spin stabilized data.
 void generic()
          
 GPSpinStabilizedAbstract.GPLawsEvolution[] getAvailableLawEvolutions()
          Getter for the list of laws evolutions proposed in the combo box.
protected abstract  org.apache.commons.math3.geometry.euclidean.threed.Vector3D getDefaultPointingAxis()
          Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.
 fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxOccultAxis()
          Getter for the checkbox to show/occult axis.
 fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxLawEvolution()
          Getter for the law evolution combo box subwidget.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealSpinRate()
          Getter for the spin rate subwidget.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelSpinData()
          Getter for the spin data label subwidget.
 GPAxisCoordinates getGPAxisCoordinatesSpinAxis()
          Get spin axis subwidget.
 GPDateOffset getGPDateOffsetSpinDelay()
          Getter for the spin delay subwidget.
 GPSpinStabilizedAbstract.GPLawsEvolution getGPLawEvolutionEnum()
          Get attitude law evolution type currently selected in the combo box.
 fr.cnes.genius.lowLevel.GSeparator getGSeparator2()
          Getter for the separator subwidget before the spin data.
protected abstract  org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPointingAxis()
          Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.
 org.orekit.time.AbsoluteDate getReferenceDate()
          Method to get the reference date for the attitude laws.
protected abstract  org.apache.commons.math3.geometry.euclidean.threed.Vector3D getSavedPointingAxis()
          Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.
protected  CustomAttitudeLaw getSpinnedLaw(CustomAttitudeLaw basicLaw)
          Gets the PATRIUS spin stabilized attitude law from a non rotating law, applying the spin stabilized data.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 boolean isModified()
          
 void setAttitudeLaw(CustomAttitudeLaw attitudeLaw)
          Setter from a PATRIUS attitude law.
protected  void setAvailableLawEvolutions(GPSpinStabilizedAbstract.GPLawsEvolution... evolutions)
          Method to modify the laws evolutions proposed in the combo box.
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setDefaultAttitudeLaw(CustomAttitudeLaw defaultAttitudeLaw)
          Setter of the default value from a PATRIUS attitude law.
 void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
          Controls the display of the isModified indicator of all sub-widgets.
 void setEnabled(boolean flag)
          
 void setGPLawEvolutionEnum(GPSpinStabilizedAbstract.GPLawsEvolution evolution)
          Set attitude law evolution type combo box to a given value.
 void setReferenceDate(org.orekit.time.AbsoluteDate refDate, org.orekit.time.TimeScale timeScale)
          Method to set the reference date for the attitude laws.
 void setSavedAttitudeLaw(CustomAttitudeLaw savedAttitudeLaw)
          Setter of the saved value from a PATRIUS attitude law.
protected abstract  void setSubWidgetsDefaultValues(CustomAttitudeLaw attitudeLaw)
          Private method to set the default values to the sub-widgets related to the non-rotating law.
protected abstract  void setSubWidgetsSavedValues(CustomAttitudeLaw attitudeLaw)
          Private method to set the saved values to the sub-widgets related to the non-rotating law.
protected abstract  void setSubWidgetsValues(CustomAttitudeLaw attitudeLaw)
          Private method to set the values to the sub-widgets related to the non-rotating law.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
protected  void updateIsModifiedIndicator()
          
 
Methods inherited from class fr.cnes.genopus.attitudes.GPAttitudeLawAbstract
display, getGLabelLawName, getGSeparator1, getPatriusObject, isEnabled, isNativeAttitudeLaw, read, setDefaultConstraints, updateStatus, write
 
Methods inherited from class fr.cnes.genius.lowLevel.GContainer
put
 
Methods inherited from class fr.cnes.genius.main.GComponent
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, 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, 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
 
Methods inherited from interface fr.cnes.genius.main.GListener
before
 

Constructor Detail

GPSpinStabilizedAbstract

public GPSpinStabilizedAbstract(String widgetId,
                                String label)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the attitude law contents section.

GPSpinStabilizedAbstract

public GPSpinStabilizedAbstract(String widgetId,
                                String label,
                                boolean withShowAxisMechanism,
                                String checkboxTooltip)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the attitude law contents section.
withShowAxisMechanism - true to activate the mecanism to hide the axis coordinates depending on a checkbox.
checkboxTooltip - tooltip to associate to the checkbox that hides the axis coordinates.
Method Detail

setWidgetId

public void setWidgetId(String widgetId)

Overrides:
setWidgetId in class GPAttitudeLawAbstract

getGComboBoxLawEvolution

public fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxLawEvolution()
Getter for the law evolution combo box subwidget.

Returns:
the law evolution combo box subwidget

getGSeparator2

public fr.cnes.genius.lowLevel.GSeparator getGSeparator2()
Getter for the separator subwidget before the spin data.

Returns:
the separator subwidget before the spin data

getGLabelSpinData

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelSpinData()
Getter for the spin data label subwidget.

Returns:
the spin data label subwidget

getGPDateOffsetSpinDelay

public GPDateOffset getGPDateOffsetSpinDelay()
Getter for the spin delay subwidget.

Returns:
the spin delay subwidget

getGCheckBoxOccultAxis

public fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxOccultAxis()
Getter for the checkbox to show/occult axis.

Returns:
the checkbox to show/occult axis.

getGPAxisCoordinatesSpinAxis

public GPAxisCoordinates getGPAxisCoordinatesSpinAxis()
Get spin axis subwidget.

Returns:
the spin axis subwidget

getGEntryRealSpinRate

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealSpinRate()
Getter for the spin rate subwidget.

Returns:
the spin rate subwidget

setAttitudeLaw

public void setAttitudeLaw(CustomAttitudeLaw attitudeLaw)
                    throws GPAttitudeException
Setter from a PATRIUS attitude law.

Specified by:
setAttitudeLaw in class GPAttitudeLawAbstract
Parameters:
attitudeLaw - to be set in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setDefaultAttitudeLaw

public void setDefaultAttitudeLaw(CustomAttitudeLaw defaultAttitudeLaw)
                           throws GPAttitudeException
Setter of the default value from a PATRIUS attitude law.

Specified by:
setDefaultAttitudeLaw in class GPAttitudeLawAbstract
Parameters:
defaultAttitudeLaw - to be set as default in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setSavedAttitudeLaw

public void setSavedAttitudeLaw(CustomAttitudeLaw savedAttitudeLaw)
                         throws GPAttitudeException
Setter of the saved value from a PATRIUS attitude law.

Specified by:
setSavedAttitudeLaw in class GPAttitudeLawAbstract
Parameters:
savedAttitudeLaw - to be set as saved in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setConstraint

public void setConstraint(int widgetGap)
Setter for the constraints of the widget.

Overrides:
setConstraint in class GPAttitudeLawAbstract
Parameters:
widgetGap - left gap from panel border to display the label of the widget.

generic

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

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

displaySpinStabilizedData

protected void displaySpinStabilizedData()
                                  throws fr.cnes.genius.exception.GException
Calls put method for all subwidgets related to spin stabilized data.

Throws:
fr.cnes.genius.exception.GException - in case of problem when reading or writing

setDisplayIsModifiedIndicatorAll

public void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
Controls the display of the isModified indicator of all sub-widgets.

Specified by:
setDisplayIsModifiedIndicatorAll in class GPAttitudeLawAbstract
Parameters:
displayIndicatorStatus - if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator is never shown, if Automatic the modifiedStatusIndicator is shown as needed.

isModified

public boolean isModified()

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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

Overrides:
updateIsModifiedIndicator in class GPAttitudeLawAbstract

getSubComponent

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

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

setSubWidgetsValues

protected abstract void setSubWidgetsValues(CustomAttitudeLaw attitudeLaw)
                                     throws GPAttitudeException
Private method to set the values to the sub-widgets related to the non-rotating law.

Parameters:
attitudeLaw - PATRIUS attitude law. Must be of native type.
Throws:
GPAttitudeException - if there is some problem

setSubWidgetsDefaultValues

protected abstract void setSubWidgetsDefaultValues(CustomAttitudeLaw attitudeLaw)
                                            throws GPAttitudeException
Private method to set the default values to the sub-widgets related to the non-rotating law.

Parameters:
attitudeLaw - PATRIUS attitude law. Must be of native type.
Throws:
GPAttitudeException - if there is some problem

setSubWidgetsSavedValues

protected abstract void setSubWidgetsSavedValues(CustomAttitudeLaw attitudeLaw)
                                          throws GPAttitudeException
Private method to set the saved values to the sub-widgets related to the non-rotating law.

Parameters:
attitudeLaw - PATRIUS attitude law. Must be of native type.
Throws:
GPAttitudeException - if there is some problem

getGPLawEvolutionEnum

public GPSpinStabilizedAbstract.GPLawsEvolution getGPLawEvolutionEnum()
Get attitude law evolution type currently selected in the combo box.

Returns:
the attitude evolution type (as a choice of the GPSpinStabilizedAbstract.GPLawsEvolution enum).

setGPLawEvolutionEnum

public void setGPLawEvolutionEnum(GPSpinStabilizedAbstract.GPLawsEvolution evolution)
Set attitude law evolution type combo box to a given value.

Parameters:
evolution - the attitude evolution type (as a choice of the GPSpinStabilizedAbstract.GPLawsEvolution enum).

setAvailableLawEvolutions

protected void setAvailableLawEvolutions(GPSpinStabilizedAbstract.GPLawsEvolution... evolutions)
Method to modify the laws evolutions proposed in the combo box.

Parameters:
evolutions - items of GPSpinStabilizedAbstract.GPLawsEvolution enum to be shown in the combobox.

getAvailableLawEvolutions

public GPSpinStabilizedAbstract.GPLawsEvolution[] getAvailableLawEvolutions()
Getter for the list of laws evolutions proposed in the combo box.

Returns:
an array of GPSpinStabilizedAbstract.GPLawsEvolution enum items with the list of laws evolutions proposed in the widget.

updateCondensedStatus

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

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

getSpinnedLaw

protected CustomAttitudeLaw getSpinnedLaw(CustomAttitudeLaw basicLaw)
                                   throws GPAttitudeException
Gets the PATRIUS spin stabilized attitude law from a non rotating law, applying the spin stabilized data.

Parameters:
basicLaw - the widget non rotating attitude law
Returns:
the spin stabilized attitude law
Throws:
GPAttitudeException - if the spin vector is not defined (unreacheble) or if the spin start date is not defined or out of bounds (for calendar format representation)

getPointingAxis

protected abstract org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPointingAxis()
                                                                                        throws GPAttitudeException
Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.

Returns:
the requiered pointing axis for the spin stabilized attitude law.
Throws:
GPAttitudeException - in case of any problem.

getDefaultPointingAxis

protected abstract org.apache.commons.math3.geometry.euclidean.threed.Vector3D getDefaultPointingAxis()
                                                                                               throws GPAttitudeException
Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.

Returns:
the requiered pointing axis for the spin stabilized attitude law.
Throws:
GPAttitudeException - in case of any problem.

getSavedPointingAxis

protected abstract org.apache.commons.math3.geometry.euclidean.threed.Vector3D getSavedPointingAxis()
                                                                                             throws GPAttitudeException
Gets the pointing axis for the spin stabilized attitude law in case of comming from outside the spin stabilized data.

Returns:
the requiered pointing axis for the spin stabilized attitude law.
Throws:
GPAttitudeException - in case of any problem.

setReferenceDate

public void setReferenceDate(org.orekit.time.AbsoluteDate refDate,
                             org.orekit.time.TimeScale timeScale)
Method to set the reference date for the attitude laws.

Parameters:
refDate - reference date
timeScale - time scale for the time offsets of the spin stabilized laws

getReferenceDate

public org.orekit.time.AbsoluteDate getReferenceDate()
                                              throws GPAttitudeException
Method to get the reference date for the attitude laws.

Returns:
reference date
Throws:
GPAttitudeException - if the reference date is undefined.

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

setEnabled

public void setEnabled(boolean flag)

Overrides:
setEnabled in class GPAttitudeLawAbstract

after

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

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


Copyright © 2017. All rights reserved.