#
# Plot the velocity & stuff during the trip from Earth to AC
#
#
# set terminal x11 0
# set output
set key left
set xrange [0:5.66]
set yrange [*:*]
set grid
set title "From Earth to Alpha Centaurus, in the Earth FoR"
set xlabel "Earth Time"
t(x) = x
tc(t) = tf - t
# Earth time at turnover and arrival
tt = 2.83
tf = 5.66
# Distance at turnover and arrival
xt = 2
xf = 4
# Ship time at turnover and arrival
taut = 1.76
tauf = 3.52
# Velocity before and after turnover, and combined
v0(t) = t/sqrt(1 + t**2)
v1(t) = tc(t)/sqrt(1 + tc(t)**2)
v(t) = t<(tf/2) ? v0(t) : v1(t)
# Ship time before and after turnover, and combined
tau0(t) = log(t + sqrt(t**2 + 1))
tau1(t) = tauf - tau0(tf - t)
tau(t) = (t <= tt) ? tau0(t) : tau1(t)
# Ship location before and after turnover, and combined
dx0(t) = sqrt(t**2 + 1) - 1
dx1(t) = xf - dx0(tc(t))
distance(t) = (t <= tt) ? dx0(t) : dx1(t)
# Gamma
Gamma(t) = 1/sqrt(1 - v(t)**2)
plot \
v(x) with lines linewidth 2, \
tau(x) with lines linewidth 2, \
distance(x) with lines linewidth 2, \
Gamma(x) with lines linewidth 2