Efficiently transferring to a much higher orbit

The most efficient maneuver for transferring from one circular orbit to another circular orbit of roughly the same size is the Hohmann transfer orbit. It requires two burns: one to leave the initial circular orbit into an elliptical orbit, and another to leave the elliptic orbit for the new circular orbit.

If the new orbit is much larger than the original, it can be more efficient to do three burns, inserting two elliptical orbits between the two circular orbits.

In the graph below, the Hohmann transfer orbit moves a satellite from the blue circle to the green circle via the orange ellipse. The orange ellipse fits inside the green circle. The bi-elliptic transfer maneuver replaces the orange ellipse with two half ellipses, both of which extend far beyond the green circle [1].

Hohmann transfer orbit

The dashed curve completes the ellipse but isn’t part of the orbit.

Below is a graph of a bi-elliptic transfer orbit where the radius of the outer circle is 13 times larger than the inner circle and the distance from the furthest point on the ellipse to the center of the circles is 50 times the radius of the inner circle. This is the orbit described in footnote [1].

The meaning of the dotted orange curve is different in this plot. Now it is part of the orbit.

The abrupt change in curvature is at the furthest point of the elliptical orbits is striking, but I believe the graph is correct.

I tried to compare the plot above with other sources. None of my reference books include a plot. When I searched online, I found examples where the two circular orbits are roughly the same size, which defeats the point of the bi-elliptic transfer orbit. Perhaps this was done for aesthetic reasons, but it is not realistic.

Related posts

[1] How far is “far” is a matter of efficiency. A bi-elliptic transfer orbit could extend slightly outside the target circular orbit, but in this case the maneuver would be less efficient than the Hohmann transfer. To move from one circular orbit to another with a radius 13 times greater, the apogee of the transfer ellipses would have to be about 50 times larger than the radius of the inner circular orbit.

The bi-elliptical transfer orbit need not extend past the outer circle at all. It could just kiss the target circular orbit, in which case it reduces to the Hohmann transfer orbit, i.e. the Hohmann transfer orbit is a special case of the bi-elliptic transfer orbit.

Rotating MacBook keys

Shortly after I started using a MacBook I remapped the keys so that they function the same way on Mac OS, Windows, and Linux. The key in the lower left corner, for example, behaves the same way across operating systems, as does the key to the left of the space bar.

Note that I’m going by key behavior and not key name. I go into more detail in my post on cross-platform muscle memory.

It’s been two and a half years since I remapped the keys, and it works well for me. The same keystrokes do the same thing whether I’m on my MacBook laptop or my Linux desktop.

The only drawback is that I’m confused when read documentation telling me how to do something on a Mac. When I see something using the key, I have to ask myself which key that corresponds to on my machine. I’m writing this post in hopes that it will help me memorize how my mappings relate to the original keys.

Here’s a diagram of how I have rotated my keys.

command to fn to option to command

So, for example, if I want to make text bold, I hold down the key in the lower left corner and type b. On my MacBook that key is labeled with a globe and on my Linux box it is labeled Ctrl. But I don’t look at the keys and don’t care what they’re labeled.

I also swapped the Caps Lock and what Mac calls the control key , but I mostly use the big control key only in Emacs. As I noted in the earlier article, Mac essentially has one Windows-like control key (labeled ) and one Emacs-like control key (labeled control).

 

 

Asymmetric generation / verification costs

We tend to think that the effort required to generate a solution and verify a solution are roughly equal, assuming that you need to retrace the generation steps to verify that they are correct. But sometimes verification can be far easier than generation [1].

Factoring

For example, suppose I generate two 1000-digit prime numbers, multiply them together, and ask you to recover the two primes by factoring. It takes a split second to verify whether you’ve found the solution, but finding the solution is practically impossible. The security of the internet depends on this fact. (See posts on RSA encryption here.)

Generative AI

