1
0
mirror of https://github.com/christiaangoossens/Planetary-Orbit-Simulator synced 2024-11-24 20:04:09 +00:00

Cleanup and comments

This commit is contained in:
Christiaan Goossens 2016-09-15 14:10:06 +02:00
parent 1d99586994
commit 29c14837eb
10 changed files with 181 additions and 185 deletions

View File

@ -7,8 +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$/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/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/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/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/AU.java" afterPath="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
</list> </list>
<ignored path="simulator.iws" /> <ignored path="simulator.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -29,75 +32,7 @@
<favorites_list name="simulator" /> <favorites_list name="simulator" />
</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="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="362">
<caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Simulator.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="45" column="0" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</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="153">
<caret line="9" column="1" selection-start-line="9" selection-start-column="1" selection-end-line="9" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</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="1479">
<caret line="87" column="5" selection-start-line="87" selection-start-column="5" selection-end-line="87" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3621#3622#0" expanded="true" />
<element signature="e#3656#3657#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Object.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="665">
<caret line="42" column="16" selection-start-line="42" selection-start-column="16" selection-end-line="42" selection-end-column="16" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
@ -133,12 +68,12 @@
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/WritingException.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/WritingException.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/DataWriter.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/DataWriter.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java" /> <option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Object.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/Main.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.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/Object.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/mathUtils/AU.java" />
<option value="$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/DataWriter.java" />
</list> </list>
</option> </option>
</component> </component>
@ -224,46 +159,6 @@
<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>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="simulator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="dataWriter" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane> </subPane>
</pane> </pane>
</panes> </panes>
@ -568,7 +463,7 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-1928" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-1928" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" /> <editor active="false" />
<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" />
@ -578,11 +473,11 @@
<window_info id="Event Log" 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="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="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" 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.23890063" sideWeight="0.5" order="2" 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.71881604" sideWeight="0.5" 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="true" 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="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" />
@ -614,7 +509,7 @@
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
<option name="time" value="3" /> <option name="time" value="7" />
</breakpoint-manager> </breakpoint-manager>
<watches-manager /> <watches-manager />
</component> </component>
@ -667,13 +562,18 @@
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -741,13 +641,18 @@
<caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" /> <caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -788,13 +693,18 @@
<caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" /> <caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -835,13 +745,18 @@
<caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" /> <caret line="40" column="21" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -882,13 +797,18 @@
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -919,13 +839,18 @@
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" /> <caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -983,14 +908,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="681">
<caret line="116" column="5" selection-start-line="116" selection-start-column="5" selection-end-line="116" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://C:/Program Files/Java/jdk1.8.0_91/src.zip!/java/lang/Exception.java"> <entry file="jar://C:/Program Files/Java/jdk1.8.0_91/src.zip!/java/lang/Exception.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238"> <state relative-caret-position="238">
@ -999,26 +916,10 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/AU.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="26" selection-start-line="21" selection-start-column="26" selection-end-line="21" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="62" selection-start-line="6" selection-start-column="62" selection-end-line="6" selection-end-column="62" />
<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="362"> <state relative-caret-position="331">
<caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" /> <caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
@ -1027,29 +928,32 @@
</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="665"> <state relative-caret-position="430">
<caret line="42" column="16" selection-start-line="42" selection-start-column="16" selection-end-line="42" selection-end-column="16" /> <caret line="162" column="0" selection-start-line="162" selection-start-column="0" selection-end-line="162" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1090#1091#0" expanded="true" />
<element signature="e#1161#1162#0" expanded="true" />
<element signature="method#getSpeed#0;class#Object#0" expanded="false" /> <element signature="method#getSpeed#0;class#Object#0" expanded="false" />
<element signature="method#getPosition#0;class#Object#0" expanded="false" /> <element signature="method#getPosition#0;class#Object#0" expanded="false" />
<element signature="method#setAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getAcceleration#0;class#Object#0" expanded="false" /> <element signature="method#getAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" /> <element signature="method#setOldAcceleration#1;class#Object#0" expanded="false" />
<element signature="method#getOldAcceleration#0;class#Object#0" expanded="false" />
<element signature="method#toString#0;class#Object#0" expanded="false" />
<element signature="method#getForceOnObject#0;class#Object#0" expanded="false" />
<element signature="method#getDistance#0;class#Object#0" expanded="false" />
<element signature="method#updatePosition#0;class#Object#0" expanded="false" />
<element signature="method#updateSpeed#0;class#Object#0" expanded="false" />
<element signature="method#enactForceOnObject#0;class#Object#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/Simulator.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1479"> <state relative-caret-position="187">
<caret line="87" column="5" selection-start-line="87" selection-start-column="5" selection-end-line="87" selection-end-column="5" /> <caret line="11" column="23" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#3621#3622#0" expanded="true" />
<element signature="e#3656#3657#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1062,12 +966,45 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/Simulator.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="153"> <state relative-caret-position="578">
<caret line="45" column="0" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" /> <caret line="56" column="7" selection-start-line="56" selection-start-column="7" selection-end-line="56" selection-end-column="7" />
<folding>
<element signature="method#convertToMeter#0;class#AU#0" expanded="false" />
<element signature="method#convertToMetersPerSecond#0;class#AU#0" expanded="false" />
<element signature="method#convertFromMeter#0;class#AU#0" expanded="false" />
<element signature="method#convertFromMetersPerSecond#0;class#AU#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1887">
<caret line="116" column="5" selection-start-line="116" selection-start-column="5" selection-end-line="116" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/verictas/pos/simulator/dataWriter/WritingException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="62" selection-start-line="6" selection-start-column="62" selection-end-line="6" selection-end-column="62" />
<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="1054">
<caret line="132" column="21" selection-start-line="132" selection-start-column="21" selection-end-line="132" selection-end-column="21" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="method#DataWriter#0;class#DataWriter#0" expanded="false" />
<element signature="method#write#0;class#DataWriter#0" expanded="false" />
<element signature="method#write#1;class#DataWriter#0" expanded="false" />
<element signature="method#save#0;class#DataWriter#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>

