1
0
mirror of https://github.com/christiaangoossens/Planetary-Orbit-Simulator synced 2024-11-22 19:24:10 +00:00

Added logging system from v2 to v1

This commit is contained in:
Christiaan Goossens 2016-12-20 14:03:38 +01:00
parent 3aa8a67205
commit a8f32776b4
7 changed files with 269 additions and 146 deletions

View File

@ -7,7 +7,11 @@
</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="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<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/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/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" />
@ -28,7 +32,71 @@
<favorites_list name="simulator" /> <favorites_list name="simulator" />
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" /> <leaf>
<file leaf-file-name="AOPDataWriter.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/AOPDataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="DataWriter.java" pinned="false" current-in-tab="true">
<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="390">
<caret line="48" column="15" selection-start-line="48" selection-start-column="15" selection-end-line="48" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="PosDataWriter.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/PosDataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Processor.java" pinned="false" current-in-tab="false">
<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="222">
<caret line="142" column="13" selection-start-line="142" selection-start-column="13" selection-end-line="142" selection-end-column="13" />
<folding>
<element signature="method#writePos#0;class#Processor#0" expanded="false" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SimulatorConfig.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="404">
<caret line="48" column="43" selection-start-line="48" selection-start-column="43" selection-end-line="48" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Main.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="21" column="34" selection-start-line="21" selection-start-column="34" selection-end-line="21" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
@ -67,23 +135,23 @@
<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/dataWriter/DataWriter.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Node.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Node.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/processor/Processor.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AOP.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/Processor.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.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/dataWriter/DataWriter.java" />
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="-1928" /> <option name="x" value="-9" />
<option name="y" value="-8" /> <option name="y" value="-9" />
<option name="width" value="1936" /> <option name="width" value="1938" />
<option name="height" value="1056" /> <option name="height" value="1051" />
</component> </component>
<component name="ProjectInspectionProfilesVisibleTreeState"> <component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default"> <entry key="Project Default">
@ -126,6 +194,9 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -244,9 +315,6 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
<pane id="Scratches" />
<pane id="PackagesPane" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@ -558,16 +626,18 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-1928" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-9" y="-9" width="1938" height="1051" extended-state="7" />
<editor active="false" /> <editor active="true" />
<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.26451612" sideWeight="0.48333332" 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.36997885" sideWeight="0.3609375" 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.36989248" sideWeight="0.36614582" 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.36989248" sideWeight="0.63385415" 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" />
@ -576,18 +646,16 @@
<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="Nl-Palette" 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="Nl-Palette" 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="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="Properties" 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="Properties" 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="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.26451612" sideWeight="0.48333332" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" 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="Image Layers" 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="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="true" show_stripe_button="true" weight="0.36997885" sideWeight="0.6390625" 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" /> <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="Theme Preview" 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="Theme Preview" 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" />
</layout> </layout>
@ -618,21 +686,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/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" 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">
<state relative-caret-position="66">
<caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
<folding />
</state>
</provider>
</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="836"> <state relative-caret-position="836">
@ -896,14 +949,7 @@
</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">
<state relative-caret-position="187">
<caret line="19" column="35" selection-start-line="19" selection-start-column="35" selection-end-line="23" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ProcessingException.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/processor/ProcessingException.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119"> <state relative-caret-position="119">
@ -912,25 +958,6 @@
</state> </state>
</provider> </provider>
</entry> </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="1989">
<caret line="126" column="5" selection-start-line="126" selection-start-column="5" selection-end-line="126" selection-end-column="5" />
<folding>
<element signature="method#write#0;class#Processor#0" expanded="false" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<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="441">
<caret line="137" column="65" selection-start-line="137" selection-start-column="20" selection-end-line="137" selection-end-column="65" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34"> <state relative-caret-position="34">
@ -939,14 +966,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="27" column="70" selection-start-line="27" selection-start-column="70" selection-end-line="27" selection-end-column="70" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Node.java"> <entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Node.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119"> <state relative-caret-position="119">
@ -984,10 +1003,53 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/PosDataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
<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="222">
<caret line="142" column="13" selection-start-line="142" selection-start-column="13" selection-end-line="142" selection-end-column="13" />
<folding>
<element signature="method#writePos#0;class#Processor#0" expanded="false" />
<element signature="method#objectArrayToHashMap#0;class#Processor#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/SimulatorConfig.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="-75"> <state relative-caret-position="404">
<caret line="19" column="28" selection-start-line="19" selection-start-column="28" selection-end-line="19" selection-end-column="28" /> <caret line="48" column="43" selection-start-line="48" selection-start-column="43" selection-end-line="48" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="21" column="34" selection-start-line="21" selection-start-column="34" selection-end-line="21" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/AOPDataWriter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<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="390">
<caret line="48" column="15" selection-start-line="48" selection-start-column="15" selection-end-line="48" selection-end-column="15" />
<folding /> <folding />
</state> </state>
</provider> </provider>

