fr.cnes.genopus.forces
Class GPAeroForceModel

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.forces.GPAeroForceModel
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<CustomDragForce>, GPPatriusWithObjects<CustomDragForce>

public class GPAeroForceModel
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GClear, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GCondensedStatusInterface, GPPatriusWithObjects<CustomDragForce>

Class containing the widget to define the Atmospheric force force model.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GCheckBoxWithIndicatoraeroForceCheckBox0, 0, 0 => "newline , gapleft 0 , split 2"
0, 0, 1 => (null)
0, 1 => (null)
1GChoiceaeroModelChoice1, 0, 0 => "newline , gapleft 20 , split 2"
1, 0, 1 => (null)
1, 1 => "split"
2GChoicesolarActivityChoice2, 0, 0 => "newline , gapleft 40 , split 2"
2, 0, 1 => (null)
2, 1 => "split"
3GEntryRealf107EntryReal3, 0, 0 => "newline , gapleft 60 , split 2"
3, 0, 1 => (null)
3, 1 => (null)
4GEntryRealapEntryReal4, 0, 0 => "newline , gapleft 60 , split 2"
4, 0, 1 => (null)
4, 1 => (null)
5GButtonloadSolarActivityFileButton"newline , skip 1"
6GEntryStringloadedSolarActivityFileEntryString6, 0, 0 => "newline , gapleft 60 , split 2"
6, 0, 1 => (null)
6, 1 => (null)
7GEntryRealdensityH0EntryReal7, 0, 0 => "newline , gapleft 40 , split 2"
7, 0, 1 => (null)
7, 1 => "split 2"
7, 2 => (null)
8GEntryRealh0EntryReal8, 0, 0 => "newline , gapleft 40 , split 2"
8, 0, 1 => (null)
8, 1 => "split 2"
8, 2 => (null)
9GEntryRealhScaleEntryReal9, 0, 0 => "newline , gapleft 40 , split 2"
9, 0, 1 => (null)
9, 1 => "split 2"
9, 2 => (null)
10GEntryRealmultipAeroForceEntryReal10, 0, 0 => "newline , gapleft 20 , split 2"
10, 0, 1 => (null)
10, 1 => (null)


Nested Class Summary
static class GPAeroForceModel.AtmosphereType
          Enum containing the atmospheric model types.
static class GPAeroForceModel.SolarActivityTypes
          Enum containing solar activity types.
 
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
 
Nested classes/interfaces inherited from interface fr.cnes.genopus.main.GPPatriusWithObjects
GPPatriusWithObjects.ArgsChecker
 
Field Summary
static fr.cnes.genius.unit.GMetricUnit[] UNITS_DENSITY
          Density units.
