Changed the nodes algoritms and fixed the argument of periapsis calculation

v1
Christiaan Goossens 8 years ago
parent 50dba493ff
commit 13044b2a25

@ -7,24 +7,14 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="17f368cb-44f8-4101-9a29-49a0f4ff1f92" name="Default" comment="Update workspace"> <list default="true" id="17f368cb-44f8-4101-9a29-49a0f4ff1f92" name="Default" comment="Update workspace">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ProcessingException.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/artifacts/simulator_jar/simulator.jar" afterPath="$PROJECT_DIR$/out/artifacts/simulator_jar/simulator.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Main.class" afterPath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Main.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Object.class" afterPath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Object.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Simulator.class" afterPath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/Simulator.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/SimulatorConfig.class" afterPath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/SimulatorConfig.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/dataWriter/DataWriter.class" afterPath="$PROJECT_DIR$/out/production/simulator/com/verictas/pos/simulator/dataWriter/DataWriter.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/artifacts/simulator_jar/run.bat" afterPath="$PROJECT_DIR$/out/artifacts/simulator_jar/run.bat" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" />
</list> </list>
<ignored path="simulator.iws" /> <ignored path="simulator.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -46,46 +36,51 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="SimulatorConfig.java" pinned="false" current-in-tab="false"> <file leaf-file-name="AOP.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272"> <state relative-caret-position="204">
<caret line="16" column="0" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> <caret line="12" column="52" selection-start-line="12" selection-start-column="52" selection-end-line="12" selection-end-column="52" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="ObjectProcessor.java" pinned="false" current-in-tab="true"> <file leaf-file-name="Simulator.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-105"> <state relative-caret-position="-3">
<caret line="78" column="41" selection-start-line="78" selection-start-column="41" selection-end-line="78" selection-end-column="41" /> <caret line="62" column="0" selection-start-line="62" selection-start-column="0" selection-end-line="62" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="method#processAphelionAndPerihelion#0;class#ObjectProcessor#0" expanded="false" /> <element signature="method#accelerate#0;class#Simulator#0" expanded="false" />
<element signature="method#processRoundCheck#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#reset#0;class#ObjectProcessor#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Main.java" pinned="false" current-in-tab="false"> <file leaf-file-name="ObjectProcessor.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="731"> <state relative-caret-position="-479">
<caret line="45" column="37" selection-start-line="45" selection-start-column="37" selection-end-line="45" selection-end-column="37" /> <caret line="9" column="31" selection-start-line="9" selection-start-column="31" selection-end-line="9" selection-end-column="31" />
<folding /> <folding>
<element signature="imports" expanded="true" />
<element signature="method#processAphelionAndPerihelion#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#calculateTops#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#processNodes#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#processRoundCheck#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#reset#0;class#ObjectProcessor#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Processor.java" pinned="false" current-in-tab="false"> <file leaf-file-name="Processor.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1972"> <state relative-caret-position="425">
<caret line="123" column="13" selection-start-line="123" selection-start-column="13" selection-end-line="123" selection-end-column="13" /> <caret line="102" column="64" selection-start-line="102" selection-start-column="64" selection-end-line="102" selection-end-column="64" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" /> <element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
@ -95,19 +90,6 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="DataWriter.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2006">
<caret line="145" column="35" selection-start-line="145" selection-start-column="35" selection-end-line="145" selection-end-column="35" />
<folding>
<element signature="method#write#0;class#DataWriter#0" expanded="false" />
<element signature="method#save#0;class#DataWriter#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
@ -147,14 +129,14 @@
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Processor.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Processor.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ProcessingException.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ProcessingException.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java" />
</list> </list>
</option> </option>
</component> </component>
@ -205,6 +187,7 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -295,13 +278,12 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="dataWriter" /> <option name="myItemId" value="mathUtils" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scratches" />
<pane id="Scope" /> <pane id="Scope" />
<pane id="PackagesPane" /> <pane id="PackagesPane" />
</panes> </panes>
@ -611,29 +593,29 @@
<layout> <layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2653277" sideWeight="0.49375" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3245243" sideWeight="0.415625" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30866808" sideWeight="0.42083332" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30866808" sideWeight="0.57916665" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17864583" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17864583" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39852008" sideWeight="0.49791667" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39852008" sideWeight="0.49791667" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2653277" sideWeight="0.49791667" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Documentation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="false" show_stripe_button="true" weight="0.48125" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" x="1312" y="663" width="586" height="345" /> <window_info id="Documentation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="false" show_stripe_button="true" weight="0.48125" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" x="1312" y="663" width="586" height="345" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3245243" sideWeight="0.584375" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
</component> </component>
<component name="Vcs.Log.UiProperties"> <component name="Vcs.Log.UiProperties">
@ -653,7 +635,7 @@
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
<option name="time" value="31" /> <option name="time" value="36" />
</breakpoint-manager> </breakpoint-manager>
<watches-manager /> <watches-manager />
</component> </component>
@ -662,7 +644,6 @@
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/nBabel.java" />
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2442"> <state relative-caret-position="2442">
@ -966,23 +947,24 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java"> <entry file="jar://$PROJECT_DIR$/vecmath-1.5.2.jar!/javax/vecmath/Tuple3d.class">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-116"> <state relative-caret-position="205">
<caret line="7" column="7" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" /> <caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/ObjectStore.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170"> <state relative-caret-position="85">
<caret line="10" column="47" selection-start-line="10" selection-start-column="47" selection-end-line="10" selection-end-column="47" /> <caret line="5" column="24" selection-start-line="5" selection-start-column="24" selection-end-line="5" selection-end-column="24" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="71"> <state relative-caret-position="164">
<caret line="146" column="7" selection-start-line="146" selection-start-column="7" selection-end-line="146" selection-end-column="7" /> <caret line="146" column="7" selection-start-line="146" selection-start-column="7" selection-end-line="146" selection-end-column="7" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
@ -1002,76 +984,90 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/vecmath-1.5.2.jar!/javax/vecmath/Tuple3d.class"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="205">
<caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="527"> <state relative-caret-position="577">
<caret line="45" column="20" selection-start-line="45" selection-start-column="20" selection-end-line="45" selection-end-column="21" /> <caret line="145" column="35" selection-start-line="145" selection-start-column="35" selection-end-line="145" selection-end-column="35" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="method#write#0;class#DataWriter#0" expanded="false" />
<element signature="method#accelerate#0;class#Simulator#0" expanded="false" /> <element signature="method#save#0;class#DataWriter#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2006"> <state relative-caret-position="408">
<caret line="145" column="35" selection-start-line="145" selection-start-column="35" selection-end-line="145" selection-end-column="35" /> <caret line="52" column="41" selection-start-line="52" selection-start-column="25" selection-end-line="52" selection-end-column="41" />
<folding> <folding>
<element signature="method#write#0;class#DataWriter#0" expanded="false" /> <element signature="e#1368#1369#0" expanded="true" />
<element signature="method#save#0;class#DataWriter#0" expanded="false" /> <element signature="e#1412#1413#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="731"> <state relative-caret-position="272">
<caret line="45" column="37" selection-start-line="45" selection-start-column="37" selection-end-line="45" selection-end-column="37" /> <caret line="39" column="94" selection-start-line="39" selection-start-column="94" selection-end-line="39" selection-end-column="94" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1972"> <state relative-caret-position="102">
<caret line="123" column="13" selection-start-line="123" selection-start-column="13" selection-end-line="123" selection-end-column="13" /> <caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding> <folding />
<element signature="imports" expanded="true" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
<element signature="method#close#0;class#Processor#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272"> <state relative-caret-position="204">
<caret line="16" column="0" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> <caret line="12" column="52" selection-start-line="12" selection-start-column="52" selection-end-line="12" selection-end-column="52" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ObjectProcessor.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-105"> <state relative-caret-position="-479">
<caret line="78" column="41" selection-start-line="78" selection-start-column="41" selection-end-line="78" selection-end-column="41" /> <caret line="9" column="31" selection-start-line="9" selection-start-column="31" selection-end-line="9" selection-end-column="31" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="method#processAphelionAndPerihelion#0;class#ObjectProcessor#0" expanded="false" /> <element signature="method#processAphelionAndPerihelion#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#calculateTops#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#processNodes#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#processRoundCheck#0;class#ObjectProcessor#0" expanded="false" /> <element signature="method#processRoundCheck#0;class#ObjectProcessor#0" expanded="false" />
<element signature="method#reset#0;class#ObjectProcessor#0" expanded="false" /> <element signature="method#reset#0;class#ObjectProcessor#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3">
<caret line="62" column="0" selection-start-line="62" selection-start-column="0" selection-end-line="62" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="method#accelerate#0;class#Simulator#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="425">
<caret line="102" column="64" selection-start-line="102" selection-start-column="64" selection-end-line="102" selection-end-column="64" />
<folding>
<element signature="imports" expanded="true" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
<element signature="method#close#0;class#Processor#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

