example1.cpp

Demonstrates the most basic properties of DayTime.

#pragma ident "$Id: example1.cpp 1895 2009-05-12 19:34:29Z afarris $"

//============================================================================
//
//  This file is part of GPSTk, the GPS Toolkit.
//
//  The GPSTk is free software; you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published
//  by the Free Software Foundation; either version 2.1 of the License, or
//  any later version.
//
//  The GPSTk is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with GPSTk; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
//  Copyright 2009, The University of Texas at Austin
//
//============================================================================

#include <iostream>
#include "DayTime.hpp"

using namespace std;
using namespace gpstk;

int main(int argc, char* argv[])
{

   try {
      
      DayTime time;

      cout << "Hello world!" << endl;
      cout << "   The current GPS week is " << time.GPSfullweek() << endl;
      cout << "   The day of the GPS week is " << time.GPSday() << endl;
      cout << "   The seconds of the GPS week is " << time.GPSsecond() << endl;

   }
   catch( Exception error)
   {
      cout << error << endl;
      exit(-1);
   }

   exit(0);
}

Generated on Wed Feb 8 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1