bhagolblog

Screen time · Dhruv Banhatti

The engine under the brands

Most astrology apps do not compute the planets. They quote a Swiss library that compresses a NASA ephemeris, and their famous disagreements were added on top.

Two ways in. The gist assumes you have never met any of this before.

A page from an old printed book, photographed flat, taller than it is wide, the paper aged to a pale cream. At the top centre is the page number 95, and under it a single ruled line and a heading in italic type reading 'Table du Temps moyen au Midy vray, pour le Meridien de Paris'. Below that the page is divided by vertical rules into six narrow columns. The left half is headed 'May.' and the right half 'Juin.', each with a column of day numbers running 1 to 31 and 1 to 30, a wide column of times set out under the letters H. M. S., and a narrow outer column of differences in seconds. Two of the column headings are printed sideways, running up the page. Down the middle of the page, between the two halves, runs a vertical band of small repeated printer's flower ornaments. At the foot of the page, below the ruled table, are two short entries of type: on the left, set over two lines, 'Tarde 0' 57";' and '& avance 1 12 and a half', and on the right a single line, 'Avance 5' 46":'. There is no illustration anywhere on the page.
Table du temps moyen au midi vrai, page 95 of La Connaissance des temps for 1709, compiled by Jacques Lieutaud, Paris. Bibliothèque nationale de France (Gallica) via Wikimedia Commons, Public Domain.

The Swiss Ephemeris ships with a licence file of under four hundred words, and that file offers the developer who uses it two choices and no third. The first is the GNU Affero General Public License, which carries the obligation to place the whole of the surrounding project under that licence or one compatible with it: your source becomes public because ours is. The second is the Swiss Ephemeris Professional Licence, which means paying Astrodienst, the Zurich firm that publishes the library, and signing a contract. The file says the choice must be made before the software is handed to anyone else, and, in its own words, "before any public service using the developed software is activated". That clause is the one that bites now, because astrology software is mostly a service you connect to rather than an object you are given. A company that wants to keep its source closed pays. A company willing to open its source does not. Which door a company walked through is a fact about the product on your phone, and it was decided before the first screen was drawn.

Two other conditions sit in the same file. The copyright notices must be preserved on all copies. And the names of the authors, Dieter Koch and Alois Treindl, must not be used to promote any software, product or service that contains the library; the notice itself is the only place those names may legally appear. Read those two together and you get something unusual. The licence forbids the advertisement and requires the credit. So the most honest document about an astrology app is not on its marketing page. It is in a text file that the app is obliged to carry and nobody is obliged to read.

That file has an address on your own phone, and it is worth knowing where. Because the copyright notices must be preserved on all copies, an app carrying the library owes you the notice somewhere, and the somewhere is usually a page called About, or Credits, or Open Source Licences, two or three taps deep in Settings. Open it on whatever you use. If it names the library, you now know what is under the product, and you can go and read the same documentation its developers read, because all of it is published. If it names something else, that is informative too, and the rest of this piece is why.

Step back one link, because a great many apps never touch the library at all. There is a small trade in chart APIs: you send a birth date, a clock time and a place to somebody else's server, and you get back a chart as structured data, sometimes with a drawn wheel attached. The vendors of these services advertise the calculation engine by name, because naming it is the proof of quality. I cannot tell you what share of the market is built this way, and anyone who quotes you a percentage is guessing. What is checkable is the shape of the thing. An app that buys its charts ships no ephemeris of its own, and two products you think of as rivals can be two covers over one supplier.

Step back again, to the library itself. Astrodienst is blunt about what it is selling: not a product for end users, it says, but a toolset for programmers to build into their astrological software. It holds a stated precision target of 0.001 arcseconds and covers the years 13201 BC to AD 17191. It is not, though, the source of the planets. It is a compression. Underneath sits a JPL Development Ephemeris, one of the numbered planetary and lunar files that NASA's Jet Propulsion Laboratory produces, and the original of that file takes 2,788 Mb of disk. The compressed version is 27 Mb for the planets and 70 Mb for the moon, 97 Mb altogether, and it keeps the target precision through the squeeze. That number is the whole reason any of this is on a phone.

