I've done a quick numerical integration for a circular Earth orbit and elliptical orbits for Mars and the Ship on a Hohmann transfer ellipse. I normalized to 1 AU so 1 year corresponds to a time of $2 \pi$.
The vis-viva equation gives
$$v^2(r) = \left(\frac{2}{r}-\frac{1}{a}\right),$$
and period from this answer
$$T = 2 \pi \sqrt{a^3}.$$
I used absolute magnitudes $H$ for Earth and Mars of -4.0 and -1.6 respectively. Those would be the visual magnitudes if you stood next to the Sun and viewed each planet at a distance of 1 AU.
I used equations from Wikipedia for the apparent magnitude $V$ and the phase integral of the phase angle $q(\alpha)$:
$$V = H + 5 \log_{10}(\frac{r_{Sun} r_{Obs}}{1 AU^2}) - 2.5 log_{10}(q(\alpha))$$
$$q(\alpha) = \frac{2}{3}\left( \left(1 - \frac{\alpha}{\pi} \right) \cos(\alpha) + \frac{1}{\pi} \sin(\alpha) \right) $$
A more thorough and accurate calculation might be done based on Computing Apparent Planetary Magnitudes for The Astronomical Almanac.
Results (approximate)
Total time is 0.649 years or 237 days (your milage may vary)
Mars starts at about +1 magnitude and steadily brightens throughout the trip.
Earth starts out extremely bright and becomes invisible as it passes conjunction with the Sun at 0.205 years or about day 75. It then rapidly brightens to about -2 magnitude and stays near that for the rest of the journey.
They reach equal brightness the first time at about 0.178 years or day 65 at -1 magnitude.
After Earth passes conjunction with the Sun it rapidly brightens again, and for a long stretch between 0.27 0.32 years (100 to 120 days) both Mars and Earth are roughly -2.7 magnitude. Earth remains bright, fading only to about -2 magnitude at the end of the journey.
def deriv(X, t):
x, v = X.reshape(2, 3, -1)
acc = -x * (((x**2).sum(axis=1))**-1.5)[:, None]
return np.hstack((v.flatten(), acc.flatten()))
def dotem(a, b, axis):
return (a*b).sum(axis=axis)
def phase_angle(x_sun, x_observer, x_body):
a, b = x_sun-x_body, x_observer-x_body
cos_angle = dotem(a, b, axis=0) / (np.sqrt((a**2).sum(axis=0)) * np.sqrt((b**2).sum(axis=0)))
return np.arccos(cos_angle)
def q(angle):
return (2./3.) * ((1 - angle/pi)*np.cos(angle) + np.sin(angle)/pi)
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint as ODEint
halpfi, pi, twopi = [f*np.pi for f in (0.5, 1, 2)]
degs, rads = 180/pi, pi/180
H_earth, H_mars = -4.0, -1.6 # roughly
a_earth = 1.0 # AU
peri_mars = 1.38 # AU
apo_mars = 1.67 # AU
a_mars = 0.5 * (peri_mars + apo_mars)
a_ship = 0.5 * (a_earth + peri_mars)
T_earth = twopi * np.sqrt(a_earth**3) # years
T_ship = twopi * np.sqrt(a_ship**3)
T_mars = twopi * np.sqrt(a_mars**3)
v0_earth = np.sqrt(2./a_earth - 1./a_earth)
v0_ship = np.sqrt(2./a_earth - 1./a_ship)
v0_mars = np.sqrt(2./peri_mars - 1./a_mars)
X0 = np.array([a_earth, 0, a_earth, 0, -peri_mars, 0] +
[0, v0_earth, 0, v0_ship, 0, -v0_mars])
times = np.linspace(0, 0.5*T_ship, 1001)
answer, info = ODEint(deriv, X0, times, full_output=True)
x_earth, x_ship, x_mars = answer.T[:6].reshape(3, 2, -1)
x_mars = x_mars[:, ::-1] * (np.array([1, -1])[:, None])
x_sun = np.zeros_like(x_earth)
r_ship_earth = np.sqrt(((x_ship - x_earth)**2).sum(axis=0))
r_ship_mars = np.sqrt(((x_ship - x_mars )**2).sum(axis=0))
r_sun_earth = np.sqrt(((x_sun - x_earth)**2).sum(axis=0))
r_sun_ship = np.sqrt(((x_sun - x_ship )**2).sum(axis=0))
r_sun_mars = np.sqrt(((x_sun - x_mars )**2).sum(axis=0))
phase_angle_earth = phase_angle(x_sun, x_ship, x_earth)
phase_angle_mars = phase_angle(x_sun, x_ship, x_mars)
q_earth = q(phase_angle_earth)
q_mars = q(phase_angle_mars)
V_earth = H_earth + 5*np.log10(r_ship_earth * r_sun_earth) - 2.5*np.log10(q_earth)
V_mars = H_mars + 5*np.log10(r_ship_mars * r_sun_mars) - 2.5*np.log10(q_mars)
if True:
plt.figure()
for x in (x_earth, x_ship, x_mars):
plt.plot(x[0], x[1] )
plt.plot(x[0,:1], x[1,:1], 'ok' )
plt.plot(x[0,-1:], x[1,-1:], 'ok')
plt.plot([0], [0], 'oy', markersize=12)
plt.title('Earth, Ship and Mars (AU)', fontsize=16)
plt.show()
if True:
plt.figure()
plt.subplot(4, 1, 1)
colors = '-b', '-g', '-r'
for r in (r_sun_earth, r_sun_ship, r_sun_mars):
plt.plot(times[1:-1]/twopi, r[1:-1])
plt.title('distance from Sun (AU) Earth, Ship, Mars', fontsize=16)
plt.subplot(4, 1, 2)
colors = '-b', '-r'
for phase_angle, color in zip((phase_angle_earth, phase_angle_mars), colors):
plt.plot(times[1:-1]/twopi, degs*phase_angle[1:-1], color)
plt.title('phase angle (degs), Earth, Mars', fontsize=16)
plt.subplot(4, 1, 3)
colors = '-b', '-r'
for q_object, color in zip((q_earth, q_mars), colors):
plt.plot(times[1:-1]/twopi, q_object[1:-1], color)
plt.title('q(phase_angle), Earth, Mars', fontsize=16)
plt.subplot(4, 1, 4)
for V, color in zip((V_earth, V_mars), colors):
plt.plot(times[1:-1]/twopi, V[1:-1], color)
plt.title('Earth, Mars apparent magnitue from Ship', fontsize=16)
plt.xlabel('time (years)', fontsize=14)
plt.ylim(-20, 10)
plt.show()