Generative AI is notoriously unreliable. But if it’s far easier to verify a solution than to generate it, it’s OK if an AI solution is unreliable. We’ve had several consulting projects lately that amount to evaluating how well an LLM did what it was supposed to do. The LLMs aren’t perfect—no one expected that they would be—but the tasks is to estimate whether the error rate is acceptable.

Differential equations

George Pólya once said “In order to solve a differential equation you look at it till a solution occurs to you.” He was only half joking. Differential equations courses present solution techniques without justification [2], but the solutions can be justified even if they techniques cannot: stick the solution in to the equation and see whether it works.

Finding primes

For the last 70 years, the largest known prime has been a Mersenne prime, with one exception [3]. This is because there is a way to test whether Mersenne numbers are prime that is more efficient than general numbers.

It takes a lot of computation to prove that a large number is prime, but it is possible to produce a certificate of primality that can be quickly verified. One form of primality certificate is Pratt certificates and another kind is elliptic curve primality certificates.

Optimization

Some optimization problems, such as linear programming or more generally convex optimization, produce certificates that verify that a solution is optimal. Maybe the solution was found on a beefy computer but could be verified on a phone.

Lack of solution

It’s typically easier to prove a solution exists than to prove a solution does not exist. You can prove a solution exists by finding one. This may not be easy to do but easy to verify. Certifying that a problem as no solution is more difficult—how do you know whether you’ve looked hard enough?—but sometimes you can produce a certificate of infeasibility.

Footnotes

[1] The question of whether P = NP asks whether in some sense it is possible to efficiently compute solutions to a large class of problems whose solutions can be verified efficiently [4].

[2] The solution techniques can be justified, though not at the level of mathematics students have when taking an introductory differential equations course.

[3] In 1989 the largest known prime was 391581 × 2216193 − 1.

[4] Can a footnote have a footnote? Sure, why not. The P = NP problem asks whether a problem that can be verified in polynomial time can be solved in polynomial time. But if you didn’t already know this, you probably won’t find this description satisfying. It’s kinda subtle, and I won’t add a footnote to a footnote of a footnote.

Dogecoin anthem

Rocket with Dogecoin mascot

Someone sent me an AI-generated Dogecoin anthem: To Da Moon.

Here’s the audio.

 

And here are the lyrics:

Yo, it started as a joke, now we in the game,
Dogecoin rocket, yeah, remember the name.
Crypto vibes, makin’ history soon,
Strapped to the rocket, we’re goin’ to the moon.

Elon on the tweets, got the memes in check,
Shiba Inu power, cashin’ every check.
From the hodlers to the dreamers, we makin’ it right,
Dogecoin anthem, light up the night.

(Chorus)
Doge to da moon, ya, Doge to da moon
To da moooooooooon
Diamond hands brotha
All aboard the rocket, Doge to da moon!

(Verse 2)
Started at a penny, now it’s hittin’ big heights,
Laughin’ to the bank while we flexin’ the lights.
They said it was a phase, but we changin’ the game,
Shoutout to the legends who believed in the name.

Blockchain movin’, decentralize the power,
Crypto revolution, it’s our finest hour.
From the traders to the hodlers, shout it real loud,
Doge Army strong, and we bringin’ the crowd.

(Chorus)
Doge to da moon, ya, Doge to da moon
To da moooooooooon
Diamond hands brotha
All aboard the rocket, Doge to da moon!
All aboard the rocket, Doge to the moon.

[instrumental]

[vocoder]

The Department of Government Efficiency
is coming for your bureaucracy,
No more waste don’t ya see?

(Bridge)
It’s not just a coin, it’s a vibe, it’s a culture,
Crypto rebel spirit, yeah, we ridin’ like vultures.
From the charts to the memes, we hittin’ the tune,
Dogecoin anthem, it’s our lunar commune.

(Chorus)
Doge to da moon, ya, Doge to da moon
To da moooooooooon
Diamond hands brotha
All aboard the rocket, Doge to da moon!

(Outro)
Moonshot dreams, yeah, the future is bright,
Crypto revolution, takin’ flight tonight.
Dogecoin forever, yeah, we’ll never be through,
42 42 42 42 42 42 forty-twooooooo

