Index: src/com/example/helloandroid/Fleet.java
===================================================================
--- src/com/example/helloandroid/Fleet.java	(revision 4a1f590b933cfe43602dfae759a4941117e0a71c)
+++ src/com/example/helloandroid/Fleet.java	(revision 730d808c9a5ca8927925cf95e954e3b9599aab3a)
@@ -22,7 +22,10 @@
 	private boolean isClockwise;
 	
+	private boolean done;	
 
 	/* Optimising: pre-calculate paths */
 	public Fleet(Planet source, Planet destination, int numShips, int faction) {
+		done = false;
+		
 		source.setNumShips(source.getNumShips()-numShips);
 		
@@ -64,4 +67,11 @@
 		this.destination = destination;
 		this.isNextToAPlanet = false;
+		
+		Log.d("Galcon", "Source: ("+source.getX()+", "+source.getY()+")");
+		Log.d("Galcon", "Destination: ("+destination.getX()+", "+destination.getY()+")");
+		Log.d("Galcon", "Initial direction: "+direction);
+		
+		if(direction < 0)
+			direction += Math.PI*2;
 	}
 
@@ -176,5 +186,5 @@
 	public void update(ArrayList<Planet> planets) {
 		int speed = 3; //pixels per move
-		double distance, tangentDirection, angle;
+		double distance, tangentAngle, angle;
 		
 		//is the ship going around a planet already
@@ -203,28 +213,27 @@
 				} 
 				
-				double radAngle = Math.atan(getSlope(nearPlanet.getX(), nearPlanet.getY(), dblX, dblY));
+				//double radAngle = Math.atan(getSlope(destination.getX(), destination.getY(), dblX, dblY));
 				//figure out which way to go clockwise or counter clockwise 
-				tangentDirection = (Math.atan(getSlope(nearPlanet.getX(),nearPlanet.getY(),dblX,dblY))) + (Math.PI/2);
-				angle = Math.atan((Math.tan(tangentDirection) - Math.tan(direction))/(1 + Math.tan(tangentDirection)*Math.tan(direction)));
+				tangentAngle = (Math.atan(getSlope(nearPlanet.getX(),nearPlanet.getY(),dblX,dblY))) + (Math.PI/2);
+				angle = Math.atan((Math.tan(tangentAngle) - Math.tan(direction))/(1 + Math.tan(tangentAngle)*Math.tan(direction)));
+				
+				Log.d("Galcon", "tangentAngle: "+tangentAngle);
+				Log.d("Galcon", "direction: "+direction+",  angle: "+angle);
 				
 				if (angle <= Math.PI/2)
 					angle = Math.PI - angle;
 				
-				if(dblX < nearPlanet.getX())
-					radAngle += Math.PI;
-				
-				angle = radAngle + Math.PI/2;
-				
-				double diff = direction-angle;
-				
-				if(diff > 0)
+				//double diff = direction-angle;
+				
+				//if(diff > 0)
+				if(Math.abs(tangentAngle-direction) > Math.PI/2) {
 					isClockwise = false;
-				else
+					direction = tangentAngle-Math.PI;
+				}else {
 					isClockwise = true;
-				
-				if(Math.abs(diff)>Math.PI/2)
-					direction = angle-Math.PI;
-				else
-					direction = angle;
+					direction = tangentAngle;
+				}
+				
+				Log.d("Galcon", "isClockwise: "+isClockwise);
 				
 				xIntercept = dblY - (dblX*Math.tan(direction));
@@ -241,9 +250,9 @@
 			//can you reach the center of the planet by following this direction
 			//if so set isNextToAPlanet to false and move 
-			//otherwise continue moving along the circumferenceds4
+			//otherwise continue moving along the circumference
 			
-			double dist = Math.abs(destination.getY() - (direction*destination.getY()) - xIntercept)/(double)Math.sqrt(Math.pow(direction,2)+1);
-			Log.i("Gencon", dist + " units");
-			if(dist < 5){
+			double dist = Math.abs(destination.getY() - (Math.tan(direction)*destination.getX()) - xIntercept)/(double)Math.sqrt(Math.pow(direction,2)+1);
+			//Log.d("Galcon", "dist: "+dist);
+			if(dist < 5 && dist == 1){
 				dblY += (Math.sin(direction)*speed);
 				dblX += (Math.cos(direction)*speed);
@@ -257,15 +266,26 @@
 				}
 			} else {
-				angle = speed/(double)nearPlanet.radius;
-				Log.i("Gencon", angle + "%");
+				angle = speed/(double)nearPlanet.radius*.1;
+				
+				if(!done) {
+					Log.d("Galcon", "direction: "+direction+", angle: "+angle);
+					Log.d("Galcon", "original: ("+dblX+", "+dblY+")");
+				}
+				
 				if(isClockwise){
-					dblX = ((Math.cos(direction + (Math.PI/2) - angle)*(nearPlanet.radius) + nearPlanet.getX()));
-					dblY = ((Math.sin(direction + (Math.PI/2) - angle)*(nearPlanet.radius) + nearPlanet.getY()));
-					direction = direction - (angle*.4);
+					dblX = Math.cos(direction - (Math.PI/2) + angle)*nearPlanet.radius + nearPlanet.getX();
+					dblY = Math.sin(direction - (Math.PI/2) + angle)*nearPlanet.radius + nearPlanet.getY();
+					direction = direction + angle;
 				} else {
-					dblX = ((Math.cos(direction - (Math.PI/2) + angle)*(nearPlanet.radius) + nearPlanet.getX()));
-					dblY = ((Math.sin(direction - (Math.PI/2) + angle)*(nearPlanet.radius) + nearPlanet.getY()));
-					direction = direction + (angle*.4);
-				}
+					dblX = Math.cos(direction + (Math.PI/2) - angle)*nearPlanet.radius + nearPlanet.getX();
+					dblY = Math.sin(direction + (Math.PI/2) - angle)*nearPlanet.radius + nearPlanet.getY();
+					direction = direction - angle;
+				}
+				
+				if(!done)
+					Log.d("Galcon", "new: ("+dblX+", "+dblY+")");
+				
+				done = true;
+				
 				x = (int)dblX;
 				y = (int)dblY;
