mirror of
https://github.com/christiaangoossens/Planetary-Orbit-Simulator
synced 2025-07-02 09:40:48 +00:00
Release Candidate
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user