#ifndef _GPSUTILS_H
#define _GPSUTILS_H

#include "GpsIF.h"
#include "Exception.h"


class GpsUtils {

public:

  ///////////////////////////////////////////////////////////////////////
  // Character representation corresponding to GpsIF::Hemisphere 
  // enumerated value
  static char hemisphere(GpsIF::Hemisphere hem)
    throw (Exception);

  ///////////////////////////////////////////////////////////////////////
  // GpsIF::Hemisphere enumerated value corresponding to character
  // representation.
  static GpsIF::Hemisphere hemisphere(char hem)
    throw (Exception);

  ///////////////////////////////////////////////////////////////////////
  // Parse Gps fix from NMEA "GGA sentence".
  // Return 0 on success, -1 on error
  static void parseFix(const char *ggaSentence, GpsIF::Fix *fix)
    throw (Exception);

  ///////////////////////////////////////////////////////////////////////
  // Parse latitude in radians from NMEA standard latitude string
  static double latitude(const char *nmeaString);

  ///////////////////////////////////////////////////////////////////////
  // Parse longitude in radians from NMEA standard longitude string
  static double longitude(const char *nmeaString);

  ///////////////////////////////////////////////////////////////////////
  // Print latitude in "dd mm.xx" format. (Input in radians)
  static char *latitude(double degrees);

  ///////////////////////////////////////////////////////////////////////
  // Print longitude in "ddd mm.xx" format. (Input in radians)
  static char *longitude(double degrees);


};


#endif
