P01.06 · Lesson 06 of 18
Parametric Curves & Polar Coordinates
A curve is a function of one parameter; choose the parameter that makes the physics simple.
Build it Plot a conic orbit from r(θ)
- Learning outcomes
- Derive the polar equation of a conic, its periapsis and apoapsis, and the formulas for arc length, swept area and slope of a curve given in polar or parametric form.
- Implement and test a conic-orbit module: radius, derivative, Cartesian points, Simpson integration of area and arc length, time of flight from Kepler's second law, and speed from the parametric derivatives.
- Measure, by computational experiment, how the time an orbit spends near apoapsis grows with eccentricity and how fast Simpson's rule converges.
- Decide, from a stated tolerance, how many panels an arc-length or time-of-flight integral needs.
- Prerequisites
P01.01–P01.04(derivatives, chain rule, integrals, substitution),P00.03(NumPy),P00.04(Matplotlib). Skill check: you can differentiate with the quotient rule and you know and .- Engineering question
Given the periapsis and apoapsis of a transfer orbit, what is its shape, how fast does the spacecraft move at every point, how long does it take from periapsis to apoapsis, and how do we know those numbers are right?
Full lesson specification (11 more items)
- Assumptions and limits
Two bodies only; the central body is a point mass (or spherically symmetric); the spacecraft's mass is negligible; no drag, no thrust, no third body, no oblateness. Then the path is exactly a conic with the attracting centre at one focus. The model fails when the periapsis dips into the atmosphere (below about 150 km for Earth), when Earth's equatorial bulge () rotates the orbit by a fraction of a degree per day, and when the Moon or Sun pull on a high apoapsis.
- Analytical work
Conic in polar form; periapsis, apoapsis, semi-major axis; ; area and arc length in polar coordinates; velocity components and speed from the parametric derivatives; Kepler's second and third laws from the area formula; a hand calculation for a geostationary transfer orbit.
- Computational deliverable
starter/main.py:conic_radius,conic_radius_derivative,true_anomaly_limit,polar_to_cartesian,periapsis_apoapsis,semi_major_axis,conic_from_apsides,orbit_points,simpson,polar_arc_length,sector_area,specific_angular_momentum,time_of_flight,orbital_period,orbital_speed,vis_viva_speed,flight_path_angle,ellipse_parametric,arc_length_convergence. Tests prove: the circle and parabola limits, symmetry about the apse line, the asymptote of an open conic, the full swept area equals , the perimeter equals from SciPy, the parametric ellipse lies on the polar conic, the speed from the parametric derivatives equals the vis-viva speed, the swept-area time of one revolution equals Kepler's third-law period, and Simpson converges at fourth order.- Practical activity
computational experiment: sweep the eccentricity and measure the fraction of the period spent in the apoapsis half of the orbit; measure Simpson's convergence for arc length and time of flight and pick a panel count for a 1 s tolerance.
- Equipment
None. A computer with the environment from
P00.01.- Safety
None beyond normal computer use.
- Evidence
Completed
main.py, passing tests,conic_orbits.png, the hand calculation for the transfer orbit with its comparison to the code, the eccentricity-sweep table and the convergence table.- Assessment
assessments/phase-01/grading-rubric.md; competencies 1–4. Pass: the area and arc-length formulas derived with every step named; all public tests pass; the hand calculation agrees with the code to four significant figures; the convergence experiment reports an observed order with a number.- References
@openstax-calculus-volume-2§7.1 "Parametric Equations" and §7.2 "Calculus of Parametric Curves" (required-free);@openstax-calculus-volume-2§7.3 "Polar Coordinates" and §7.4 "Area and Arc Length in Polar Coordinates" (required-free);@openstax-calculus-volume-2§7.5 "Conic Sections" (required-free);@openstax-calculus-volume-3Chapter 1 repeats the same material as §1.1–1.5 (supplementary-free).- Extensions
★ Solve Kepler's equation with Newton's method (
P01.02) and compare the true anomaly at with the swept-area integral. ★ Add the secular rates and show how many days it takes the transfer orbit's perigee to drift by 1°.- Time
unmeasured
1. The engineering problem
A communications satellite is launched into a circular parking orbit 300 km above the Earth and must reach the geostationary radius of 42 164 km. The cheapest way is a transfer ellipse whose periapsis (closest point to the Earth's centre) touches the parking orbit and whose apoapsis (farthest point) touches the geostationary circle. Before the mission team can size the engine burns and plan the tracking passes they need the shape of that ellipse, the speed at both ends, the time from periapsis to apoapsis, and the direction of the velocity at every point. Get the coast time wrong by a minute and the circularisation burn fires in the wrong place; get the flight-path angle wrong and the burn points in the wrong direction.
The mathematics is a single curve described two ways. In polar coordinates with the Earth's centre at the origin, the orbit is , one equation with two numbers. In parametric form the same curve is , position as a function of time, which is what a tracking station sees. This lesson is about moving between those descriptions and doing calculus in each: slopes, arc length, swept area, speed. The payoff is Kepler's second law, which falls out of the polar area formula in two lines and gives the time of flight.
Success criteria, written before we start: the code reproduces the periapsis and apoapsis exactly; the swept area of a full revolution equals to one part in ; the time of one revolution computed by integrating the swept area equals to the same precision; the speed computed from the parametric derivatives equals the energy-based vis-viva speed at every point; and the arc-length integral converges at fourth order so that 64 panels give the perimeter of the transfer ellipse to better than 1 m.
2. Understand and derive
2.1 Polar coordinates and the conic
A point in the plane is or, equally, with , , and (@openstax-calculus-volume-2 §7.3). A curve in polar form is : one function of one variable. In orbital mechanics is called the true anomaly and is measured from the periapsis direction.
A conic section is the set of points whose distance to a fixed point (the focus) is times its distance to a fixed line (the directrix), with the eccentricity (§7.5). Put the focus at the origin and the directrix at (to the left of the focus): the distance to the focus is , the distance to the directrix is , and the definition solves to
The constant is the semi-latus rectum, the radius at ( gives regardless of ), which is why the figure in part 3 draws all four conics with the same : they all pass through the same two points above and below the focus.
The shape depends on alone (@openstax-calculus-volume-2 §7.5):
| curve | range of | ||
|---|---|---|---|
| 0 | circle, | always 1 | all |
| ellipse | always | all; the curve closes | |
| 1 | parabola | as | |
| hyperbola (one branch) | at | $ |
For the denominator reaches zero and : those are the asymptotes, the directions a flyby spacecraft arrives from and departs to. Our code refuses to evaluate (1) at or beyond them rather than returning infinities that would poison a plot.
2.2 Apsides and axes
Assumption 1 (periapsis at ): we measure from the point of closest approach. The denominator of (1) is largest at and smallest at , so for an ellipse
Adding them gives the major axis , hence ; subtracting gives , so the centre of the ellipse sits a distance from the focus. Inverting (2) is how a mission planner starts: from the two radii,
The semi-minor axis is (set in the Cartesian ellipse equation; or see §7.5). For the transfer orbit, km and km:
; km; km; km. The centre of the ellipse is km from the Earth's centre: more than two Earth radii on the far side of the planet. Keep that picture: a transfer ellipse is nothing like a circle with the Earth in the middle.
2.3 The slope of a polar curve: the flight-path angle
A polar curve is a parametric curve with parameter : , . By the chain rule (@openstax-calculus-volume-2 §7.2),
Differentiating (1) with the quotient rule (the numerator is constant, so only the denominator contributes):
Units: metres per radian. at and : the apsides are where the radius stops changing, as the name says. Rather than the slope relative to the axis, orbital mechanics uses the flight-path angle , the angle between the velocity and the local horizontal (the direction perpendicular to ). The velocity's radial component is proportional to and its horizontal component to (one radian of moves the point by metres sideways), so
at both apsides (the velocity is horizontal there, which is why apsis burns are the efficient ones) and positive from periapsis to apoapsis (climbing). At on the transfer orbit, , so .
2.4 Area in polar coordinates, and Kepler's second law
Split the region swept by the radius vector between and into thin sectors of angle . Each is almost a circular sector of radius and area (a circular sector of angle is the fraction of a disc of area ). Summing and letting (@openstax-calculus-volume-2 §7.4):
Units: m² rad = m² (the radian is dimensionless). For a circle, . ✓
Now let depend on time. The rate at which area is swept is, by the chain rule and the fundamental theorem,
Assumption 2 (central force): gravity pulls straight toward the focus, so it exerts no torque about it, and the specific angular momentum (m²/s) is constant. (This is Newton's law applied to a central force; you will prove it with the cross product in P01.07. Here we take it as given.) Then is constant: equal areas in equal times, Kepler's second law, is nothing more than the polar area formula plus conservation of angular momentum. Consequently the time to move from to is
For a conic, and are tied together: , where is the central body's gravitational parameter ( m³/s² for Earth). You will derive this from Newton's law in Phase 09; in this lesson it is the one fact imported from physics, and we check it rather than derive it: with it, the time for a full revolution is , and
which is Kepler's third law. If the code's area integral and (10) disagree, either the integration or the imported is wrong; they agree to , which is one of the tests.
2.5 Arc length in polar and parametric form
For a parametric curve the arc length is (§7.2): the distance travelled is the integral of the speed. With as parameter, and ; square and add, and the cross terms cancel ():
For a circle and . ✓ For an ellipse the integral has no elementary antiderivative; it defines the complete elliptic integral of the second kind, and the perimeter is , which SciPy provides as scipy.special.ellipe. That gives us an independent reference to compare our numerical integration against.
2.6 Speed from the parametric derivatives
Position as a function of time is , with . The velocity components along and across the radius are and (dot = ). Using from assumption 2 and (5):
Both are remarkably simple: the radial speed is a pure sine and the transverse speed a shifted cosine. The speed is the root of the sum of squares:
At periapsis and at apoapsis : with the whole speed is transverse and . For the transfer orbit, m²/s, so m/s and m/s. The spacecraft is six times faster at the bottom of the ellipse than at the top. Sanity check: circular speed in the parking orbit is m/s, so the first burn adds 2425 m/s, the textbook figure for a geostationary transfer injection.
The vis-viva equation comes from energy conservation, a completely different route. At it gives m/s, and (13) gives m/s. Two derivations, one number: the parametric calculus and the energy argument agree at every , which is a test.
2.7 The ellipse as a parametric curve in its own right
An ellipse can also be written without the focus: centred at the origin, , with the parameter (the eccentric anomaly) running from 0 to . Shift the centre so the focus is at the origin ():
Every point of (14) satisfies (1) with ; proving it is Problem 2(d), and the code tests it numerically. The two parameters are different clocks for the same curve: makes the radius simple, makes the time simple (Kepler's equation in the extension). Choosing the parameter is choosing which calculation is easy.
2.8 Where the model stops being valid
- Atmospheric drag. At a 300 km periapsis the air density is about kg/m³; each pass costs a few metres per second over months, lowering apoapsis. Below 150 km the orbit decays within days.
- Earth's oblateness (). The equatorial bulge makes the orbit plane and the periapsis direction precess; for this transfer orbit at 27° inclination the periapsis drifts about 0.6° per day and the node 0.36° per day. The conic is exact only instant by instant.
- Third bodies. A 42 164 km apoapsis is a ninth of the way to the Moon; lunar and solar gravity perturb it at the level per orbit, invisible here, decisive over years.
- Finite burns. We model the transfer as a coast between two impulses; a real burn lasting minutes changes the geometry slightly.
3. Build the computational model
Open starter/main.py. Every function is vectorized over with NumPy and raises ValueError on nonsense input, following P00.03.
Step 1: the conic and its derivative
def conic_radius(theta, p, e):
_check_conic(p, e) # p > 0, e >= 0, both finite
th = np.asarray(theta, dtype=float)
denom = 1.0 + e * np.cos(th)
if np.any(denom <= 0.0):
raise ValueError("theta lies on or beyond the asymptote of an open conic")
r = p / denom
return float(r) if r.ndim == 0 else r
def conic_radius_derivative(theta, p, e):
...
return p * e * np.sin(th) / denom**2 # equation (5)
def true_anomaly_limit(e):
return float(np.pi) if e < 1.0 else float(np.arccos(-1.0 / e))
periapsis_apoapsis, semi_major_axis and conic_from_apsides are equations (2) and (3); polar_to_cartesian and orbit_points turn a grid into arrays for plotting, with orbit_points stopping at 95 % of the asymptote angle for an open conic.
Step 2: composite Simpson's rule
def simpson(f, a, b, n):
if n < 2 or n % 2:
raise ValueError("n must be an even integer >= 2")
x = np.linspace(a, b, n + 1)
y = np.asarray(f(x), dtype=float)
h = (b - a) / n
return float(h / 3.0 * (y[0] + y[-1] + 4.0 * y[1:-1:2].sum() + 2.0 * y[2:-1:2].sum()))
Simpson's rule fits a parabola through each pair of panels; its error is , so halving divides the error by 16 (fourth order). It is exact for cubics, which is the first test. The slice y[1:-1:2] picks the odd-indexed points (weight 4) and y[2:-1:2] the interior even ones (weight 2): no loop, as in P00.03.
Step 3: area, arc length, time
def sector_area(p, e, theta0, theta1, n=400):
return simpson(lambda th: 0.5 * conic_radius(th, p, e) ** 2, theta0, theta1, n) # (7)
def polar_arc_length(p, e, theta0, theta1, n=400):
def integrand(th):
r = conic_radius(th, p, e)
return np.sqrt(r**2 + conic_radius_derivative(th, p, e) ** 2) # (11)
return simpson(integrand, theta0, theta1, n)
def specific_angular_momentum(p, mu=MU_EARTH):
return float(np.sqrt(mu * p))
def time_of_flight(p, e, theta0, theta1, mu=MU_EARTH, n=400):
return 2.0 * sector_area(p, e, theta0, theta1, n) / specific_angular_momentum(p, mu) # (9)
def orbital_period(p, e, mu=MU_EARTH):
a = semi_major_axis(p, e)
return float(2.0 * np.pi * np.sqrt(a**3 / mu)) # (10)
Step 4: velocity from the parametric derivatives
def orbital_speed(theta, p, e, mu=MU_EARTH):
h = specific_angular_momentum(p, mu)
return h / p * np.sqrt(1.0 + 2.0 * e * np.cos(theta) + e**2) # (13)
def vis_viva_speed(r, a, mu=MU_EARTH):
inv_a = 0.0 if np.isinf(a) else 1.0 / a # parabola: a = inf
return np.sqrt(mu * (2.0 / r - inv_a))
def flight_path_angle(theta, e):
return np.arctan2(e * np.sin(theta), 1.0 + e * np.cos(theta)) # (6)
np.arctan2(y, x) instead of np.arctan(y/x) keeps the sign right in every quadrant and never divides by zero. ellipse_parametric is equation (14) and arc_length_convergence measures the Simpson error over against scipy.integrate.quad at relative tolerance.
Verify
Run python -m pytest curriculum/phase-01/lesson-06-parametric-and-polar from the repo root. The tests, in order of how much they would hurt if wrong:
- Limiting cases. gives , , everywhere; gives (escape speed) at every point; has its asymptote at .
- Geometry. , , ; the curve is symmetric about the apse line; the parametric ellipse (14) lies on the polar conic (1) with its centre at .
- Integrals against closed forms. Full swept area ; perimeter ; Simpson exact for a cubic and fourth-order on ; arc length chord.
- Physics identities. from (13) equals vis-viva at 37 angles to ; ; a two-point finite difference of with reproduces the speed to ; the area-integral time of one revolution equals (10); .
- Interface. Invalid , , odd panel counts and angles beyond the asymptote raise
ValueError;main()writes the figure.
Compare
Two library oracles stand in for an "established tool". scipy.special.ellipe(e**2) gives the perimeter km for the transfer ellipse; Simpson with 400 panels gives the same to the metre. scipy.integrate.quad adapts its own panels to a requested tolerance and is the reference for the convergence study. Why not just call quad everywhere? Because quad evaluates the integrand one point at a time in Python, which is a thousand times slower than the vectorized Simpson when a trajectory code needs ten thousand times of flight, and because a fixed rule whose error you understand is easier to trust than an adaptive one whose stopping rule you did not write. main() prints both so you can see them agree:
time periapsis -> apoapsis (Simpson, n=400) = 18990.13 s; Kepler III period / 2 = 18990.13 s
full swept area = 1.287399e+15 m^2; pi a b = 1.287399e+15 m^2
perimeter (Simpson) = 130553.094 km; 4 a E(e^2) = 130553.094 km
Simpson arc-length error over [0, pi/2]: n=8: 2.85e+02 n=16: 1.77e+01 n=32: 1.10e+00 n=64: 6.90e-02 n=128: 4.31e-03
observed orders: [4.01 4. 4. 4. ]
The periapsis-to-apoapsis coast is 18 990 s = 5 h 16 min; half the 10.55 h period, as symmetry demands.
4. Experiment at home, or investigate real data
Mode: computational experiment. No measurement; we study the model's own behaviour.
Experiment A: where does an eccentric orbit spend its time? Split the orbit into the periapsis half () and the apoapsis half. Prediction, written before running: by Kepler's second law the time is proportional to the area swept, and the apoapsis half contains the far, slow part of the ellipse, so its share of the period should rise steeply with . The exact fraction for the periapsis half is (from Kepler's equation; Problem 6 derives it). Run
for ecc in (0.0, 0.1, 0.3, 0.5, 0.7265, 0.9, 0.95):
tp = time_of_flight(p, ecc, -np.pi/2, np.pi/2)
print(ecc, tp / orbital_period(p, ecc))
and tabulate against the prediction. Then answer: for the transfer orbit, what fraction of a tracking pass is near perigee?
Experiment B: how many panels? For the transfer orbit, compute time_of_flight(p, e, 0, np.pi, n=n) for and record the error against . Prediction: fourth-order decay, so each doubling of gains a factor 16, and a 1 s tolerance on a 19 000 s coast ( relative) needs roughly to 32. Repeat for a hyperbola with over , where the integrand grows steeply near the asymptote, and report how many more panels it needs for the same tolerance.
Raw data format: a plain-text table, one row per and one per , kept in your lesson notes.
5. Validate and improve
Put the hand calculation, the code and the independent reference side by side for the transfer orbit:
| quantity | hand (§2) | code | independent reference | difference |
|---|---|---|---|---|
| 0.72654 | 0.726542 | (3) is exact | 0 | |
| (km) | 11 530.1 | 11 530.08 | 0 | |
| (m/s) | 10 151 | 10 151.5 | vis-viva 10 151.5 | relative |
| at 90° (m/s) | 7268 | 7267.7 | vis-viva 7267.7 | relative |
| at 90° | 36.00° | 36.00° | 0 | |
| half period (s) | 18 990 | 18 990.13 (Simpson) | 18 990.13 (Kepler III) | relative |
| perimeter (km) | 130 553.094 | 130 553.094 (ellipe) |
m |
Every residual has a cause. The parametric speed and vis-viva agree to rounding because they are algebraically identical once is substituted: the test checks the implementation, not the physics. The Simpson period agrees with Kepler III to because the integrand is smooth and periodic over a full revolution; Simpson converges far faster than fourth order on a periodic integrand, and the half-period integral from periapsis to apoapsis shares the property because is even about both end points; you will see it in Experiment B as the error dropping from 0.2 s at to s at and hitting rounding by . Over a partial arc the end points break the periodicity and the honest fourth-order rate appears: the convergence table in main() shows orders 4.01, 4.00, 4.00, 4.00. The hyperbola in Experiment B is slower still near its asymptote, where has large derivatives and the fourth-order constant is huge; the order is still 4, the constant is not.
What is still unverified when everything agrees: that . Every number in the time column rests on it, and nothing in this lesson derives it. Agreement between the area integral and Kepler III only proves that the code and the formula share the same . The physics check comes in P01.07 (angular momentum from ) and Phase 09 (the two-body equation of motion).
Improvements worth making: let time_of_flight switch to Kepler's equation for an ellipse (extension), which is exact and needs no panels; return the integration error estimate alongside the value by comparing and (Richardson's idea, P01.05). Improvements worth not making: extrapolating a hyperbola beyond its asymptote by clamping the denominator; the infinite radius is the physics, not a bug.
6. Defend your work
Submit: the completed starter/main.py with all tests passing; conic_orbits.png; the hand calculation for the transfer orbit with its comparison table; the eccentricity-sweep and panel-count tables with one paragraph each; and a one-page note (sections 1, 2, 5, 6 and 7 of projects/_template/report-template.md) stating what the conic model assumes and where it would mislead a mission planner.
Adversarial self-checks
- What if the apoapsis doubles? km gives , km and grows by to 26.8 h, while with grows only 3.6 %. Check with the code: the periapsis speed barely changes, the apoapsis speed halves.
- What if ? What if ? At every formula must reduce to the circle (constant , , ). As the apoapsis and the period go to infinity but , and stay finite: the parabola is the limit of ever-longer ellipses, not a different object.
- Which assumption fails first in the real world? : 0.6° per day of perigee drift is measurable on the first day. Drag at 300 km is next, over weeks. The point-mass Moon matters over months.
- What measurement could falsify the model? Range and range-rate from a tracking station give and ; the conic predicts , a pure sinusoid in . A systematic residual that grows orbit to orbit is a perturbation; one that appears within a single pass is a modelling error.
- Does the result survive a change in panel count? Halving from 400 to 200 must change the half-period by less than s; if it changes by seconds, the integrand is not smooth on your grid (you are too close to an asymptote) or
simpsonhas an indexing slip. - Which decision changes if the uncertainty doubled? Suppose were known to ±2 km instead of ±1 km. changes by s per km, so ±2.3 s instead of ±1.2 s; the apogee burn window is tens of seconds wide, so nothing changes. If were uncertain by ±200 km instead of ±100 km, the circularisation burn itself changes by only 0.2 m/s instead of 0.1 m/s (check it with the code), but the resulting orbit's period is off by min instead of 5 min per day, i.e. the satellite drifts 2.6° per day in longitude instead of 1.3°. The decision that changes is the size of the station-keeping budget, not the transfer. The tolerance is set by the use, not by the geometry.
Check yourself
- In , what is at , and why does it not depend on ?
- An ellipse has . What is its eccentricity?
- Write the polar area formula and say in one sentence why Kepler's second law follows from it when is constant.
- At which two points of an elliptical orbit is the flight-path angle zero, and what is at ?
- Why does
simpsonrequire an even number of panels? - The speed at periapsis of the transfer orbit is 10 151 m/s and km. Without a calculator, what is the speed at apoapsis, km, to two figures?
- For , in which directions does the hyperbola go to infinity?
- The ellipse , and the polar form describe the same curve. Which parameter, or , is the angle seen from the Earth's centre?
Problem set
Attempt every problem before opening solutions/. Record what you tried. State units on every numerical answer and say which results are exact and which are numerical (with the panel count used).
Several problems use your personal seed s: the day of the month you were born (1–31). Use m³/s² and km.
1. (Warm-up: a low Earth orbit from its apsides)
A satellite's periapsis altitude is km and its apoapsis altitude is km.
Find: (a) , and ; (b) the radius at ; (c) the period in minutes; (d) the speed at periapsis and at apoapsis; (e) the largest flight-path angle on the orbit and the true anomaly at which it occurs (derive the condition from equation (6) of the lesson before you compute). Check (a)–(d) with conic_from_apsides, orbital_period and orbital_speed, and (e) with a fine grid of flight_path_angle. Answer form: seven numbers with units, four significant figures, plus the two-line derivation for (e).
2. (Derivation: the conic and its calculus)
(a) Starting from the focus–directrix definition (distance to focus distance to directrix, directrix at ), derive and identify . (b) Derive the polar area formula from a sum of thin sectors, then show that constant implies equal areas in equal times. State where you use that the sector is "almost circular" and why the error vanishes in the limit. (c) From and , derive the speed and show that exactly at the apsides and nowhere else on an ellipse with . (d) Show that every point of , satisfies with and . (Hint: compute first and show .)
Answer form: four derivations with each assumption named where it is used.
3. (Unfamiliar scenario: a weaving ground track)
A survey aircraft flies a sinusoidal track over flat ground: , with m/s, m and a weave period of 20 s ( rad/s).
(a) Find the maximum heading deviation from the axis (the maximum of ) and the maximum and minimum ground speed.
(b) The curvature of a parametric curve is . Find the minimum turning radius and where on the weave it occurs.
(c) Find the lateral acceleration at that point and the load factor of a coordinated turn there.
(d) Use your simpson to compute the ground distance flown in one weave period and compare it with the straight-line distance .
Answer form: six numbers with units; say which are exact and which are numerical.
4. (Numerical, uses your code: a hyperbolic flyby)
A spacecraft approaches Earth on a hyperbola with and periapsis altitude 300 km.
(a) Compute , (negative), the asymptote angle and the total turning angle of the velocity, .
(b) Compute the hyperbolic excess speed and the periapsis speed, and verify (energy conservation).
(c) With time_of_flight, compute the time from to for and report the observed convergence order.
(d) Plot the hyperbola with orbit_points, add the two asymptotes through the centre at (note for and ), and mark periapsis. Save as flyby.png.
Answer form: seven numbers with units, a convergence table with the observed order, one plot.
5. (Judgment: where the conic model stops)
For each of the following say which assumption of the two-body conic fails, estimate the size of the effect with one number, and name one measurable sign in tracking data that it has:
(a) a transfer orbit whose periapsis is at 150 km altitude instead of 300 km (air density at 150 km is roughly kg/m³, at 300 km roughly kg/m³); (b) a polar orbit at 800 km altitude flown for a year (Earth's makes the orbit plane precess at a rate proportional to ); (c) an apoapsis at 200 000 km; (d) a CubeSat deployed from the International Space Station with a 2 m/s separation speed: is its orbit "a different conic" or "the same conic" for mission-planning purposes?
Answer form: four short paragraphs, each with a number and a measurable sign.
6. (Hard: time from the parametric form, Kepler's equation)
The two parameters of §2.7 are linked by , and the time since periapsis is (Kepler's equation; take it as given or derive it from with the parametric ellipse).
(a) Show that the fraction of the period spent in the periapsis half of the orbit () is , and evaluate it for the lesson's transfer orbit (). Compare with time_of_flight.
(b) For the transfer orbit, find the true anomaly at by solving Kepler's equation for with Newton's method (P01.02) starting from ; list the iterates to show quadratic convergence; convert to with . Check by computing time_of_flight(p, e, 0, theta)/T.
(c) Explain in two sentences why time_of_flight needs numerical integration while Kepler's equation does not, and which one you would put inside a trajectory code that calls it a million times.
Answer form: one derivation, one fraction, a Newton table, one angle in degrees, two sentences.
Get the code
Clone the repository once, write your code in starter/main.py, then run the tests from the repository root.
pytest curriculum/phase-01/lesson-06-parametric-and-polar
To run the same tests against the reference solution instead:
AEFS_IMPL=solution pytest curriculum/phase-01/lesson-06-parametric-and-polar
Found a mistake? Every page is built from the Markdown in the repository; edit it on GitHub.