In the speed of light thread I posed the question, how to calculate the shipboard time for a journey to Alpha Centauri starting at zero velocity at Earth and accelerating at one G halfway there then decel for the rest of the trip to arrive at AC with zero relative velocity. For travel in the solar system its just a matter of manipulating D=A T^2 but how do you do it for relativistic velocities?
I know that it takes about one year to approach the speed of light accelerating at a constant one G but what is the exact formula for that?
If it takes one year to get close to C, and you keep accelerating at one G, that means you are pushing further into relativistic effects so that pretty much complicates the calculation for sure. So to reiterate, what is the formula for calculating a constant one G journey to some star, 4 LY away or 40 LY away or 400 LY away? Knowing the end point and knowing you have to reverse the accel to decel at the halfway point.

So here is one formula, it gives the distance traveled at a constant G, but the time is in stationary framework time, so I don't yet know what shipboard time would be but here goes: (All units must match of course)

ST = stationary framework (Earth framework)
D = distance traveled in ST
C = speed of light
A= acceleration in ST
T=time in seconds.

D= C*A*T^2/ (C+Sqrt (C^2+A*T^2))
So with a constant A of 1 G, it says after 10 years earth time the ship has covered 31 light years, so if you consider that half the trip, then reversing accel to decel at one g puts you at twice that distance in twice the time, so 10 years of accel and 10 years of decel puts you 62 light years down the road. Not sure what the shipboard time would be however.