Interestingly, it looks like Musk's tweeted orbit may in fact be wrong, according to JPL's Horizons database as well as this comment by someone who knows about these things.
In late 2020, the currently predicted orbit will pass only about 7 million km from Mars. I am not sure if that's close enough for the gravitational perturbation suggested in Max Fagin's video after 02:00
, which mentions a possible use of a perturbation from a near approach to Mars using a slightly overshot trajectory, to prevent future intercepts with Earth's orbit, which may present a navigation hazard in cis-lunar space, thereby possibly making it easier for people to call it space junk.
However, it certainly looks like SpaceX did indeed have a plan! despite the other answer to the contrary.
I've plotted the projections of the orbits into the ecliptic below, please excuse any pareidolia. The one on the left only goes out to Mars and Roadster, the one on the right includes Jupiter and four asteroids as well. Below that are distances with respect to the Sun (small wiggle, yellow), Earth (medium wiggle, blue) and Mars (big wiggle, red). Also included at the bottom is the Python script to read the Horizons output.
Note 1: The projected orbit has a period of 558 days.
Note 2: Currently Horizons is using Solution #3
and they are likely to continue to be updated as more optical measurements are made. However, the data plotted is from the original solution (see the blurb below).
TRAJECTORY:
This trajectory is based on JPL solution #3, a fit to 57 ground-based
optical astrometric measurements spanning 2018 Feb 8.2 to 8.8.


