TimeString.cpp File Reference

#include "TimeString.hpp"
#include "ANSITime.hpp"
#include "CivilTime.hpp"
#include "GPSWeekSecond.hpp"
#include "GPSWeekZcount.hpp"
#include "JulianDate.hpp"
#include "MJD.hpp"
#include "UnixTime.hpp"
#include "YDSTime.hpp"
#include "TimeConverters.hpp"
#include "TimeConstants.hpp"

Include dependency graph for TimeString.cpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  gpstk

Functions

std::string printTime (const CommonTime &t, const std::string &fmt) throw ( gpstk::StringUtils::StringException )
 The TimeTag classes are the "interface" for CommonTime, so when printing a CommonTime object, each of the TimeTag printf() functions are called to handle the print identifiers that it recognizes.
void scanTime (TimeTag &btime, const std::string &str, const std::string &fmt) throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
 Fill the TimeTag object btime with time information found in string str formatted according to string fmt.
void scanTime (CommonTime &t, const std::string &str, const std::string &fmt) throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
void mixedScanTime (CommonTime &t, const std::string &str, const std::string &fmt) throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
 This function is like the other scanTime functions except that it allows mixed time formats.


Function Documentation

void mixedScanTime CommonTime &  t,
const std::string &  str,
const std::string &  fmt
throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
 

This function is like the other scanTime functions except that it allows mixed time formats.

i.e. Year / 10-bit GPS week / seconds-of-week The time formats are filled in the following order: GPS Epoch, year, month, GPS Full Week, GPS 10-bit Week, day-of-week, day-of-month, day-of-year, 29-bit Zcount, 19-bit Zcount, hour, minute, second-of-week, second-of-day, second-of-minute.

Note:
MJD, Julian Date, ANSI time, Unix time, and 32-bit Zcount are treated as stand-alone types and are not mixed with others if detected.

Definition at line 364 of file TimeString.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asLongDouble(), GPSWeekZcount::convertToCommonTime(), CivilTime::convertToCommonTime(), YDSTime::convertToCommonTime(), GPSWeekSecond::convertToCommonTime(), UnixTime::convertToCommonTime(), CivilTime::day, YDSTime::doy, gpstk::StringUtils::firstWord(), GPSTK_RETHROW, CivilTime::hour, gpstk::StringUtils::isLike(), gpstk::StringUtils::lowerCase(), CivilTime::minute, CivilTime::month, CivilTime::second, GPSWeek::setEpoch(), UnixTime::setFromInfo(), GPSWeek::setWeek10(), GPSWeekZcount::setZcount29(), YDSTime::sod, GPSWeekSecond::sow, GPSWeek::week, YDSTime::year, and GPSWeekZcount::zcount.

Referenced by FileSpec::extractCommonTime().

std::string printTime const CommonTime &  t,
const std::string &  fmt
throw ( gpstk::StringUtils::StringException )
 

The TimeTag classes are the "interface" for CommonTime, so when printing a CommonTime object, each of the TimeTag printf() functions are called to handle the print identifiers that it recognizes.

The following is a list of these identifiers and the meaning for each:

  • ANSITime:
    • K integer seconds since Unix Epoch (00:00, Jan 1, 1970 UTC)

  • CivilTime:
    • Y integer 4-digit year
    • y integer 2-digit year
    • m integer month
    • b abbreviated month name string (e.g. "Jan")
    • B full month name string (e.g. "January")
    • d integer day-of-month
    • H integer hour-of-day
    • M integer minute-of-hour
    • S integer second-of-minute
    • f float second-of-minute

  • GPSWeek:
    • E integer GPS Epoch
    • F integer full (13-bit) GPS Week
    • G integer 10-bit GPS Week

  • GPSWeekSecond:
    • w integer GPS day-of-week
    • g float GPS second-of-week

  • GPSWeekZcount:
    • w integer GPS day-of-week
    • z integer GPS Z-count
    • Z integer GPS Z-count
    • c integer 29-bit Z-count
    • C integer 32-bit Z-count

  • MJD:
    • Q float Modified Julian Date

  • UnixTime:
    • U integer seconds since Unix Epoch (00:00, Jan 1, 1970 UTC)
    • u integer microseconds

  • YDSTime:
    • Y integer 4-digit year
    • y integer 2-digit year
    • j integer day-of-year
    • s integer second-of-day

  • Common Identifiers:

Definition at line 43 of file TimeString.cpp.