Blogging pace

When I started this blog, almost 17 years ago, I posted nearly every day. The first time I went a couple days without posting I got a message from someone asking if everything was OK.

I’ve slowed down since then, and even more lately. Last week I was busy with professional work, and this week I’ve been busy with personal work.

I’ve never had a schedule for this blog: I write when I feel like writing, which usually means several times a week. I’ve averaged 3 posts every 4 days since I started writing here. Presumably I’ll pick back up next week. We’ll see.

If you’d like to be notified when I write something here, you have several options. You could subscribe via RSS to hear of every post as soon as it is published. If you’d rather get a notification of a few posts at a time, along with a little introduction to each, you could subscribe to my newsletter.

You can also follow me on social media, primarily X but also Mastodon and Bluesky.

Confidential OCR

A client emailed me a screenshot of a table rather than pasting the table as text into an email.

I thought about using an LLM to convert it to text, but the table is confidential client information and so I shouldn’t upload it anywhere.

I searched for a command line utility to do OCR and found tesseract. I installed it with

    sudo apt install tesseract-ocr libtesseract-dev tesseract-ocr-eng

and ran it with the default settings

    tesseract screenshot.png textfile

It worked remarkably well. I had to change a C to a U, but otherwise I didn’t have to add or change any text, but I did have to delete a few extraneous parentheses generated by the software.

I work locally in part out of habit; it was the only way to work when I started using a computer. It has numerous advantages, such as being able to keep working when a hurricane knocks out my internet connection, but above all it is private.

I pay more attention to privacy than is convenient because I work in data privacy. And aside from my privacy, I have to protect our clients’ privacy.

Update: According to the comments, ChatGPT uses tesseract. Assuming that’s true, using tesseract directly is better than ChatGPT because it does exactly what you want. No ambiguity as far as what expected. No potential for tinkering with your results before you see them.

Related posts

Perfect numbers

A perfect number is a positive integer equal to the sum of its proper divisors, all divisors less than itself. The first three examples are as follows.

6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248

Even and odd perfect numbers

Every known perfect number is even. No one has proved that odd perfect numbers don’t exist, but people keep proving properties than an odd perfect number must have, and maybe some day this list of properties will contain a contradiction, proving that such numbers don’t exist. For example, an odd perfect number, if it exists, must have over 1,500 digits.

Mersenne primes

A Mersenne prime is a prime number of the form 2p− 1. Euclid proved that if M is a Mersenne prime, then M(M + 1)/2 is an even perfect number [1]. Leonhard Euler proved the converse of Euclid’s theorem two millennia later: all even perfect numbers have the form M(M + 1)/2 where M is a Mersenne prime.

There are currently 52 known Mersenne primes. The number of Mersenne primes is conjectured to be infinite, and the Mersenne primes discovered so far have roughly fit the projected distribution of such primes, so there is reason to suspect that there are infinitely many perfect numbers. There are at least 52.

Triangular numbers

By Euler’s theorem, all even perfect numbers have the form M(M + 1)/2 , and so all even perfect numbers are triangular numbers.

P = 1 + 2 + 3 + … + M

Binary numbers

Even perfect numbers have the form 2p−1(2p − 1), and so this means all perfect numbers when written in binary consist of p ones followed by p − 1 zeros.

For example,

496 = 31 × 32 / 2 = 24(25 − 1)

and 496 = 111110000two, five ones followed by four zeros.

Related posts

[1] Euclid didn’t use the term “Mersenne prime” because he lived 17 centuries before Marin Mersenne, but he did prove that if 2p − 1 is prime, then 2p−1(2p − 1) is perfect.

Food and Grace

RKF Jr eating fast food

I stumbled on a post on X this morning, a commentary on the photo of RFK eating food from McDonalds that has been making the rounds.

This photo divides Puritans from Southerners.

Puritans think because RFK Jr is on the side of health food he can never commit such a “sin.”

