How Many Digits of Pi Does NASA Use? (kottke.org)
An anonymous reader quotes an article on Kottke.org: Mathematicians have calculated pi out to more than 13 trillion decimal places, a calculation that took 208 days. NASA's Marc Rayman explains that in order to send out probes and slingshot them accurately throughout the solar system, NASA needs to use only 15 decimal places. Rayman explains, "The most distant spacecraft from Earth is Voyager 1. It is about 12.5 billion miles away. Let's say we have a circle with a radius of exactly that size (or 25 billion miles in diameter) and we want to calculate the circumference, which is pi times the radius times 2. Using pi rounded to the 15th decimal, as I gave above, that comes out to a little more than 78 billion miles. We don't need to be concerned here with exactly what the value is (you can multiply it out if you like) but rather what the error in the value is by not using more digits of pi. In other words, by cutting pi off at the 15th decimal point, we would calculate a circumference for that circle that is very slightly off. It turns out that our calculated circumference of the 25 billion mile diameter circle would be wrong by 1.5 inches. Think about that. We have a circle more than 78 billion miles around, and our calculation of that distance would be off by perhaps less than the length of your little finger."
How many digits to use depends on the application. For a satellite trajectory the 15th decimal is OK, but if you want to make a sharp mirror the precision in the calculation have to be higher.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
The NASA computers will be using IEEE 754 floating point format, which in 64 bits (double precision) yields about 16 decimal digits of precision. So: what came first, NASA deciding that 1.5 inches the needed accuracy in the solar system or their computers being that accurate being deemed an acceptable accuracy ?
I don't know why any of these "numbers of digits" things are surprising to anyone.
When you calculate a circumference, for example, you're just multiplying pi by some other number. You're not going to need more precision in pi than you have in the number of orders of magnitude of precision in the other number.
So, all of these discussions about "how many digits of pi" actually just are asking "how many order of magnitude" of length or whatever are in various sizes/comparisons within the universe.
It's really not necessary to bring pi into this discussion at all. It's just talking about precision of measurement and orders of magnitude in general.
It seems to me that these answer would only be interesting/surprising to those who have no understanding of "significant figures" in calculations. (Unfortunately, that seems to apply to most people and students, who will assume that however many digits their calculator or whatever spits out are meaningful.)
Duh... What?!? Reference, please??? What hardware constant built into the FPU?
Pi is built in to x86s. You can load it into a register with the FLDPI instruction. It is built in to many other processors as well. Using it will give you the maximum precision, and will be faster to execute since it uses less bandwidth and cache.
If you plug that number into an iterative algorithm that uses any ill-conditioned functions, the 1.5-inch error can grow exponentially at every step. Ensuring that computations have acceptable error margins is an extremely complex and tricky subject.
Maybe using SI units rather than neolithic ones would be more important than the number of digits of pi for NASA.
Mmm, infinite pie.
systemd is Roko's Basilisk.
When tracking something in space and time, the coordinate system should never matter (it just makes the mathematical model easier or harder). You should have instead time tagged the state information. Then when the other platform received the state information, it extrapolates the state information to current time before using [displaying] it. The only requirement here is that your two platforms agree on the time to a high [enough] precision. While this is not a simple problem, it is well understood. Search for Kalman filtering and Sensor fusion for more information (advanced knowledge of signal processing is typically a perquisite).
In sensor fusion you typical track in ECEF or LLA even though you will most commonly detect/search in LTP.