References GPSTK_RETHROW.

Referenced by GPSOrbElemStore::addOrbElem(), computePolarTides(), computeSolidEarthTides(), PRSolution::configString(), GDCPass::createSegment(), GDCPass::deleteSegment(), GDCPass::detectObviousSlips(), GDCPass::detectWLslips(), GDCPass::detectWLsmallSlips(), TabularSatStore< ClockRecord >::dump(), SatPass::dump(), RinexClockData::dump(), Rinex3ObsHeader::dump(), Rinex3ObsData::dump(), Rinex3NavData::dump(), PackedNavBits::dump(), MDPSelftestStatus::dump(), MDPHeader::dump(), GPSOrbElemStore::dump(), GPSEphemerisStore::dump(), GloEphemerisStore::dump(), GalEphemerisStore::dump(), EOPStore::dump(), AntexData::dump(), Dumper::Dumper(), TabularSatStore< ClockRecord >::dumpInterval(), SVExclusionList::dumpList(), GDCPass::dumpSegments(), OrbElemRinex::dumpTerse(), OrbElemLNav::dumpTerse(), OrbElemICE::dumpTerse(), EngEphemeris::dumpTerse(), GDCPass::EstimateGFslipFix(), GDCPass::finish(), GDCPass::foundGFoutlier(), GDCPass::foundGFsmallSlip(), GDCPass::foundWLsmallSlip(), SVExclusionList::getApplicableExclusion(), SVNumXRef::getNAVSTAR(), SVNumXRef::getPRNID(), TabularSatStore< ClockRecord >::getTableInterval(), TabularSatStore< ClockRecord >::getTableInterval_old(), WxObsData::getWxObservation(), GDCPass::GFslipFix(), gpstk::operator<<(), PRSolution::outputCLKString(), PRSolution::outputNAVString(), PRSolution::outputPOSString(), PRSolution::outputRMSString(), PRSolution::PreparePRSolution(), GDCPass::preprocess(), Epoch::printf(), SolarSystem::readASCIIdata(), PlanetEphemeris::readASCIIdata(), SMODFData::reallyPutRecord(), RinexClockHeader::reallyPutRecord(), RinexClockData::reallyPutRecord(), Rinex3NavHeader::reallyPutRecord(), Dumper::setPrintTime(), PRSolution::SimplePRSolution(), SatPass::smooth(), OrbElem::timeDisplay(), FileSpec::toString(), TimeNamedFileStream::updateFileName(), GDCPass::WLconsistencyCheck(), GDCPass::WLsigmaStrip(), GDCPass::WLslipFix(), GDCPass::WLstatSweep(), and Rinex3ObsHeader::WriteHeaderRecords().

void scanTime CommonTime &  t,
const std::string &  str,
const std::string &  fmt
throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
 

Definition at line 105 of file TimeString.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::convertSODtoTime(), gpstk::convertTimeToSOD(), UnixTime::convertToCommonTime(), ANSITime::convertToCommonTime(), JulianDate::convertToCommonTime(), MJD::convertToCommonTime(), GPSWeekSecond::convertToCommonTime(), GPSWeekZcount::convertToCommonTime(), YDSTime::convertToCommonTime(), CivilTime::convertToCommonTime(), gpstk::StringUtils::firstWord(), GPSTK_RETHROW, GPSTK_THROW, CivilTime::hour, gpstk::StringUtils::isLike(), gpstk::StringUtils::lowerCase(), CivilTime::minute, CivilTime::second, UnixTime::setFromInfo(), ANSITime::setFromInfo(), JulianDate::setFromInfo(), MJD::setFromInfo(), GPSWeekSecond::setFromInfo(), GPSWeekZcount::setFromInfo(), YDSTime::setFromInfo(), CivilTime::setFromInfo(), YDSTime::sod, and GPSWeekSecond::sow.

Referenced by Test::otherTest(), and gpstk::scanTime().

void scanTime TimeTag &  btime,
const std::string &  str,
const std::string &  fmt
throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException )
 

Fill the TimeTag object btime with time information found in string str formatted according to string fmt.

Definition at line 71 of file TimeString.cpp.

References GPSTK_RETHROW, and gpstk::scanTime().

Referenced by SVExclusionList::addFile(), CommandOptionWithTimeArg::checkArguments(), CommandOptionWithCommonTimeArg::checkArguments(), and Epoch::scanf().


Generated on Fri May 24 03:31:33 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1