GFC

Geodesy Foundation Classes

This is Release 1, 21 May 97


Click here to download the latest version of GFC.

Update 2005-05-10

I've been working on a C# version of GFC. You can download it here.

Description

What is GFC (Geodesy Foundation Classes)? It is a set of C++ classes that makes distance calculations easy. It answers these fundamental questions:

How GFC Got Started

"Dream big and dare to fail!"
Col. Norman Vaughn, after climbing Mt. Vaughn in Antartica on his 89th birthday

In late March 1997, I began to ask the question "How far is it from here to there?" I did not realize how insidiously difficult this question was to answer. Like any geek worth his weight in salt, I began to surf Internet for other souls who may have asked (and hopefully answered) this same question. I soon happened upon source code for doing these calculations. I finally settled on Fortran code at NOAA since traffic on the newsgroups seemed to say this was the most accurate of the programs. Not knowing Fortran, I began to read the code. I then found out about something called an ellipsoid. Not having any math since Algebra in high school, I started doing some research and came to the same conclusion as Barbie, "Math is hard."

Now that I was onto this ellipsoid thing, I started reading my wife's calculus, trigonometry and engineering mathematics textbooks. Did you ever see the "Darmok" Star Trek: The Next Generation episode? This is where Picard and the captain (named Dathon) of an alien vessel are on a planet together but can't understand each other even though they understand every word each other says. Dathon kept saying "Darmok and Jilad at Tenagara!" which thoroughly confused Picard. I am firmly convinced the writer of this episode got the idea after getting into a conversation with two mathematicians. Not being one to let a little ignorance get in the way of progress, I hit the books and pestered many non-ignorant people with lots of questions. Slowly (and painfully) I began to understand what was going on. As Dathon would say, "Sucat, his eyes uncovered!" GFC is the sum total of what I have learned. As I learn more I will add it to GFC. When you look at the source code, if a variable name is not a word, it is something I don't understand (yet).

Credits

Many many thanks go to Peter H. Dana (pdana@mail.utexas.edu) for educating me on parts I did not understand. To learn more about Geodesy, I highly recommend his Coordinate Systems Overview page as a starting point.

Thanks to LCDR L. Pfeifer and John G. Gergen for writing the Fortran programs that made GFC possible. And thanks to NOAA for putting their source code in Internet.

The Classes

These are the classes that make up the GFC library:
CEarth
Holds the parameters of the reference ellipsoid and allows you to perform all calculations.
CEarthCoordinate
Holds the X, Y and Z coordinates. This is also known as Earth-Centered-Earth-Fixed (ECEF) or cartesian coordinates.
CPolarCoordinate
Holds a coordinate represented as two angles and distance from the surface of the earth.

Pricing

How much does GFC cost? Nothing. Yep, that's right, GFC is freeware. Use it any way you like as long as you don't try to sell it. Please let me know of bugs or extensions so I can roll them into the next release. Feel free to tell me some good news too!

Sam Blackburn

Internet: sam_blackburn@pobox.com
Return to Sam's Home Page