Calculating objects trajectory in 3d space

I am trying to make a space flight simulator but I am having some issues with the math. I need to find the formulas to predict where an object will be at a given time. The problem is that I need to take into account linear and angular accelerations. Think of flying a spaceship but adjusting your pitch, yaw, roll and forward speed as well as possibly using thrusters to add up/down and left/right motion.

I figure I need to know my Relative Velocity (RV) as a vector, my Rate of Rotation (RR) using a vector for degrees per second, and Time (T) as a float for the position at a given time.