View File

@ -19,6 +19,8 @@ public class Main {
* The full license is included in the git repository as LICENSE.md * The full license is included in the git repository as LICENSE.md
*/ */
public static int version = 1;
public static void main(String[] args) { public static void main(String[] args) {
/** /**
* Object definitions * Object definitions

View File

@ -23,7 +23,7 @@ public class SimulatorConfig {
* Time settings * Time settings
*/ */
public static int rounds = 1051896*500; // Amount of rounds to run the simulator for // 3000000 = 250.000 jaar public static int rounds = 1051896*50; // Amount of rounds to run the simulator for // 3000000 = 250.000 jaar
public static double time = 30; // Time steps in seconds // 2592000 = 1 month public static double time = 30; // Time steps in seconds // 2592000 = 1 month
/** /**

View File

@ -0,0 +1,35 @@
package com.verictas.pos.simulator.dataWriter;
import java.util.*;
public class AOPDataWriter extends DataWriter {
public AOPDataWriter() throws WritingException {
super("arguments");
try {
/**
* Write the lines with information about the columns
*/
this.writer.write("OBJECT" + DELIMITER + "ROUND" + DELIMITER + "ARGUMENT (RAD)" + NEW_LINE);
this.counter++;
} catch (Exception e) {
e.printStackTrace();
throw new WritingException("An error occurred while writing to the file!");
}
}
public void write(String object, TreeMap<Integer, Double> arguments) throws WritingException {
try {
for (Map.Entry<Integer, Double> entry : arguments.entrySet()) {
Integer key = entry.getKey();
Double value = entry.getValue();
this.writer.append(object + DELIMITER + key + DELIMITER + decimalFormatter(value) + NEW_LINE);
this.counter++;
}
} catch (Exception e) {
e.printStackTrace();
throw new WritingException("An error occurred while writing to the file!");
}
}
}

View File