View File

@ -16,7 +16,7 @@ public class Main {
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2016 Christiaan Goossens (Verictas) & Daniel Boutros * Copyright (c) 2016 Christiaan Goossens (Verictas) & Daniel Boutros
* *
* The full license is included in the git respository as LICENSE.md * The full license is included in the git repository as LICENSE.md
*/ */
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -25,9 +25,6 @@ public class Object {
this.mass = mass; this.mass = mass;
this.position = position; this.position = position;
this.speed = speed; this.speed = speed;
System.out.println(speed);
this.oldAcceleration = new Vector3d(0,0,0); this.oldAcceleration = new Vector3d(0,0,0);
this.acceleration = new Vector3d(0,0,0); this.acceleration = new Vector3d(0,0,0);
} }

View File

@ -13,13 +13,16 @@ public class Simulator {
*/ */
int rounds = SimulatorConfig.rounds; int rounds = SimulatorConfig.rounds;
double time = SimulatorConfig.time;
/** /**
* Log a debug message to the console to signal the simulation has started * Log a debug message to the console to signal the simulation has started
*/ */
System.out.println("========== Simulation Started ==========\n"); System.out.println("========== Simulation Started ==========\n");
// Create a timer /**
* Create a time to measure runtime
*/
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
/** /**
@ -52,10 +55,6 @@ public class Simulator {
* The round has started * The round has started
*/ */
System.out.println("\nRound " + (t + 1) + " started!"); System.out.println("\nRound " + (t + 1) + " started!");
/**
* Define the initial values
*/
double time = SimulatorConfig.time;
for(int i = 0; i < objects.length; i++) { for(int i = 0; i < objects.length; i++) {
objects[i].updatePosition(time); objects[i].updatePosition(time);
@ -64,15 +63,14 @@ public class Simulator {
accelerate(objects, matrix); accelerate(objects, matrix);
/**
* Print the matrix for this round
*/
for(int i = 0; i < objects.length; i++) { for(int i = 0; i < objects.length; i++) {
objects[i].updateSpeed(time); objects[i].updateSpeed(time);
writer.write(objects[i].name, objects[i].position, objects[i].speed, objects[i].oldAcceleration, objects[i].acceleration, objects[i].mass); writer.write(objects[i].name, objects[i].position, objects[i].speed, objects[i].oldAcceleration, objects[i].acceleration, objects[i].mass);
} }
/**
* The round has ended
*/
} }
/** /**
@ -81,7 +79,9 @@ public class Simulator {
writer.save(); writer.save();
System.out.println("========== Simulation Finished =========="); System.out.println("========== Simulation Finished ==========");
// Display time info /**
* Display information about the program runtime
*/
long stopTime = System.currentTimeMillis(); long stopTime = System.currentTimeMillis();
System.out.println("Simulation took: " + (stopTime - startTime) + "ms"); System.out.println("Simulation took: " + (stopTime - startTime) + "ms");
} catch(WritingException e) { } catch(WritingException e) {

View File

@ -13,25 +13,39 @@ import java.util.Date;
public class DataWriter { public class DataWriter {
private FileWriter writer = null; private FileWriter writer = null;
// Delimiter used in text file (for import in Excel) /**
* Set global variables, such as the delimiter and the new line character
*/
private static final String DELIMITER = "\t"; private static final String DELIMITER = "\t";
private static final String NEW_LINE = "\n"; private static final String NEW_LINE = "\n";
private int counter = 0; private int counter = 0;
/**
* Constructor
* @throws WritingException
*/
public DataWriter() throws WritingException { public DataWriter() throws WritingException {
try { try {
// Define the save path /**
* Define the save path
*/
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 + getCurrentTimeStamp() + ".txt";
System.out.println("WRITING DATA TO: " + path); System.out.println("WRITING DATA TO: " + path);
/**
* Check if the saving directory exists to prevent IOException
*/
if (!directoryPath.exists()) { if (!directoryPath.exists()) {
directoryPath.mkdirs(); directoryPath.mkdirs();
} }
/**
* Open a file to write to and write the header
*/
this.writer = new FileWriter(path); this.writer = new FileWriter(path);
this.writer.write("Object" + DELIMITER + "Position (m)" + DELIMITER + "Position (AU)" + DELIMITER + "Speed (m/s)" + DELIMITER + "Speed (AU/day)" + DELIMITER + "Old Acceleration" + DELIMITER + "Acceleration" + DELIMITER + "Mass" + NEW_LINE); this.writer.write("Object" + DELIMITER + "Position (m)" + DELIMITER + "Position (AU)" + DELIMITER + "Speed (m/s)" + DELIMITER + "Speed (AU/day)" + DELIMITER + "Old Acceleration" + DELIMITER + "Acceleration" + DELIMITER + "Mass" + NEW_LINE);
this.counter++; this.counter++;
@ -42,6 +56,11 @@ public class DataWriter {
} }
} }
/**
* Writes a string to the file
* @param string
* @throws WritingException
*/
public void write(String string) throws WritingException { public void write(String string) throws WritingException {
if (this.writer == null) { if (this.writer == null) {
throw new WritingException("The writer isn't defined yet"); throw new WritingException("The writer isn't defined yet");
@ -58,6 +77,16 @@ public class DataWriter {
} }
} }
/**
* Writes some data about the current object to the file
* @param id String
* @param position Vector3d
* @param speed Vector3d
* @param oldAcceleration Vector3d
* @param acceleration Vector3d
* @param mass double
* @throws WritingException
*/
public void write(String id, Vector3d position, Vector3d speed, Vector3d oldAcceleration, Vector3d acceleration, double mass) throws WritingException { public void write(String id, Vector3d position, Vector3d speed, Vector3d oldAcceleration, Vector3d acceleration, double mass) throws WritingException {
if (this.writer == null) { if (this.writer == null) {
throw new WritingException("The writer isn't defined yet"); throw new WritingException("The writer isn't defined yet");
@ -74,6 +103,10 @@ public class DataWriter {
} }
} }
/**
* Saves the file to disk
* @throws WritingException
*/
public void save() throws WritingException { public void save() throws WritingException {
if (this.writer == null) { if (this.writer == null) {
throw new WritingException("The writer isn't defined yet"); throw new WritingException("The writer isn't defined yet");
@ -87,11 +120,19 @@ public class DataWriter {
} }
} }
/**
* Gets the current line count
* @return int
*/
public int getLines() { public int getLines() {
return this.counter; return this.counter;
} }
public String getCurrentTimeStamp() { /**
* Gets the current filestamp for file naming
* @return String
*/
private String getCurrentTimeStamp() {
return new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(new Date()); return new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(new Date());
} }
} }

View File

@ -6,6 +6,12 @@ public class AU {
/** /**
* Helper class for working with astronomical units * Helper class for working with astronomical units
*/ */
/**
* Converts AU to meters
* @param input Vector3d with values in AU
* @return Vector3d with values in meter
*/
public static Vector3d convertToMeter(Vector3d input) { public static Vector3d convertToMeter(Vector3d input) {
Vector3d output = new Vector3d(input); Vector3d output = new Vector3d(input);
@ -16,6 +22,11 @@ public class AU {
return output; return output;
} }
/**
* Converts AU/day to m/s
* @param input Vector3d with values in AU/day
* @return Vector3d with values in m/s
*/
public static Vector3d convertToMetersPerSecond(Vector3d input) { public static Vector3d convertToMetersPerSecond(Vector3d input) {
Vector3d output = new Vector3d(input); Vector3d output = new Vector3d(input);
@ -25,6 +36,11 @@ public class AU {
return output; return output;
} }
/**
* Converts meters to AU for data collection
* @param input Vector3d with values in meters
* @return Vector3d with values in AU
*/
public static Vector3d convertFromMeter(Vector3d input) { public static Vector3d convertFromMeter(Vector3d input) {
Vector3d output = new Vector3d(input); Vector3d output = new Vector3d(input);
@ -34,6 +50,11 @@ public class AU {
return output; return output;
} }
/**
* Converts m/s to AU/day for data collection
* @param input Vector3d with values in m/s
* @return Vector3d with values in AU/day
*/
public static Vector3d convertFromMetersPerSecond(Vector3d input) { public static Vector3d convertFromMetersPerSecond(Vector3d input) {
Vector3d output = new Vector3d(input); Vector3d output = new Vector3d(input);