Southerners think a rare treat is fine & it’s more important to be gracious in a gathering than to be a stickler.

I can’t read minds, and so I don’t know what RFK’s motives were, but I do believe the post is right about Southern graciousness. Of course this disposition is not limited to the South, nor does everyone in the South live this way.

A puritanical mindset, more typical of metaphorical Puritans than literal Puritans, is flat: all virtues are equally important. A gracious mindset is hierarchical: some virtues take precedent over others. And in a traditional Southern mindset, not offending hosts or guests has high priority.

Bluesky account

Bluesky logo

I’ve had a Bluesky account for over a year, but never posted much on it. Recently I noticed I’d gotten more followers on Bluesky and thought I might try posting there more often.

I am not moving to Bluesky. I have orders of magnitude more followers on X than on Bluesky and so I will focus my effort on X. But I expect to post on Bluesky occasionally.

I learned this morning that there is a bridge that will automatically post your Mastodon content to Bluesky. You should be able to follow

johndcook.mathstodon.xyz.ap.brid.gy

on Bluesky to see the content that I post on my Mastodon account at

johndcook.mathstodon.xyz

Note the server is mathstodon, not mastodon.

It may take some time before the bridge works. I suppose information needs to be propagated analogous to how DNS works. At the time of writing, I can see the bridge account by going to the Bluesky page for the bridge, but I’ve not yet been able to pull up the account in the Bluesky app.

Update: The bridge account is working from the Bluesky app. I’ve posted two articles to Mastodon and verified that they appear in the bridge account.

Just to be clear, we’re talking about two separate Bluesky accounts. My Bluesky account is

johndcook.bsky.social

but my Mastodon posts will be automatically posted to a separate account,

johndcook.mathstodon.xyz.ap.brid.gy.

The mathematics of GPS

The basic idea of GPS is that if you know the distance to several satellites, you can figure out your position. But you don’t actually know, or need to know, the distance to the satellites: you know the time (according to each satellite’s clock) when the signals were sent, and you know the time (according to your clock) when the signals arrived.

The atomic clocks on satellites are synchronized with each other to within a nanosecond, but they’re not synchronized with your clock. There is some offset t between your clock and the satellites’ clocks. Presumably t is small, but it matters.

If you observe m satellites, you have a system of m equations in 4 unknowns:

|| aix || = tit

where ai is the known position of the ith satellite in 3 dimensions, x is the observer’s position in three dimensions, and ti is the difference between the time when the signal left the ith satellite (according to its clock) and the time when the signal arrived (according to the observer’s clock). This assumes we choose units so that the speed of light is c = 1.

So we have a system of m equations in 4 unknowns. It’s plausible there could be a unique solution provided m = 4. However, this is not guaranteed.

Here’s an example to suggest why there may not be a unique solution. Suppose t is known to be 0. Then observing 3 satellites will give us 3 equations in 3 unknowns. Each ti determines a sphere of radius ti. Suppose two spheres intersect in a circle, and the third sphere intersects this circle in two points. This means we have two solutions to our system of equations.

In [1] the authors thoroughly study the solution to the GPS system of equations. They allow the satellites and the observer to be anywhere in space and look for conditions under which the system has a unique solution. In practice, GPS satellites are approximately confined to a sphere (more on that here) and the observer is also approximately confined to a sphere, namely the earth’s surface, but the authors do not take advantage of these assumptions.

The authors also assume the problem is formulated in n dimensional space, where n does not necessarily equal 3. It’s complicated to state when the system of equations has a unique solution, but allowing n to vary does not add to the complexity.

I’m curious whether there are practical uses for the GPS problem when n > 3. There are numerous practical problems involving the intersections of spheres in higher dimensions, where the dimensions are not Euclidean spacial dimensions but rather abstract degrees of freedom. But off hand I cannot think of a problem that would involve the time offset that GPS location finding has.

[1] Mireille Boutin, Gregor Kemperc. Global positioning: The uniqueness question and a new solution method. Advances in Applied Mathematics 160 (2024)