@ -1,30 +1,24 @@
package com.verictas.pos.simulator.dataWriter; package com.verictas.pos.simulator.dataWriter;
import com.verictas.pos.simulator.Object; import com.verictas.pos.simulator.Main;
import com.verictas.pos.simulator.Simulator;
import com.verictas.pos.simulator.SimulatorConfig; import com.verictas.pos.simulator.SimulatorConfig;
import com.verictas.pos.simulator.mathUtils.AU;
import com.verictas.pos.simulator.processor.ObjectProcessor;
import javax.vecmath.Vector3d;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.math.RoundingMode;
import java.text.*; import java.text.*;
import java.util.Date; import java.util.Date;
import java.util.Locale;
public class DataWriter { public class DataWriter {
private FileWriter writer = null; protected FileWriter writer = null;
/** /**
* Set global variables, such as the delimiter and the new line character * Set global variables, such as the delimiter and the new line character
*/ */
private static final String DELIMITER = "\t"; protected static final String DELIMITER = "\t";
private static final String NEW_LINE = "\n"; protected static final String NEW_LINE = "\n";
private int counter = 0; protected int counter = 0;
/** /**
* Decimal formatter * Decimal formatter
@ -36,7 +30,7 @@ public class DataWriter {
* Constructor * Constructor
* @throws WritingException * @throws WritingException
*/ */
public DataWriter() throws WritingException { public DataWriter(String filenameAppendix) throws WritingException {
/** /**
* Prepare the locale * Prepare the locale
@ -49,7 +43,7 @@ public class DataWriter {
String directory = System.getProperty("user.home") + File.separator + "simulatorExports"; String directory = System.getProperty("user.home") + File.separator + "simulatorExports";
File directoryPath = new File(directory); File directoryPath = new File(directory);
String path = directory + File.separator + getCurrentTimeStamp() + ".txt"; String path = directory + File.separator + "v" + Main.version + "-" + getCurrentTimeStamp() + "-" + filenameAppendix + ".txt";
System.out.println("WRITING DATA TO: " + path); System.out.println("WRITING DATA TO: " + path);
/** /**
@ -64,18 +58,6 @@ public class DataWriter {
*/ */
this.writer = new FileWriter(path); this.writer = new FileWriter(path);
/**
* Write the lines with information about the columns
*/
if (SimulatorConfig.outputUnit.equals("AU")) {
this.writer.write("Object" + DELIMITER + "X (AU)" + DELIMITER + "Y (AU)" + DELIMITER + "Z (AU)" + DELIMITER + "VX (AU/day)" + DELIMITER + "VY (AU/day)" + DELIMITER + "VZ (AU/day)" + NEW_LINE);
} else {
this.writer.write("Object" + DELIMITER + "X (m)" + DELIMITER + "Y (m)" + DELIMITER + "Z (m)" + DELIMITER + "VX (m/s)" + DELIMITER + "VY (m/s)" + DELIMITER + "VZ (m/s)" + NEW_LINE);
}
this.counter++;
/** /**
* Configure the decimal formatter * Configure the decimal formatter
*/ */
@ -118,39 +100,7 @@ public class DataWriter {
} }
} }
/** protected String decimalFormatter(double input) {
*
* @param object The object you want to write data about
* @param reference The system's star
* @throws WritingException
*/
public void write(Object object, Object reference) throws WritingException {
String id = object.name;
Vector3d position = object.position;
Vector3d speed = object.speed;
Vector3d AUposition = AU.convertFromMeter(position);
Vector3d AUspeed = AU.convertFromMetersPerSecond(speed);
if (this.writer == null) {
throw new WritingException("The writer isn't defined yet");
} else {
try {
if (this.counter % SimulatorConfig.skipLines == 0) {
if (SimulatorConfig.outputUnit.equals("AU")) {
this.writer.append(id + DELIMITER + decimalFormatter(AUposition.getX()) + DELIMITER + decimalFormatter(AUposition.getY()) + DELIMITER + decimalFormatter(AUposition.getZ()) + DELIMITER + decimalFormatter(AUspeed.getX()) + DELIMITER + decimalFormatter(AUspeed.getY()) + DELIMITER + decimalFormatter(AUspeed.getZ()) + NEW_LINE);
} else {
this.writer.append(id + DELIMITER + decimalFormatter(position.getX()) + DELIMITER + decimalFormatter(position.getY()) + DELIMITER + decimalFormatter(position.getZ()) + DELIMITER + decimalFormatter(speed.getX()) + DELIMITER + decimalFormatter(speed.getY()) + DELIMITER + decimalFormatter(speed.getZ()) + NEW_LINE);
}
}
this.counter++;
} catch (Exception e) {
e.printStackTrace();
throw new WritingException("An error occurred while writing to the file!");
}
}
}
private String decimalFormatter(double input) {
return this.formatter.format(input); return this.formatter.format(input);
} }

View File

