« Back to documentation index 
    
TinyGPS Class Reference 
TinyGPS  - a small GPS  library for Arduino providing basic NMEA parsing Copyright (C) 2008-9 Mikal Hart All rights reserved.  
More... 
#include <TinyGPS.h >
  TinyGPS  ()  Create a new GPS  parsing object for parsing NMEA sentences.   bool  encode  (char c)  Parse a single character received from GPS .   TinyGPS  & operator<<  (char c)  Shorthand operator for encode()    void  get_position  (long *latitude, long *longitude, unsigned long *fix_age=0)  Return lat/long in hundred thousandths of a degree and age of fix in milliseconds.   void  get_datetime  (unsigned long *date, unsigned long *time, unsigned long *fix_age=0)  Return the date and time from the parsed NMEA sentences.   long  altitude  ()  signed altitude in centimeters (from GPGGA sentence)   unsigned long  course  ()  course in last full GPRMC sentence in 100th of a degree   unsigned long  speed  ()  speed in last full GPRMC sentence in 100ths of a knot   unsigned long  sat_count  ()  number of satellites tracked in last full GPGGA sentence   void  f_get_position  (double *latitude, double *longitude, unsigned long *fix_age=0)  returns position as double precision   void  crack_datetime  (int *year, byte *month, byte *day, byte *hour, byte *minute, byte *second, byte *hundredths=0, unsigned long *fix_age=0)  Convert date and time of last parsed sentence to integers.   double  f_altitude  ()  returns altitude as a float   double  f_course  ()  returns course as a float   double  f_speed_knots  ()  returns speed in knots as a float   double  f_speed_mph  ()  returns speed in mph as a float   double  f_speed_mps  ()  returns speed in meters per second as a float   double  f_speed_kmph  ()  returns speed in km per hour as a float   double  f_hdop  ()  returns hdop as a float   bool  ready  ()  determine if all sentences parsed   bool  gsv_ready  ()  determine if GSV sentence parsed since last reset_ready()    void  reset_ready  ()  Reset the ready flags for all the parsed sentences.   static int  library_version  ()
Detailed Description 
TinyGPS  - a small GPS  library for Arduino providing basic NMEA parsing Copyright (C) 2008-9 Mikal Hart All rights reserved. 
Modified by Michael Shimniok 
Definition at line 41  of file TinyGPS.h .
Constructor & Destructor Documentation 
Create a new GPS  parsing object for parsing NMEA sentences. 
Definition at line 29  of file TinyGPS.cpp .
 
 
Member Function Documentation 
signed altitude in centimeters (from GPGGA sentence) 
Returns: altitude in centimeters, integer  Definition at line 90  of file TinyGPS.h .
 
 
course in last full GPRMC sentence in 100th of a degree 
Returns: course as an integer, 100ths of a degree  Definition at line 95  of file TinyGPS.h .
 
 
      
        
          void crack_datetime  
          ( 
          int *  
           year ,  
         
        
          byte *  
           month ,  
         
        
          byte *  
           day ,  
         
        
          byte *  
           hour ,  
         
        
          byte *  
           minute ,  
         
        
          byte *  
           second ,  
         
        
          byte *  
           hundredths  = 0,  
         
        
          unsigned long *  
           fix_age  = 0  
         
        
          ) 
           
      
 
Convert date and time of last parsed sentence to integers. 
Returns: year  
month  
day of month  
hour  
minute  
second  
hundreths  
fix_age in milliseconds if available  Definition at line 142  of file TinyGPS.h .
 
 
Parse a single character received from GPS . 
Parameters: 
  
    c is the character received from the GPS   
   
Returns: true if processing ok  Definition at line 63  of file TinyGPS.cpp .
 
 
returns altitude as a float 
Definition at line 162  of file TinyGPS.h .
 
 
returns course as a float 
Definition at line 166  of file TinyGPS.h .
 
 
      
        
          void f_get_position  
          ( 
          double *  
           latitude ,  
         
        
          double *  
           longitude ,  
         
        
          unsigned long *  
           fix_age  = 0  
         
        
          ) 
           
      
 
returns position as double precision 
Returns: latitude as double precision  
longitude as double precision  
fix age in milliseconds if available  Definition at line 122  of file TinyGPS.h .
 
 
returns hdop as a float 
Definition at line 186  of file TinyGPS.h .
 
 
returns speed in km per hour as a float 
Definition at line 182  of file TinyGPS.h .
 
 
returns speed in knots as a float 
Definition at line 170  of file TinyGPS.h .
 
 
returns speed in mph as a float 
Definition at line 174  of file TinyGPS.h .
 
 
returns speed in meters per second as a float 
Definition at line 178  of file TinyGPS.h .
 
 
      
        
          void get_datetime  
          ( 
          unsigned long *  
           date ,  
         
        
          unsigned long *  
           time ,  
         
        
          unsigned long *  
           fix_age  = 0  
         
        
          ) 
           
      
 
Return the date and time from the parsed NMEA sentences. 
Returns: date as an integer value  
time as an integer value  
fix_age in milliseconds if available  Definition at line 79  of file TinyGPS.h .
 
 
      
        
          void get_position  
          ( 
          long *  
           latitude ,  
         
        
          long *  
           longitude ,  
         
        
          unsigned long *  
           fix_age  = 0  
         
        
          ) 
           
      
 
Return lat/long in hundred thousandths of a degree and age of fix in milliseconds. 
Returns: latitude is the latitude of the most recent fix that was parsed  
longitude is the longitude of the most recent fix that was parsed  
fix_age is the age of the fix (if available from the NMEA sentences being parsed)  Definition at line 65  of file TinyGPS.h .
 
 
      
        
          static int library_version  
          ( 
           ) 
           [static] 
      
 
Returns: library version  Definition at line 190  of file TinyGPS.h .
 
 
determine if all sentences parsed 
Definition at line 195  of file TinyGPS.h .
 
 
Reset the ready flags for all the parsed sentences. 
Definition at line 207  of file TinyGPS.h .
 
 
      
        
          unsigned long sat_count  
          ( 
          void  
           ) 
           
      
 
number of satellites tracked in last full GPGGA sentence 
Returns: number of satellites tracked  Definition at line 110  of file TinyGPS.h .
 
 
speed in last full GPRMC sentence in 100ths of a knot 
Returns: speed in 100ths of a knot  Definition at line 100  of file TinyGPS.h .