diff --git a/simulator/.idea/workspace.xml b/simulator/.idea/workspace.xml
index 65ba992..81cbe73 100644
--- a/simulator/.idea/workspace.xml
+++ b/simulator/.idea/workspace.xml
@@ -7,13 +7,7 @@
-
-
-
-
-
-
-
+
@@ -25,7 +19,6 @@
-
@@ -35,11 +28,31 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -48,8 +61,8 @@
-
-
+
+
@@ -58,9 +71,10 @@
-
-
+
+
+
@@ -111,20 +125,19 @@
-
-
+
+
-
-
-
-
+
+
+
@@ -142,16 +155,7 @@
-
-
-
-
-
-
-
-
-
-
+
@@ -167,14 +171,11 @@
+
+
+
-
-
-
-
-
-
@@ -285,15 +286,11 @@
-
-
-
-
-
+
@@ -343,25 +340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -376,8 +354,17 @@
+
+
+
+
+
+
+
+
+
@@ -432,27 +419,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -527,34 +493,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -565,6 +503,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -590,35 +547,48 @@
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
+
+
+
-
+
+
+
+
-
-
-
@@ -650,14 +620,14 @@
-
+
-
+
@@ -665,14 +635,14 @@
-
+
-
+
@@ -680,7 +650,7 @@
-
+
@@ -701,21 +671,21 @@
-
+
-
+
-
+
@@ -723,7 +693,7 @@
-
+
@@ -744,21 +714,21 @@
-
+
-
+
-
+
@@ -766,7 +736,7 @@
-
+
@@ -787,21 +757,21 @@
-
+
-
+
-
+
@@ -809,7 +779,7 @@
-
+
@@ -830,21 +800,21 @@
-
+
-
+
-
+
@@ -866,7 +836,7 @@
-
+
@@ -881,45 +851,33 @@
-
+
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
-
+
-
+
-
+
@@ -927,14 +885,14 @@
-
+
-
+
@@ -942,7 +900,7 @@
-
+
@@ -963,37 +921,23 @@
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
@@ -1003,16 +947,32 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1086,6 +1046,17 @@
+
+
+
+
+
+
+
vecmath-1.5.2
diff --git a/simulator/src/com/verictas/pos/simulator/mathUtils/AOP.java b/simulator/src/com/verictas/pos/simulator/mathUtils/AOP.java
index ccf63e7..cfba44f 100644
--- a/simulator/src/com/verictas/pos/simulator/mathUtils/AOP.java
+++ b/simulator/src/com/verictas/pos/simulator/mathUtils/AOP.java
@@ -10,7 +10,7 @@ public class AOP {
Vector3d eccentricity = new Vector3d(0,0,0);
eccentricity.sub(perihelion, aphelion);
- if (eccentricity.getZ() < 0) {
+ if (eccentricity.getZ() < ascendingNode.getZ()) {
return (2 * Math.PI) - ascendingNode.angle(eccentricity);
} else {
return ascendingNode.angle(eccentricity);