@ -0,0 +1,61 @@
package com.verictas.pos.simulator.dataWriter;
import com.verictas.pos.simulator.Object;
import com.verictas.pos.simulator.SimulatorConfig;
import com.verictas.pos.simulator.mathUtils.AU;
import javax.vecmath.Vector3d;
public class PosDataWriter extends DataWriter {
public PosDataWriter() throws WritingException {
super("position");
try {
/**
* Write the lines with information about the columns
*/
if (SimulatorConfig.outputUnit.equals("AU")) {
this.writer.write("Object" + DELIMITER + "X (AU)" + DELIMITER + "Y (AU)" + DELIMITER + "Z (AU)" + DELIMITER + "VX (AU/day)" + DELIMITER + "VY (AU/day)" + DELIMITER + "VZ (AU/day)" + NEW_LINE);
} else {
this.writer.write("Object" + DELIMITER + "X (m)" + DELIMITER + "Y (m)" + DELIMITER + "Z (m)" + DELIMITER + "VX (m/s)" + DELIMITER + "VY (m/s)" + DELIMITER + "VZ (m/s)" + NEW_LINE);
}
this.counter++;
} catch (Exception e) {
e.printStackTrace();
throw new WritingException("An error occurred while writing to the file!");
}
}
/**
*
* @param object The object you want to write data about
* @throws WritingException
*/
public void write(Object object) throws WritingException {
String id = object.name;
Vector3d position = object.position;
Vector3d speed = object.speed;
Vector3d AUposition = AU.convertFromMeter(position);
Vector3d AUspeed = AU.convertFromMetersPerSecond(speed);
if (this.writer == null) {
throw new WritingException("The writer isn't defined yet");
} else {
try {
if (this.counter % SimulatorConfig.skipLines == 0) {
if (SimulatorConfig.outputUnit.equals("AU")) {
this.writer.append(id + DELIMITER + decimalFormatter(AUposition.getX()) + DELIMITER + decimalFormatter(AUposition.getY()) + DELIMITER + decimalFormatter(AUposition.getZ()) + DELIMITER + decimalFormatter(AUspeed.getX()) + DELIMITER + decimalFormatter(AUspeed.getY()) + DELIMITER + decimalFormatter(AUspeed.getZ()) + NEW_LINE);
} else {
this.writer.append(id + DELIMITER + decimalFormatter(position.getX()) + DELIMITER + decimalFormatter(position.getY()) + DELIMITER + decimalFormatter(position.getZ()) + DELIMITER + decimalFormatter(speed.getX()) + DELIMITER + decimalFormatter(speed.getY()) + DELIMITER + decimalFormatter(speed.getZ()) + NEW_LINE);
}
}
this.counter++;
} catch (Exception e) {
e.printStackTrace();
throw new WritingException("An error occurred while writing to the file!");
}
}
}
}

View File