static fr.cnes.genius.unit.GMetricUnit[] UNITS_DISTANCE
          Distance units.
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPAeroForceModel(String widgetId, String label)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void before(fr.cnes.genius.main.GEvent e)
          
 void clear()
          
 void display()
          
 void generic()
          
 fr.cnes.sirius.patrius.assembly.Assembly getAssembly()
          Getter for the assembly to be used for drag force model creation.
 CustomAtmosphere getAtmosphere()
          Get the atmospheric model from widget data.
 org.orekit.bodies.BodyShape getBodyShape()
          Getter for the Earth shape to be used for the drag force model creation.
 fr.cnes.genius.lowLevel.GButton getGButtonLoadSolarActFile()
          Getter for the GButton to load a solar activity file.
 fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxForceModel()
          Getter for the GCheckBoxWithIndicator defining if the force model is active.
 fr.cnes.genius.highLevel.GChoice getGChoiceAtmosphModel()
          Getter for the GChoice defining if the atmopheric model.
 fr.cnes.genius.highLevel.GChoice getGChoiceSolarActType()
          Getter for the GChoice defining if the solar activity type.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealAp()
          Getter for the GEntryReal defining the Ap.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealDensityAtH0()
          Getter for the GEntryReal defining the density at h0.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealF107()
          Getter for the GEntryReal defining the F107.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealH0()
          Getter for the GEntryReal defining h0.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealMultip()
          Getter for the GEntryReal defining the multiplicative factor.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealScaleFactorH()
          Getter for the GEntryReal defining the scale factor H.
 fr.cnes.genius.highLevel.GEntryString getGEntryStringLoadedSolarActFile()
          Getter for the GEntryString for the file path of the loaded solar activity file.
 double getMultiplicativeFactor()
          Get multiplicative factor for Aero force.
 CustomDragForce getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 CustomDragForce getPatriusObject(Object... args)
          Returns the PATRIUS object associated to a GENOPUS widget.
 GPAeroForceModel.AtmosphereType getSelectedAtmosphericModel()
          Get selected atmospheric model as a GPAeroForceModel.AtmosphereType enum value.
 GPAeroForceModel.SolarActivityTypes getSelectedSolarActivity()
          Get selected solar activity as a GPAeroForceModel.SolarActivityTypes enum value.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 org.orekit.bodies.CelestialBody getSun()
          Getter for the Sun celestial body to be used for drag force model creation.
 boolean isEnabled()
          
 boolean isModified()
          
 boolean isSelected()
          Checks if the aero force is selected.
 void read()
          
 void setAssembly(fr.cnes.sirius.patrius.assembly.Assembly assembly)
          Setter for the assembly to be used for drag force model creation.
 void setBodyShape(org.orekit.bodies.BodyShape earthBodyShape)
          Setter for the Earth shape to be used for drag force model creation.
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setEnabled(boolean b)
          
 void setMultiplicativeFactor(double multiplicativeFactor)
          Set multiplicative factor for Aero force.
 void setSun(org.orekit.bodies.CelestialBody sun)
          Setter for the Sun celestial body to be used for drag force model creation.
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
protected  void updateIsModifiedIndicator()
          
 void updateStatus()
          Update the status of the widget.
 void 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, 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

UNITS_DISTANCE

public static final fr.cnes.genius.unit.GMetricUnit[] UNITS_DISTANCE
Distance units.


UNITS_DENSITY

public static final fr.cnes.genius.unit.GMetricUnit[] UNITS_DENSITY
Density units.

Constructor Detail

GPAeroForceModel

public GPAeroForceModel(String widgetId,
                        String label)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
label - text to display in the label.
Method Detail

setConstraint

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

Parameters:
widgetGap - left gap from panel border to display the label of the widget.

getGCheckBoxForceModel

public fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxForceModel()
Getter for the GCheckBoxWithIndicator defining if the force model is active.

Returns:
the GCheckBoxWithIndicator defining if the force model is active

getGChoiceAtmosphModel

public fr.cnes.genius.highLevel.GChoice getGChoiceAtmosphModel()
Getter for the GChoice defining if the atmopheric model.

Returns:
the GChoice defining if the atmopheric model

getGEntryRealDensityAtH0

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealDensityAtH0()
Getter for the GEntryReal defining the density at h0.

Returns:
the GEntryReal defining the density at h0

getGEntryRealH0

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealH0()
Getter for the GEntryReal defining h0.

Returns:
the GEntryReal defining h0

getGEntryRealScaleFactorH

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealScaleFactorH()
Getter for the GEntryReal defining the scale factor H.

Returns:
the GEntryReal defining the scale factor H

getGEntryRealMultip

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealMultip()
Getter for the GEntryReal defining the multiplicative factor.

Returns:
the GEntryReal defining the multiplicative factor

getGChoiceSolarActType

public fr.cnes.genius.highLevel.GChoice getGChoiceSolarActType()
Getter for the GChoice defining if the solar activity type.

Returns:
the GChoice defining if the solar activity type

getGEntryRealF107

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealF107()
Getter for the GEntryReal defining the F107.

Returns:
the GEntryReal defining the F107

getGEntryRealAp

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealAp()
Getter for the GEntryReal defining the Ap.

Returns:
the GEntryReal defining the Ap

getGButtonLoadSolarActFile

public fr.cnes.genius.lowLevel.GButton getGButtonLoadSolarActFile()
Getter for the GButton to load a solar activity file.