The blurb in the Horizons output says:
Revised: Feb 07, 2018 Tesla Roadster (spacecraft) -143205
Tesla Roadster (Starman, 2018-017A)
Dummy payload from first launch of SpaceX Falcon Heavy launch vehicle
consisting of a standard Tesla Roadster automobile and a spacesuit-wearing
mannequin nicknamed Starman.
Also includes a Hot Wheels toy model Roadster on the car's dash with a
mini-Starman inside. A data storage device placed inside the car contains
a copy of Isaac Asimov's "Foundation" novels. A plaque on the attachment
fitting between the Falcon Heavy upper stage and the Tesla is etched with
the names of more than 6,000 SpaceX employees.
After orbiting the Earth for 6 hours, a third-stage burn-to-depletion
was completed at approximately 02:30 UTC Feb 7, placing the dummy payload
in a heliocentric orbit having a perihelion of 0.99 au and aphelion
~1.7 au.
Payload mass: ~1250 Kg
This trajectory is a ballistic propagation derived from a post-injection
state provided by SpaceX on 2018-Feb-7, and is based on internal GPS data.
Prediction errors could increase significantly over time due to unmodeled
solar presure, thermal radiation, or outgassing accelerations that are not
characterized.
Launched: 2018-Feb-06 20:45 UTC by Falcon Heavy (FH) from Kennedy Space
Center, USA (launchpad 39A)
Here is the Python script that reads the Horizons output saved to disk, and then made the plot.
class Body(object):
def __init__(self, name):
self.name = name
class Asteroid(object):
def __init__(self, name):
self.name = name
class Spacecraft(object):
def __init__(self, name):
self.name = name
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
halfpi, pi, twopi = [f*np.pi for f in [0.5, 1.0, 2.0]]
degs, rads = 180./pi, pi/180.
# DO MAJOR BODIES:
fnames = ('Roadster Sun horizons_results.txt',
'Roadster Mercury horizons_results.txt',
'Roadster Venus horizons_results.txt',
'Roadster Earth Geocenter horizons_results.txt',
'Roadster Moon horizons_results.txt',
'Roadster Mars horizons_results.txt',
'Roadster Jupiter horizons_results.txt')
names = ('Sun', 'Mercury', 'Venus', 'Earth', 'Moon',
'Mars', 'Jupiter')
JDs, posns, vels, linez = [], [], [], []
for fname in fnames:
with open(fname, 'r') as infile:
lines = infile.read().splitlines()
iSOE = [i for i, line in enumerate(lines) if "$$SOE" in line][0]
iEOE = [i for i, line in enumerate(lines) if "$$EOE" in line][0]
print iSOE, iEOE, lines[iSOE], lines[iEOE]
lines = [line.split(',') for line in lines[iSOE+1:iEOE]]
JD = np.array([float(line[0]) for line in lines])
pos = np.array([[float(item) for item in line[2:5]] for line in lines])
vel = np.array([[float(item) for item in line[5:8]] for line in lines])
pos, vel = [thing.T for thing in pos, vel]
JDs.append(JD)
posns.append(pos)
vels.append(vel)
linez.append(lines)
bodies = []
for pos, vel, name in zip(posns, vels, names):
body = Body(name)
body.pos = pos
body.vel = vel
bodies.append(body)
Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter = bodies
# DO Asteroids :
fnames = ('Roadster Ceres horizons_results.txt',
'Roadster Pallas horizons_results.txt',
'Roadster Vesta horizons_results.txt',
'Roadster Juno horizons_results.txt')
names = ('Ceres', 'Pallas', 'Vesta', 'Juno')
JDs, posns, vels, linez = [], [], [], []
for fname in fnames:
with open(fname, 'r') as infile:
lines = infile.read().splitlines()
iSOE = [i for i, line in enumerate(lines) if "$$SOE" in line][0]
iEOE = [i for i, line in enumerate(lines) if "$$EOE" in line][0]
print iSOE, iEOE, lines[iSOE], lines[iEOE]
lines = [line.split(',') for line in lines[iSOE+1:iEOE]]
JD = np.array([float(line[0]) for line in lines])
pos = np.array([[float(item) for item in line[2:5]] for line in lines])
vel = np.array([[float(item) for item in line[5:8]] for line in lines])
pos, vel = [thing.T for thing in pos, vel]
JDs.append(JD)
posns.append(pos)
vels.append(vel)
linez.append(lines)
asteroids = []
for pos, vel, name in zip(posns, vels, names):
asteroid = Asteroid(name)
asteroid.pos = pos
asteroid.vel = vel
asteroids.append(asteroid)
fname = ('Roadster Spacecraft horizons_results.txt')
with open(fname, 'r') as infile:
lines = infile.read().splitlines()
iSOE = [i for i, line in enumerate(lines) if "$$SOE" in line][0]
iEOE = [i for i, line in enumerate(lines) if "$$EOE" in line][0]
print iSOE, iEOE, lines[iSOE], lines[iEOE]
lines = [line.split(',') for line in lines[iSOE+1:iEOE]]
pos = np.array([[float(item) for item in line[2:5]] for line in lines])
vel = np.array([[float(item) for item in line[5:8]] for line in lines])
pos, vel = [thing.T for thing in pos, vel]
Roadster = Spacecraft('Roadster')
Roadster.pos = pos
Roadster.vel = vel
Roadster.rsun = np.sqrt(((Sun.pos - Roadster.pos)**2).sum(axis=0))
Roadster.rearth = np.sqrt(((Earth.pos - Roadster.pos)**2).sum(axis=0))
Roadster.rmars = np.sqrt(((Mars.pos - Roadster.pos)**2).sum(axis=0))
# Estimate Period:
x, y, z = Roadster.pos
theta = np.arctan2(y, x)
dtheta = theta[1:] - theta[:-1]
wraps = np.where(dtheta<-1)[0]
print "approximate period in days", wraps[1:] - wraps[:-1]
if True:
fig = plt.figure()
ax1 = fig.add_subplot(2, 2, 1)
for body in bodies:
if body.name != 'Jupiter':
x, y, z = body.pos
ax1.plot(x, y)
ax1.plot(x[:1], y[:1], 'ok')
x, y, z = Roadster.pos
ax1.plot(x, y, '-k')
ax1.plot(x[:1], y[:1], 'ok')
ax1.set_xlim(-3E+08, 3E+08)
ax1.set_ylim(-3E+08, 3E+08)
ax2 = fig.add_subplot(2, 2, 2)
for body in bodies:
if body.name not in ("Mercury", "Venus"):
x, y, z = body.pos
ax2.plot(x, y)
ax2.plot(x[:1], y[:1], 'ok')
for asteroid in asteroids:
x, y, z = asteroid.pos
ax2.plot(x, y, '-k', linewidth=0.5)
ax2.plot(x[:1], y[:1], 'ok')
x, y, z = Roadster.pos
ax2.plot(x, y, '-k')
ax2.plot(x[:1], y[:1], 'ok')
ax2.set_xlim(-8E+08, 8E+08)
ax2.set_ylim(-8E+08, 8E+08)
ax3 = fig.add_subplot(2, 1, 2)
years = 2018 + 37/365.25 + (JD-JD[0])/365.25
ax3.plot(years, Roadster.rsun, '-y', linewidth=1.0)
ax3.plot(years, Roadster.rearth, '-b', linewidth=1.5)
ax3.plot(years, Roadster.rmars, '-r', linewidth=2.0)
plt.show()