[amsat-bb] Re: use of PI in amsat development practice

Bruce Robertson ve9qrp at gmail.com
Sun Mar 14 12:24:46 PDT 2010

On Sun, Mar 14, 2010 at 1:22 PM, Samudra Haque <samudra.haque at gmail.com> wrote:
> Hi, Pi-Day is today (3/14/2010) also we just sprang forward by 1 hour.
> (http://www.cnn.com/2010/TECH/03/12/pi.day.math/index.html?hpt=C2) and
> apparently it's also Einsteins Birthday!
> (http://en.wikipedia.org/wiki/Albert_Einstein)
> Wow a lot of key dates here.
> My question is: in amateur satellite design/planning how many
> significant digits are used to calculate the value of pi? Is there a
> significant difference in results between (4 decimal poinits) and (3
> decimal points).

What an interesting question! As many of you know, I'm having fun
porting the G3RUH's Plan13 algorithm to the Atmel platform. One of the
first things you want to be able to do in programs like this is to
convert degrees to radians; and that means pi.

In the appropriate header pi is defined thus:
#define M_PI 3.141592653589793238462643
But I use 4-bit precision floating values. (This platform *can* use
8-bit, but because it is Harvard architecture, I come pretty close to
killing my stack if I do 8-bit math with the 2kB SRAM.)
With this ruby oneliner, I can see the resulting bytes:
>> [3.141592653589793238462643]].pack("f").each_byte {|c| print c.to_s(16), ' '}
db f 49 40
(This is using the ruby command-line interpreter 'irb').
By paring off numbers from the end, I can see that the my code is
actually using roughly the following decimal value:

The resulting accuracy can be attested in this (previously posted)
video, beginning at about 1:30

Here's something people might not know about the letter pi. It is
closely related in ancient Greek to the letter 'phi'. While, we (at
least the Western European 'we') pronounce phi as an 'ffff', in
ancient Greek it was a 'p' sound with a bit of a puff of air after it,
'p' + 'huh'. There was a similar relationship in Greek between kappa
and chi.

73, Bruce


> In professional space missions, such as NASA, what is the practice
> with regards to use of Pi ? Are there any published standards?
> Using Excel, is there any way to generate a large range of pi ?
> -samudra N3RDX
> _______________________________________________
> Sent via AMSAT-BB at amsat.org. Opinions expressed are those of the author.
> Not an AMSAT-NA member? Join now to support the amateur satellite program!
> Subscription settings: http://amsat.org/mailman/listinfo/amsat-bb

More information about the AMSAT-BB mailing list