I searched, since you didn't provide a link, for "nmea library arduino".
First hit: http://www.maartenlamers.com/nmea/
which contains this note:
Arduino Users
This library was developed for Wiring boards, the more powerful predecessor of Arduino. I do not have an Arduino board, so I could not test it, but I heard reports that Arduino's do not have enough memory. It runs fine on Wiring boards.
Based on my NMEA library, Mikal Hart created TinyGPS for Arduino. It does not contain the "distance_to" and "course_to" functions, however.
You don't have a Wiring board, do you?
Downloading the library anyway, and installing it in the proper place, the code in your link still fails to compile, because the library is NOT compatible with 1.0+ versions of the IDE.
Changing WConstants.h and WProgram.h in the header and source files to Arduino.h does allow the sketch to compile.
Your code, on the other hand won't compile. Even when you fix the obvious errors, you aren't writing math equations here. To determine if a value is in a range, you need to do two completely disjoint tests, not one combined test: