From 179f46141469838e2a8ed9263aaf4cbf1cd609bb Mon Sep 17 00:00:00 2001 From: Christiaan Goossens Date: Wed, 21 Dec 2016 19:25:20 +0100 Subject: [PATCH] Release Candidate --- simulator/.idea/workspace.xml | 262 +++++++++++------- .../src/com/verictas/pos/simulator/Main.java | 2 +- .../pos/simulator/SimulatorConfig.java | 12 +- .../simulator/mathUtils/Vector3dMatrix.java | 2 +- .../simulator/processor/ObjectProcessor.java | 2 +- .../pos/simulator/processor/Processor.java | 16 -- 6 files changed, 167 insertions(+), 129 deletions(-) diff --git a/simulator/.idea/workspace.xml b/simulator/.idea/workspace.xml index f1ee7d3..28ef030 100644 --- a/simulator/.idea/workspace.xml +++ b/simulator/.idea/workspace.xml @@ -10,7 +10,8 @@ - + + @@ -32,65 +33,108 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + - - + + @@ -123,7 +167,6 @@ - @@ -194,9 +238,6 @@ - - - @@ -315,6 +356,9 @@ + + + @@ -626,7 +670,7 @@ - + @@ -634,10 +678,10 @@ - + - + @@ -677,7 +721,7 @@ - @@ -922,38 +966,66 @@ - + - - + + - + - - + + - - + + + + + + + + + + + + - + - - + + - - + - - + + + + + + + + + + + + + + + + + + + + + @@ -966,90 +1038,72 @@ - + - - + + - + - - + + - - - - - - - - - - - - + + - - - - - - - - - + - - + + - + - - + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + diff --git a/simulator/src/com/verictas/pos/simulator/Main.java b/simulator/src/com/verictas/pos/simulator/Main.java index 37539c1..004c05b 100644 --- a/simulator/src/com/verictas/pos/simulator/Main.java +++ b/simulator/src/com/verictas/pos/simulator/Main.java @@ -53,7 +53,7 @@ public class Main { * Object listing */ - Object[] objects = {sun, earth, moon, jupiter, mars, venus}; + Object[] objects = {}; // Fill in the objects to be simulated /** diff --git a/simulator/src/com/verictas/pos/simulator/SimulatorConfig.java b/simulator/src/com/verictas/pos/simulator/SimulatorConfig.java index b99c0a4..5e0aaad 100644 --- a/simulator/src/com/verictas/pos/simulator/SimulatorConfig.java +++ b/simulator/src/com/verictas/pos/simulator/SimulatorConfig.java @@ -23,15 +23,15 @@ public class SimulatorConfig { * Time settings */ - 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 int rounds = 0; // Amount of rounds to run the simulator for + public static double time = 0; // Time steps in seconds /** * Object settings */ public static String sunName = "Sun"; // The name of the sun to calculate values TO - public static String[] objectNames = { "Earth" }; // The name of the object(s) your want to calculate the values OF + public static String[] objectNames = {}; // The name of the object(s) your want to calculate the values OF /** * Output preferences @@ -39,12 +39,12 @@ public class SimulatorConfig { 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 skipLines = 2400; // 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 = 1; // 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 /** * Console settings */ - public static boolean logConsole = false; - public static int skipConsole = 100000; + public static boolean logConsole = true; + public static int skipConsole = 1; } diff --git a/simulator/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java b/simulator/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java index 1d43106..e7c0b18 100644 --- a/simulator/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java +++ b/simulator/src/com/verictas/pos/simulator/mathUtils/Vector3dMatrix.java @@ -10,7 +10,7 @@ public class Vector3dMatrix extends GMatrix { * @param m The number of columns. */ public Vector3dMatrix(int n, int m) { - // Change the size to suit Vector3f + // Change the size to suit Vector3d super(n, m * 3); this.setZero(); } diff --git a/simulator/src/com/verictas/pos/simulator/processor/ObjectProcessor.java b/simulator/src/com/verictas/pos/simulator/processor/ObjectProcessor.java index 49448f8..4e3831d 100644 --- a/simulator/src/com/verictas/pos/simulator/processor/ObjectProcessor.java +++ b/simulator/src/com/verictas/pos/simulator/processor/ObjectProcessor.java @@ -216,7 +216,7 @@ public class ObjectProcessor { Node returnNode = new Node(); - if (lastMaxRound == -1 || lastMaxRound == -1) { + if (lastMaxRound == -1 || lastMinRound == -1) { lastMinRound = min.round; lastMaxRound = max.round; } else { diff --git a/simulator/src/com/verictas/pos/simulator/processor/Processor.java b/simulator/src/com/verictas/pos/simulator/processor/Processor.java index 07b5935..66d7d09 100644 --- a/simulator/src/com/verictas/pos/simulator/processor/Processor.java +++ b/simulator/src/com/verictas/pos/simulator/processor/Processor.java @@ -69,11 +69,6 @@ public class Processor { System.out.println("\n\n============== ROTATION DATA: " + objectName.toUpperCase() + ", ROUND " + (Simulator.round - 1) + " ============="); if (SimulatorConfig.outputUnit.equals("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 { @@ -86,16 +81,9 @@ public class Processor { System.out.println("WARNING:: Descending node not found.\n"); } - //System.out.println("Position during apastron (AU): " + AU.convertFromMeter(object.aphelion)); System.out.println("Distance from (the) " + SimulatorConfig.sunName + " during apastron in km: " + object.aphelionDistance / 1000 + "\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 { - //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) { System.out.println("Ascending node (m): " + object.ascendingNode); } else { @@ -107,16 +95,12 @@ public class Processor { } else { System.out.println("WARNING:: Descending node not found.\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); - //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) { System.out.println("Argument of periapsis (radians): " + AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion)); - //System.out.println("Argument of periapsis (degrees): " + Math.toDegrees(AOP.calculate(object.ascendingNode, object.perihelion, object.aphelion))); if (object.checkNodes()) { // Add the node to the list