The version history is short enough to hold in your head. The first release, in 1997, was built on DE405/406. From release 2.00 in February 2014 it was built on DE431. The published data files were rebuilt on DE441 in April 2026, which is the date on the source repository's own notes, and Astrodienst's page dates the release built on them from May 2026; the rebuilt files stay compatible with releases going back to March 2005. So the underlying sky in a large part of this industry has changed twice since 1997, on a schedule set in Zurich, and no user of any of these products was ever told.

One more step back, and then I will stop, because the derivation belongs to Meghnad and not to me. DE440 and its long-span twin DE441 were built by fitting integrated orbits to decades of observation from the ground and from spacecraft, Juno at Jupiter and Cassini at Saturn among them. The fit is published as Chebyshev polynomials covering intervals of about 32 days.

That is the descent. It reads as a stack of file formats, which is what it is, but it is worth running once in the other direction, at ordinary human speed, because the other direction is the one you are standing at the end of.

A radio signal leaves a dish on earth, reaches a spacecraft in orbit around Jupiter, and comes back, and somebody times the round trip. That timing joins years of other timings, and the whole set is fitted to an integrated orbit. The orbit is written out as polynomials in blocks of 32 days. The polynomials are compressed into a file of 97 Mb. A phone, or more likely a rented server in somebody's data centre, opens that file, converts the result into the coordinates astrology uses, and passes the numbers to an app. The app formats them. At about 9 in the morning, a sentence appears on a screen telling somebody what sort of week to expect. Every step of that chain up to the last one is public, documented and checkable by anybody with an afternoon. The last step is none of those things.

Which brings me to the point I actually wanted, and it is an inversion of what most readers assume. When two apps hand you different moon signs, they are almost never disagreeing about where the moon was. Underneath, to the third decimal of a degree, they are very likely quoting the same number, because they are quoting the same file. What they disagree about is everything laid on top of that number, and all of it is a setting somebody chose.

Take the three that cause the most argument. The published header file of the library defines 47 predefined values for the ayanāṁśa (अयनांश), the offset between the two ways of starting the zodiac, plus a slot for a forty-eighth of your own; that argument is Meghnad's, and he has worked it through. The function that reports the name of a house system answers to 25 letter codes and quietly treats every other letter as Placidus, which means a developer who sets nothing has still chosen; Meghnad has set four of them against one birth moment. And sunrise, which decides which day a tithi belongs to, is governed by a named constant in the same header, SE_BIT_HINDU_RISING, which is three other flags folded into one: take the centre of the sun's disc rather than its upper edge, ignore refraction, ignore the body's ecliptic latitude. An entire convention about when a day begins, packaged as a constant a programmer either sets or does not.

The daśā (दशा) table is not in the library at all. Nor is the reading. Those are written by the app, on top of the shared numbers, by whoever the app employs.

So the visible variety of this market is a variety of defaults. Colour, voice, price, personality, a mascot, a tone that is either soothing or rude, and beneath all of it somebody picked one of 47, and one of about 25, and decided whether to set a flag. Those are preferences, and most of them are defensible preferences with long histories behind them. They are also invisible. No interface I have seen tells you which ones were taken, and none of them is a secret; they are simply not mentioned.

Which leaves the licence file as the frankest thing any of these products carries. It makes no claim about the software it travels with. It names two people who wrote the arithmetic, forbids anybody to sell with their names, and insists on riding along in every copy, so that a company which has been coy about everything else has still shipped one candid paragraph, two or three taps deep, in a typeface nobody chose.

Under that paragraph is a dish on earth timing a radio signal to a spacecraft at Jupiter, and the fitted orbit, and the polynomials, and the 97 Mb. Above it is a flag somebody either set or did not. Both are in your pocket. Only one of them is a preference, and it is not the one that came back from Jupiter.