@ -35,15 +35,18 @@ public class Main {
//Object moon = new Object("The Moon", 734.9E20, AU.convertToMeter(new Vector3d(1.002390058141768E+00,-1.318677081380600E-01,-1.051759034600983E-04)), AU.convertToMetersPerSecond(new Vector3d(2.294349896503608E-03,1.752303034437222E-02,-5.522655228080146E-05))); //Object moon = new Object("The Moon", 734.9E20, AU.convertToMeter(new Vector3d(1.002390058141768E+00,-1.318677081380600E-01,-1.051759034600983E-04)), AU.convertToMetersPerSecond(new Vector3d(2.294349896503608E-03,1.752303034437222E-02,-5.522655228080146E-05)));
// 1 januari startdag // 1 januari startdag
Object sun = new Object("Sun", 1.988544E30, AU.convertToMeter(new Vector3d(3.737881713150281E-03,1.402397586692506E-03,-1.612700291840256E-04)), AU.convertToMetersPerSecond(new Vector3d(8.619338996535534E-07,6.895607793642275E-06,-2.794074909231784E-08))); Object sun = new Object("Sun", 1.988544E30, AU.convertToMeter(new Vector3d(3.737881713150281E-03,1.402397586692506E-03,-1.612700291840256E-04)), AU.convertToMetersPerSecond(new Vector3d(8.619338996535534E-07,6.895607793642275E-06,-2.794074909231784E-08)));
Object earth = new Object("Earth", 5.97219E24, AU.convertToMeter(new Vector3d(-1.630229002588497E-01,9.704723344534316E-01,-1.955367328932975E-04)), AU.convertToMetersPerSecond(new Vector3d(-1.723383356491747E-02,-2.969134550063944E-03,-4.433758674928828E-07))); Object earth = new Object("Earth", 5.97219E24, AU.convertToMeter(new Vector3d(-1.630229002588497E-01,9.704723344534316E-01,-1.955367328932975E-04)), AU.convertToMetersPerSecond(new Vector3d(-1.723383356491747E-02,-2.969134550063944E-03,-4.433758674928828E-07)));
Object moon = new Object("The Moon", 734.9E20, AU.convertToMeter(new Vector3d(-1.657103868749121E-01,9.706382026425473E-01,-1.879812512691582E-04)), AU.convertToMetersPerSecond(new Vector3d(-1.728100931961937E-02,-3.525371122447976E-03,4.909148618073602E-05))); Object moon = new Object("The Moon", 734.9E20, AU.convertToMeter(new Vector3d(-1.657103868749121E-01,9.706382026425473E-01,-1.879812512691582E-04)), AU.convertToMetersPerSecond(new Vector3d(-1.728100931961937E-02,-3.525371122447976E-03,4.909148618073602E-05)));
Object jupiter = new Object("Jupiter", 1898.13E24, AU.convertToMeter(new Vector3d(-5.172279968303672E+00,1.591564562098799E+00,1.090553487095606E-01)), AU.convertToMetersPerSecond(new Vector3d(-2.306423668033420E-03,-6.856869314900905E-03,8.012916249248967E-05)));
Object saturn = new Object("Saturn", 5.68319E26, AU.convertToMeter(new Vector3d(-3.710637850378867E+00,-9.289569433157130E+00,3.091990731378936E-01)), AU.convertToMetersPerSecond(new Vector3d(4.874750391005278E-03,-2.086615906689840E-03,-1.574898601194673E-04)));
Object venus = new Object("Venus", 48.685E23, AU.convertToMeter(new Vector3d(-7.130901319004951E-01,-5.719763212192740E-02,4.040076577877051E-02)), AU.convertToMetersPerSecond(new Vector3d(1.525993024372452E-03,-2.024175581604569E-02,-3.656582385749146E-04)));
/** /**
* Object listing * Object listing
*/ */
Object[] objects = {sun, earth, moon}; Object[] objects = {sun, earth, moon, jupiter, saturn};
/** /**

@ -64,7 +64,7 @@ public class Simulator {
/** /**
* Do the processing on the objects * Do the processing on the objects
*/ */
processor.process(objects); processor.process(objects, t + 1);
/** /**
* The round has ended * The round has ended

@ -5,8 +5,8 @@ public class SimulatorConfig {
* Time settings * Time settings
*/ */
public static int rounds = 526100 * 35 * 60; // Amount of rounds to run the simulator for public static int rounds = 526100 * 10; // Amount of rounds to run the simulator for
public static double time = 1; // Time steps in seconds public static double time = 60; // Time steps in seconds
/** /**
* Object settings * Object settings
@ -19,8 +19,8 @@ public class SimulatorConfig {
* Ascending & descending node detection * Ascending & descending node detection
*/ */
public static double z = -22439680.6; // Reference z height for the used system in meters //public static double z = -22439680.6; // Reference z height for the used system in meters
public static double zThreshold = 100; // Threshold value to specify the maximum value (in meters) the z difference can be to be considered close to the reference plane (To eliminate all bending points that are to far away from the z-axis to count as nodes) //public static double zThreshold = 1000; // Threshold value to specify the maximum value (in meters) the z difference can be to be considered close to the reference plane (To eliminate all bending points that are to far away from the z-axis to count as nodes)
/** /**
* Output preferences * Output preferences
@ -28,6 +28,6 @@ public class SimulatorConfig {
public static String outputUnit = "AU"; // Preferred output unit preference (AU => AU/day, m => m/s) public static String outputUnit = "AU"; // Preferred output unit preference (AU => AU/day, m => m/s)
public static int outputNumbers = 0; // Preferred way of outputting numbers: (0 => comma for decimals, dot in large numbers OR 1 => comma for large numbers, dot with decimals) public static int outputNumbers = 0; // Preferred way of outputting numbers: (0 => comma for decimals, dot in large numbers OR 1 => comma for large numbers, dot with decimals)
public static int skipLines = 2629743; // Set the skipLines integer to skip lines (for example: every 5th line is written) in the output file (for smaller files), if this is set to 1, it has no effect and all lines will be written. public static int skipLines = 1440; // Set the skipLines integer to skip lines (for example: every 5th line is written) in the output file (for smaller files), if this is set to 1, it has no effect and all lines will be written.
public static boolean skipUnnecessary = true; // Skip the unnecessary objects in the export public static boolean skipUnnecessary = true; // Skip the unnecessary objects in the export
} }

@ -9,6 +9,11 @@ public class AOP {
public static double calculate(Vector3d ascendingNode, Vector3d perihelion, Vector3d aphelion) { public static double calculate(Vector3d ascendingNode, Vector3d perihelion, Vector3d aphelion) {
Vector3d eccentricity = new Vector3d(0,0,0); Vector3d eccentricity = new Vector3d(0,0,0);
eccentricity.sub(perihelion, aphelion); eccentricity.sub(perihelion, aphelion);
return ascendingNode.angle(eccentricity);
if (perihelion.getY() > ascendingNode.getY()) {
return ascendingNode.angle(eccentricity);
} else {
return (2 * Math.PI) - ascendingNode.angle(eccentricity);
}
} }
} }

@ -50,6 +50,10 @@ public class AU {
return output; return output;
} }
public static double convertFromMeter(double input) {
return input * 6.6845871E-12;
}
/** /**
* Converts m/s to AU/day for data collection * Converts m/s to AU/day for data collection
* @param input Vector3d with values in m/s * @param input Vector3d with values in m/s

@ -1,10 +1,9 @@
package com.verictas.pos.simulator.processor; package com.verictas.pos.simulator.processor;
import com.verictas.pos.simulator.Object; import com.verictas.pos.simulator.Object;
import com.verictas.pos.simulator.SimulatorConfig;
import com.verictas.pos.simulator.mathUtils.AU;
import javax.vecmath.Vector3d; import javax.vecmath.Vector3d;
import java.util.HashMap;
import java.util.Map;
public class ObjectProcessor { public class ObjectProcessor {
public Vector3d aphelion; public Vector3d aphelion;
@ -22,9 +21,12 @@ public class ObjectProcessor {
public Vector3d ascendingNode; public Vector3d ascendingNode;
public Vector3d descendingNode; public Vector3d descendingNode;
public double zAxisDistance = -1; public Vector3d absoluteMax;
public double pastzAxisDistance = -1; public Vector3d absoluteMin;
public Vector3d lastPos;
public double referenceZ;
public HashMap<Integer, Vector3d[]> history = new HashMap<>();
public void setStartingPosition(Vector3d position) { public void setStartingPosition(Vector3d position) {
this.startingPosition = position; this.startingPosition = position;
@ -38,6 +40,14 @@ public class ObjectProcessor {
this.referenceObject = object; this.referenceObject = object;
} }
/**
* Keep an history of the object position and speed (for logging and further processing)
*/
public void processHistory(int round) {
this.history.put(round, new Vector3d[] {this.thisObject.position, this.thisObject.speed});
}
/** /**
* Processes the aphelion & perihelion * Processes the aphelion & perihelion
*/ */
@ -71,57 +81,67 @@ public class ObjectProcessor {
} }
} }
/** /**
* Get the ascending node * Get the absolute maximum and minimum positions (max z and min z)
*/ */
public void processNodes() { public void calculateTops() {
double zAxisDistance = Math.abs(this.thisObject.position.getZ() - SimulatorConfig.z); if (this.absoluteMax == null) {
this.absoluteMax = this.thisObject.position;
}
if (this.pastzAxisDistance == -1) { if (this.absoluteMin == null) {
this.pastzAxisDistance = zAxisDistance; this.absoluteMin = this.thisObject.position;
} }
if (this.pastzAxisDistance != -1 && this.zAxisDistance == -1) { if (this.thisObject.position.getZ() > this.absoluteMax.getZ()) {
this.zAxisDistance = zAxisDistance; this.absoluteMax = this.thisObject.position;
} }
if (this.zAxisDistance != -1 && this.pastzAxisDistance != 1) { if (this.thisObject.position.getZ() < this.absoluteMin.getZ()) {
if ((this.pastzAxisDistance > this.zAxisDistance && zAxisDistance > this.zAxisDistance) && (this.zAxisDistance < SimulatorConfig.zThreshold)) { this.absoluteMin = this.thisObject.position;
if (SimulatorConfig.outputUnit.equals("AU")) { }
System.out.println("INFO:: Found a node within the threshold at " + AU.convertFromMeter(this.lastPos) + " (in AU) for object " + this.thisObject.name + "!"); }
} else { /**
System.out.println("INFO:: Found a node within the threshold at " + this.lastPos + " (in m) for object " + this.thisObject.name + "!"); * Process the nodes
} */
if ((this.lastPos.getZ() - this.thisObject.position.getZ()) < 0) { public void processNodes() {
if (SimulatorConfig.z < 0) { this.referenceZ = (this.absoluteMin.getZ() + this.absoluteMax.getZ()) / 2;
// The reference plane is in negative z, so you have gone up!
this.ascendingNode = this.lastPos; // Loop through the entire history
System.out.println("INFO:: Detected node as: ASCENDING NODE!"); for (Map.Entry<Integer, Vector3d[]> entry : this.history.entrySet()) {
Integer round = entry.getKey();
Vector3d[] vectorArray = entry.getValue();
if (this.history.get(round + 1) != null) {
// There is a next key!
if (vectorArray[0].getZ() < referenceZ && this.history.get(round + 1)[0].getZ() > referenceZ) {
// This point is below the reference height and the next is above. This point is the ascending node (with positive z)
if (referenceZ <= 0) {
// Descending
this.descendingNode = vectorArray[0];
System.out.println("INFO:: Found a descending node at round " + round + " at position: " + vectorArray[0]);
} else { } else {
// The reference plane is in positive z, so you have gone down! // Ascending
this.descendingNode = this.lastPos; this.ascendingNode = vectorArray[0];
System.out.println("INFO:: Detected node as: DESCENDING NODE!"); System.out.println("INFO:: Found a ascending node at round " + round + " at position: " + vectorArray[0]);
} }
} else { } else if (vectorArray[0].getZ() > referenceZ && this.history.get(round + 1)[0].getZ() < referenceZ) {
if (SimulatorConfig.z < 0) { // This point is above the reference height and the next is below. This point is the descending node (with positive z)
// The reference plane is in negative z, so you have gone down! if (referenceZ <= 0) {
this.descendingNode = this.lastPos; // Ascending
System.out.println("INFO:: Detected node as: DESCENDING NODE!"); this.ascendingNode = vectorArray[0];
System.out.println("INFO:: Found a ascending node at round " + round + " at position: " + vectorArray[0]);
} else { } else {
// The reference plane is in positive z, so you have gone up! // Descending
this.ascendingNode = this.lastPos; this.descendingNode = vectorArray[0];
System.out.println("INFO:: Detected node as: ASCENDING NODE!"); System.out.println("INFO:: Found a descending node at round " + round + " at position: " + vectorArray[0]);
} }
} }
} }
this.pastzAxisDistance = this.zAxisDistance;
this.zAxisDistance = zAxisDistance;
} }
this.lastPos = this.thisObject.position;
} }
/** /**
@ -178,7 +198,9 @@ public class ObjectProcessor {
perihelion = null; perihelion = null;
ascendingNode = null; ascendingNode = null;
descendingNode = null; descendingNode = null;
zAxisDistance = -1; history = new HashMap<>();
lastPos = null; absoluteMax = null;
absoluteMin = null;
referenceZ = -1;
} }
} }

@ -37,7 +37,7 @@ public class Processor {
} }
} }
public void process(Object[] objectArray) throws ProcessingException, WritingException { public void process(Object[] objectArray, int rounds) throws ProcessingException, WritingException {
HashMap<String, Object> objects = objectArrayToHashMap(objectArray); HashMap<String, Object> objects = objectArrayToHashMap(objectArray);
/** /**
@ -48,54 +48,68 @@ public class Processor {
object.setObjectData(objects.get(objectName)); object.setObjectData(objects.get(objectName));
object.setReferenceObjectData(objects.get(SimulatorConfig.sunName)); object.setReferenceObjectData(objects.get(SimulatorConfig.sunName));
object.processHistory(rounds);
// Check if the object has gone round last round // Check if the object has gone round last round
boolean round = object.processRoundCheck(); boolean round = object.processRoundCheck();
if (round) { if (round) {
// Object has gone full circle last round! // Process the nodes
System.out.println("\n\n============== ROTATION DATA: " + objectName.toUpperCase() + " ============="); object.processNodes();
System.out.println("Current position (AU): " + AU.convertFromMeter(objects.get(objectName).position));
System.out.println("Current position (m): " + objects.get(objectName).position + "\n"); // ECHO:: Object has gone full circle last round!
System.out.println("\n\n============== ROTATION DATA: " + objectName.toUpperCase() + ", ROUND " + (rounds - 1) + " =============");
if (SimulatorConfig.outputUnit == "AU") {
System.out.println("Current position (AU): " + AU.convertFromMeter(objects.get(objectName).position) + "\n");
System.out.println("Highest point (z-axis graph) (AU): " + AU.convertFromMeter(object.absoluteMax));
System.out.println("Lowest point (z-axis graph) (AU): " + AU.convertFromMeter(object.absoluteMin));
System.out.println("Calculated reference height (AU) : " + AU.convertFromMeter(object.referenceZ) + "\n");
if (object.ascendingNode != null) {
System.out.println("Ascending node (AU): " + AU.convertFromMeter(object.ascendingNode));
} else {
System.out.println("WARNING:: Ascending node not found.");
}
if (object.ascendingNode != null) {
System.out.println("Ascending node (AU): " + AU.convertFromMeter(object.ascendingNode));
System.out.println("Ascending node (m): " + object.ascendingNode + "\n");
} else {
if (object.descendingNode != null) { if (object.descendingNode != null) {
System.out.println("WARNING:: Ascending node not found. Because a descending node was found, you can assume the current position is the ascending node (or it is between the starting position and the current.\n"); System.out.println("Descending node (AU): " + AU.convertFromMeter(object.descendingNode) + "\n");
} else { } else {
System.out.println("WARNING:: Ascending node not found. Have you set the reference plane height correctly?\n"); System.out.println("WARNING:: Descending node not found.\n");
} }
}
if (object.descendingNode != null) { System.out.println("Position during apastron (AU): " + AU.convertFromMeter(object.aphelion));
System.out.println("Descending node (AU): " + AU.convertFromMeter(object.descendingNode)); System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during apastron in km: " + object.aphelionDistance / 1000 + "\n");
System.out.println("Descending node (m): " + object.descendingNode + "\n"); System.out.println("Position during periastron (AU): " + AU.convertFromMeter(object.perihelion));
System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during periastron in km: " + object.perihelionDistance / 1000 + "\n");
} else { } else {
System.out.println("Current position (m): " + objects.get(objectName).position + "\n");
System.out.println("Highest point (z-axis graph) (m): " + object.absoluteMax);
System.out.println("Lowest point (z-axis graph) (m): " + object.absoluteMin);
System.out.println("Calculated reference height (m) : " + object.referenceZ + "\n");
if (object.ascendingNode != null) { if (object.ascendingNode != null) {
System.out.println("WARNING:: Descending node not found. Because a ascending node was found, you can assume the current position is the descending node (or it is between the starting position and the current).\n"); System.out.println("Ascending node (m): " + object.ascendingNode);
} else { } else {
System.out.println("WARNING:: Descending node not found. Have you set the reference plane height correctly?\n"); System.out.println("WARNING:: Ascending node not found.");
} }
}
System.out.println("Position during apastron (AU): " + AU.convertFromMeter(object.aphelion)); if (object.descendingNode != null) {
System.out.println("Position during apastron (m): " + object.aphelion); System.out.println("Descending node (m): " + object.descendingNode + "\n");
System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during apastron in m: " + object.aphelionDistance + "\n"); } else {
System.out.println("Position during periastron (AU): " + AU.convertFromMeter(object.perihelion)); System.out.println("WARNING:: Descending node not found.\n");
System.out.println("Position during periastron (m): " + object.perihelion); }
System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during periastron in m: " + object.perihelionDistance + "\n");
System.out.println("Position during apastron (m): " + object.aphelion);
System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during apastron in km: " + object.aphelionDistance / 1000 + "\n");
System.out.println("Position during periastron (m): " + object.perihelion);
System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during periastron in km: " + object.perihelionDistance / 1000 + "\n");
}
if (object.ascendingNode != null) { if (object.ascendingNode != null) {
System.out.println("Argument of periapsis (range: 0 - PI): " + AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion) + " rad"); System.out.println("Argument of periapsis (radians): " + AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion));
System.out.println("Argument of periapsis: " + Math.toDegrees(AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion)) + " degrees"); System.out.println("Argument of periapsis (degrees): " + Math.toDegrees(AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion)));
} else { } else {
if (object.descendingNode != null) {
System.out.println("WARNING:: Ascending node not found. The argument is calculated with the current position as ascending node).\n");
System.out.println("Argument of periapsis (range: 0 - PI): " + AOP.calculate(objects.get(objectName).position, object.perihelion, object.aphelion) + " rad");
System.out.println("Argument of periapsis: " + Math.toDegrees(AOP.calculate(objects.get(objectName).position, object.perihelion, object.aphelion)) + " degrees");
}
System.out.println("ERROR:: Can't calculate the argument of periapsis because the ascending node is missing."); System.out.println("ERROR:: Can't calculate the argument of periapsis because the ascending node is missing.");
} }
@ -109,7 +123,7 @@ public class Processor {
// Process values for this round // Process values for this round
object.processAphelionAndPerihelion(); object.processAphelionAndPerihelion();
object.processNodes(); object.calculateTops();
this.objects.put(objectName, object); this.objects.put(objectName, object);
} }

Loading…
Cancel
Save