@ -3,25 +3,30 @@ package com.verictas.pos.simulator.processor;
import com.verictas.pos.simulator.Object; import com.verictas.pos.simulator.Object;
import com.verictas.pos.simulator.Simulator; import com.verictas.pos.simulator.Simulator;
import com.verictas.pos.simulator.SimulatorConfig; import com.verictas.pos.simulator.SimulatorConfig;
import com.verictas.pos.simulator.dataWriter.AOPDataWriter;
import com.verictas.pos.simulator.dataWriter.DataWriter; import com.verictas.pos.simulator.dataWriter.DataWriter;
import com.verictas.pos.simulator.dataWriter.PosDataWriter;
import com.verictas.pos.simulator.dataWriter.WritingException; import com.verictas.pos.simulator.dataWriter.WritingException;
import com.verictas.pos.simulator.mathUtils.AOP; import com.verictas.pos.simulator.mathUtils.AOP;
import com.verictas.pos.simulator.mathUtils.AU; import com.verictas.pos.simulator.mathUtils.AU;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.TreeMap;
public class Processor { public class Processor {
private DataWriter writer; private PosDataWriter writer;
private AOPDataWriter aopWriter;
public HashMap<String, Object> initialObjectValues = new HashMap<>(); public HashMap<String, Object> initialObjectValues = new HashMap<>();
public HashMap<String, ObjectProcessor> objects = new HashMap<>(); public HashMap<String, ObjectProcessor> objects = new HashMap<>();
public HashMap<String, ArrayList<Double>> arguments = new HashMap<>(); public HashMap<String, TreeMap<Integer, Double>> arguments = new HashMap<>();
public Processor(Object[] objects) throws ProcessingException, WritingException { public Processor(Object[] objects) throws ProcessingException, WritingException {
/** /**
* Initialize DataWriter * Initialize DataWriter
*/ */
this.writer = new DataWriter(); this.writer = new PosDataWriter();
this.aopWriter = new AOPDataWriter();
/** /**
* Store the initial values of all the objects in memory (and to a file) for later use * Store the initial values of all the objects in memory (and to a file) for later use
@ -29,7 +34,7 @@ public class Processor {
this.initialObjectValues = objectArrayToHashMap(objects); this.initialObjectValues = objectArrayToHashMap(objects);
// Write initial values to file // Write initial values to file
this.write(initialObjectValues); this.writePos(initialObjectValues);
/** /**
* Create the object processing array * Create the object processing array
@ -117,11 +122,12 @@ public class Processor {
// Add the node to the list // Add the node to the list
if (arguments.get(objectName) == null) { if (arguments.get(objectName) == null) {
// If not defined // If not defined
ArrayList<Double> agmnts = new ArrayList<>(); TreeMap<Integer, Double> agmnts = new TreeMap<>();
arguments.put(objectName, agmnts); arguments.put(objectName, agmnts);
} }
arguments.get(objectName).add(AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion));
arguments.get(objectName).put(Simulator.round, AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion));
} }
} else { } else {
@ -143,17 +149,17 @@ public class Processor {
this.objects.put(objectName, object); this.objects.put(objectName, object);
} }
this.write(objects); this.writePos(objects);
} }
private void write(HashMap<String, Object> objects) throws ProcessingException, WritingException { private void writePos(HashMap<String, Object> objects) throws ProcessingException, WritingException {
if (SimulatorConfig.skipUnnecessary) { if (SimulatorConfig.skipUnnecessary) {
for (String name : SimulatorConfig.objectNames) { for (String name : SimulatorConfig.objectNames) {
this.writer.write(objects.get(name), objects.get(SimulatorConfig.sunName)); this.writer.write(objects.get(name));
} }
} else { } else {
for (Object object : objects.values()) { for (Object object : objects.values()) {
this.writer.write(object, objects.get(SimulatorConfig.sunName)); this.writer.write(object);
} }
} }
} }
@ -172,30 +178,37 @@ public class Processor {
public void close() throws ProcessingException { public void close() throws ProcessingException {
try { try {
this.writer.save(); this.writer.save();
System.out.println("");
System.out.println("TOTAL RESULTS: " + arguments);
for(String objectName : SimulatorConfig.objectNames) { for(String objectName : SimulatorConfig.objectNames) {
ArrayList<Double> arguments = this.arguments.get(objectName); TreeMap<Integer, Double> arguments = this.arguments.get(objectName);
this.aopWriter.write(objectName, arguments);
double score = 0; double score = 0;
Double[] empty = new Double[arguments.size()];
Double[] agmnts = arguments.values().toArray(empty);
// Calculate score // Calculate score
for(int i = 1; i < arguments.size() - 1; i++) { for(int i = 1; i < agmnts.length - 1; i++) {
score = score + Math.abs(arguments.get(i-1) - arguments.get(i)); score = score + Math.abs(agmnts[i-1] - agmnts[i]);
} }
System.out.println("SCORE (" + objectName + "): " + score); System.out.println("SCORE (" + objectName + "): " + score);
// CALCULATE AVERAGE // CALCULATE AVERAGE
double sum = 0; double sum = 0;
for (int i = 0; i < arguments.size(); i++){ for (int i = 0; i < agmnts.length; i++){
sum = sum + arguments.get(i); sum = sum + agmnts[i];
} }
// calculate average // calculate average
double average = sum / arguments.size(); double average = sum / agmnts.length;
System.out.println("AVERAGE (" + objectName + ") (degrees): " + Math.toDegrees(average)); System.out.println("AVERAGE (" + objectName + ") (degrees): " + Math.toDegrees(average));
System.out.println("");
} }
this.aopWriter.save();
} catch(WritingException e) { } catch(WritingException e) {
throw new ProcessingException("An error occurred during creation of the file writer: " + e.toString()); throw new ProcessingException("An error occurred during creation of the file writer: " + e.toString());
} }