« GPAttitudeSequence » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 27 : | Ligne 27 : | ||
[[File:ReferenceDate.png]] | [[File:ReferenceDate.png]] | ||
=== | === List of attitude laws === | ||
Then, a button appears that allows displaying a new window to define a set of available attitude laws. Each law is defined as below: | Then, a button appears that allows displaying a new window to define a set of available attitude laws. Each law is defined as below: | ||
Ligne 46 : | Ligne 46 : | ||
** The type of event and data related to it. | ** The type of event and data related to it. | ||
This “event switch” is a very powerful option that allows defining relatively shortly a whole mission. For example, if we want to define the fact that the vehicle is <font color=#FF8C00 title="Local Vertical Local Horizontal">LVLH</font> oriented in eclipse and Sun pointing out of eclipse, we will only have to define two switches calling to two attitude laws: | This “event switch” is a very powerful option that allows defining relatively shortly a whole mission. For example, if we want to define the fact that the vehicle is <font color=#FF8C00 title="Local Vertical Local Horizontal">LVLH</font> oriented in eclipse and Sun pointing out of eclipse, we will only have to define two switches calling to two attitude laws: | ||
* Switch #1 with entering in eclipse as orbital event and law before "Sun pointing" and law after "<font color=#FF8C00 title="Local Vertical Local Horizontal">LVLH</font>" | |||
* Switch #2 with exiting in eclipse as orbital event and law before "<font color=#FF8C00 title="Local Vertical Local Horizontal">LVLH</font>" and law after "Sun pointing" | |||
[[File:GPAttitudeSequence.png]] | [[File:GPAttitudeSequence.png]] | ||
== How to use it == | |||
To get a [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] <font color=#4169E1>AttitudeSequence object</font>, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below: | |||
<syntaxhighlight lang="java"> | |||
AttitudesSequence seq = attSeq.getPatriusObject(); | |||
</syntaxhighlight> | |||
== How i is stored == | |||
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format for a sequence: | |||
<syntaxhighlight lang="XML"> | |||
<String name="dateMode">external</String> | |||
<AbsoluteDate name="referenceDate"> | |||
<String name="date">01/01/2000 00h00m00s</String> | |||
<String name="scale">UTC</String> | |||
</AbsoluteDate> | |||
<AbsoluteDate name="externalDate"> | |||
<String name="date">01/01/2010 00h00m00s</String> | |||
<String name="scale">UTC</String> | |||
</AbsoluteDate> | |||
<AttitudeLawList name="lawList"> | |||
<ComponentList name="AttitudeLaw"> | |||
<!--Amount of items--> | |||
<Integer name="nbItems">2</Integer> | |||
<ComponentListItem name="Item_1"> | |||
<String name="lawName">LawName1</String> | |||
<String name="lawType">LOF</String> | |||
<LOFAttitudeLaw name="LOF_Att._Law:"> | |||
<String name="lawEvol">Constant</String> | |||
<String name="LOF">LVLH</String> | |||
<Frame name="Inertial"> | |||
<String name="name">GCRF</String> | |||
</Frame> | |||
<Boolean name="biasAngles">true</Boolean> | |||
<Rotation name="Rotation:"> | |||
<String name="rotationOrder">ZYX Cardan angles</String> | |||
<Real name="psi" unit="deg">1.8E2</Real> | |||
<Real name="theta" unit="deg">0.0E0</Real> | |||
<Real name="phi" unit="deg">0.0E0</Real> | |||
</Rotation> | |||
</LOFAttitudeLaw> | |||
</ComponentListItem> | |||
<ComponentListItem name="Item_2"> | |||
<String name="lawName">LawName2</String> | |||
<String name="lawType">Inertial</String> | |||
<InertialAttitudeLaw name="Inertial_Att._Law:"> | |||
<String name="lawEvol">Constant</String> | |||
<Frame name="referenceFrame"> | |||
<String name="name">EME2000</String> | |||
</Frame> | |||
<Boolean name="biasAngles">false</Boolean> | |||
</InertialAttitudeLaw> | |||
</ComponentListItem> | |||
</ComponentList> | |||
</AttitudeLawList> | |||
<SwitchingConditionList name="switchList"> | |||
<ComponentList name="AttitudeSequenceSwitch"> | |||
<!--Amount of items--> | |||
<Integer name="nbItems">1</Integer> | |||
<ComponentListItem name="Item_1"> | |||
<String name="Law_before">LawName1</String> | |||
<String name="Law_after">LawName2</String> | |||
<EventSelector name="event"> | |||
<String name="eventType">RELATIVE_DATE</String> | |||
<RelativeDateDetector name="eventData"> | |||
<DateOffset name="relativeDate">0j00h02m00s</DateOffset> | |||
<String name="actionData">RESET_STATE</String> | |||
<Real name="maxCheck" unit="s">1.0E10</Real> | |||
<Real name="threshold" unit="s">1.0E-9</Real> | |||
</RelativeDateDetector> | |||
</EventSelector> | |||
</ComponentListItem> | |||
</ComponentList> | |||
</SwitchingConditionList> | |||
</syntaxhighlight> |
Version du 29 juillet 2017 à 12:13
How to call it
For using the GPAttitudeSequence class the developer has only to create such an object with these two possibilities:
- With just a boolean to tell if the switches will be displayed one below the other (false) one or just one by one (true)
attSeq = new GPAttitudeSequence(false);
- Or with an additional parameter that corresponds to an absolute date which will be used as a reference date (for relative positioning of attitude laws).
AbsoluteDate date0 =
new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
attSeq = new GPAttitudeSequence(date0, false);
Display
Reference date
First, the user will have to select a reference date. There are two possibilities:
- “custom”: a specific date will be entered by the user
- “external”: in that case no modification of the date is available as it corresponds to the date initially defined (note that this date may be automatically updated if the initial orbit date is modified).
List of attitude laws
Then, a button appears that allows displaying a new window to define a set of available attitude laws. Each law is defined as below:
- Name of the law
- Type of the law (local orbital frame (LOF), inertial, sun pointing …)
- Law evolution (constant or spinned)
- Then data linked to the type of law. As an example for LOF attitude law, the user will have to select which LOF to take into account and eventually angle bias.
Sequence
At last, the user will get a choice between:
- A simple attitude sequence with only a single law chosen in the previous list (not available in V1.2.1 version)
- A more sophisticated definition of the attitude sequence using the PATRIUS “event switch” possibility. The user will have to define one or several switches defined by the following data:
- The attitude law before the event (taken in the previous list)
- The attitude law once the event occurred (taken in the previous list)
- The type of event and data related to it.
This “event switch” is a very powerful option that allows defining relatively shortly a whole mission. For example, if we want to define the fact that the vehicle is LVLH oriented in eclipse and Sun pointing out of eclipse, we will only have to define two switches calling to two attitude laws:
- Switch #1 with entering in eclipse as orbital event and law before "Sun pointing" and law after "LVLH"
- Switch #2 with exiting in eclipse as orbital event and law before "LVLH" and law after "Sun pointing"
How to use it
To get a [PATRIUS] AttitudeSequence object, we will just have to call for the getPatriusObject() method as below:
AttitudesSequence seq = attSeq.getPatriusObject();
How i is stored
Here is the XML format for a sequence:
<String name="dateMode">external</String>
<AbsoluteDate name="referenceDate">
<String name="date">01/01/2000 00h00m00s</String>
<String name="scale">UTC</String>
</AbsoluteDate>
<AbsoluteDate name="externalDate">
<String name="date">01/01/2010 00h00m00s</String>
<String name="scale">UTC</String>
</AbsoluteDate>
<AttitudeLawList name="lawList">
<ComponentList name="AttitudeLaw">
<!--Amount of items-->
<Integer name="nbItems">2</Integer>
<ComponentListItem name="Item_1">
<String name="lawName">LawName1</String>
<String name="lawType">LOF</String>
<LOFAttitudeLaw name="LOF_Att._Law:">
<String name="lawEvol">Constant</String>
<String name="LOF">LVLH</String>
<Frame name="Inertial">
<String name="name">GCRF</String>
</Frame>
<Boolean name="biasAngles">true</Boolean>
<Rotation name="Rotation:">
<String name="rotationOrder">ZYX Cardan angles</String>
<Real name="psi" unit="deg">1.8E2</Real>
<Real name="theta" unit="deg">0.0E0</Real>
<Real name="phi" unit="deg">0.0E0</Real>
</Rotation>
</LOFAttitudeLaw>
</ComponentListItem>
<ComponentListItem name="Item_2">
<String name="lawName">LawName2</String>
<String name="lawType">Inertial</String>
<InertialAttitudeLaw name="Inertial_Att._Law:">
<String name="lawEvol">Constant</String>
<Frame name="referenceFrame">
<String name="name">EME2000</String>
</Frame>
<Boolean name="biasAngles">false</Boolean>
</InertialAttitudeLaw>
</ComponentListItem>
</ComponentList>
</AttitudeLawList>
<SwitchingConditionList name="switchList">
<ComponentList name="AttitudeSequenceSwitch">
<!--Amount of items-->
<Integer name="nbItems">1</Integer>
<ComponentListItem name="Item_1">
<String name="Law_before">LawName1</String>
<String name="Law_after">LawName2</String>
<EventSelector name="event">
<String name="eventType">RELATIVE_DATE</String>
<RelativeDateDetector name="eventData">
<DateOffset name="relativeDate">0j00h02m00s</DateOffset>
<String name="actionData">RESET_STATE</String>
<Real name="maxCheck" unit="s">1.0E10</Real>
<Real name="threshold" unit="s">1.0E-9</Real>
</RelativeDateDetector>
</EventSelector>
</ComponentListItem>
</ComponentList>
</SwitchingConditionList>