Returns:
the GButton to load a solar activity file

getGEntryStringLoadedSolarActFile

public fr.cnes.genius.highLevel.GEntryString getGEntryStringLoadedSolarActFile()
Getter for the GEntryString for the file path of the loaded solar activity file.

Returns:
the GEntryString for the file path of the loaded solar activity file

setAssembly

public void setAssembly(fr.cnes.sirius.patrius.assembly.Assembly assembly)
Setter for the assembly to be used for drag force model creation. Requiered for the drag coefficient.

Parameters:
assembly - the assembly to be set.

getAssembly

public fr.cnes.sirius.patrius.assembly.Assembly getAssembly()
Getter for the assembly to be used for drag force model creation. Requiered for the drag coefficient.

Returns:
the internal assembly.

setBodyShape

public void setBodyShape(org.orekit.bodies.BodyShape earthBodyShape)
Setter for the Earth shape to be used for drag force model creation. Requiered for the atmosphere model.

Parameters:
earthBodyShape - the Earth shape to be set.

getBodyShape

public org.orekit.bodies.BodyShape getBodyShape()
Getter for the Earth shape to be used for the drag force model creation. Requiered for the atmosphere model.

Returns:
the internal Earth shape.

setSun

public void setSun(org.orekit.bodies.CelestialBody sun)
Setter for the Sun celestial body to be used for drag force model creation. Requiered for the atmosphere model.

Parameters:
sun - the Sun celestial body to be used.

getSun

public org.orekit.bodies.CelestialBody getSun()
Getter for the Sun celestial body to be used for drag force model creation. Requiered for the atmosphere model.

Returns:
the internal Sun celestial body.

isEnabled

public boolean isEnabled()

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

setEnabled

public void setEnabled(boolean b)

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

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

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

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

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

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

before

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

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

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

getPatriusObject

public CustomDragForce getPatriusObject()
                                 throws GPForcesException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<CustomDragForce>
Returns:
the PATRIUS object associated to the widget.
Throws:
GPForcesException - if the assembly, the Earth shape or the sun body have not been initialized, if AERO_GLOBAL and AERO_SPHERE properties are given at the same time or if no aerodynamic properties are found

getPatriusObject

public CustomDragForce getPatriusObject(Object... args)
                                 throws fr.cnes.genius.exception.GException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatriusWithObjects<CustomDragForce>
Parameters:
args - The parameters are 0: BodyShape, 1: Assembly, 2: CelestialBody.
Returns:
the PATRIUS object associated to the widget.
Throws:
fr.cnes.genius.exception.GException - if the PATRIUS object cannot be created from the widget data.

getAtmosphere

public CustomAtmosphere getAtmosphere()
                               throws GPForcesException
Get the atmospheric model from widget data.

Returns:
the atmospheric model.
Throws:
GPForcesException - if there is a problem with solar activity provider

isSelected

public boolean isSelected()
Checks if the aero force is selected.

Returns:
true if the aero force is selected, false otherwise.

getSelectedAtmosphericModel

public GPAeroForceModel.AtmosphereType getSelectedAtmosphericModel()
Get selected atmospheric model as a GPAeroForceModel.AtmosphereType enum value.

Returns:
the selected atmospheric model

getSelectedSolarActivity

public GPAeroForceModel.SolarActivityTypes getSelectedSolarActivity()
Get selected solar activity as a GPAeroForceModel.SolarActivityTypes enum value.

Returns:
the selected solar activity

setMultiplicativeFactor

public void setMultiplicativeFactor(double multiplicativeFactor)
Set multiplicative factor for Aero force.

Parameters:
multiplicativeFactor - the multiplicativeFactor to set

getMultiplicativeFactor

public double getMultiplicativeFactor()
Get multiplicative factor for Aero force.

Returns:
the multiplicativeFactor

isModified

public boolean isModified()

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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

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

updateStatus

public void updateStatus()
Update the status of the widget.


updateCondensedStatus

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

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

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


Copyright © 2017. All rights reserved.