Ship.Velocity.x = Ship.msngSpeed * System.Math.Sin(Ship.msngHeading)
Ship.Velocity.y = Ship.msngSpeed * System.Math.Cos(Ship.msngHeading)
Ship.Acceleration.x = Ship.ACCEL * System.Math.Sin(Ship.msngFacing)
Ship.Acceleration.y = Ship.ACCEL * System.Math.Cos(Ship.msngFacing)
sngXComp = Ship.Velocity.x + Ship.Acceleration.x
sngYComp = Ship.Velocity.y + Ship.Acceleration.y
Ship.msngSpeed = System.Math.Sqrt(sngXComp ^ 2 + sngYComp ^ 2)
If Ship.msngSpeed > Ship.MAXSPEED Then Ship.msngSpeed = Ship.MAXSPEED
If sngYComp > 0 Then Ship.msngHeading = System.Math.Atan(sngXComp / sngYComp)
If sngYComp < 0 Then Ship.msngHeading = System.Math.Atan(sngXComp / sngYComp) + PI
Ship.msngX = Ship.msngX + Ship.Velocity.x
Ship.msngY = Ship.msngY - Ship.Velocity.y