Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Date.h File Reference

Classes for date and time manipulation. More...

#include <SimData/Archive.h>
#include <SimData/Exception.h>
#include <SimData/BaseType.h>

Go to the source code of this file.

Compounds

class  Date
 Date class for YMD and julian dates. More...

class  DateZulu
 Class combining time and date operations. More...

class  SimDate
 Class for representing dates and times within the simulation. More...

class  Zulu
 Time of day in "zulu" time (i.e. More...


Defines

#define SIMDATA_F1p0_60p0   0.016666666666666667L
#define SIMDATA_F1p0_24p0   0.041666666666666667L
#define SIMDATA_F1p0_36525p0   0.000027378507871321L
#define SIMDATA_F1p0_86400p0   0.000011574074074074L

Typedefs

typedef double radian_t
typedef double degree_t
typedef double timing_t
typedef int sint32
typedef short sint16
typedef unsigned char uint08
typedef DateZulu::time_t SimTime
 Simution time (seconds).


Functions

void tstart (void)
 Start the timer.

void tend (void)
 Stop the timer.

double tval ()
 Get the time interval (in seconds) between last calls to tstart() and tend().

timing_t get_realtime ()
 Return the current time in seconds.

 SIMDATA_EXCEPTION (InvalidDate)
 Exception thrown by the Date class when invalid dates are detected.


Detailed Description

Classes for date and time manipulation.

Classes for date and time manipulation.

Date: Generic date class storing YMD and julian days

Zulu: Very simple time class storing seconds since midnight as a float. Rollover functions are provided to integrate with the Date class. Time is ZULU (UTC), with an optional TZ field that can be used to adjust for the local timezone.

DateZulu: This class simply combines Date and Zulu, implementing date/time rollover. Some astronical time routines, such as MST (GMST/LMST) are implemented.

SimTime: This is nothing more than a typedef to the internal time storage type used by Zulu (currently float).

SimDate: This class combines DateZulu and BaseType so that date and time can be serialized to and from data archives. A simple parsing function for XML cdata streams is also implemented.


Define Documentation

#define SIMDATA_F1p0_24p0   0.041666666666666667L
 

#define SIMDATA_F1p0_36525p0   0.000027378507871321L
 

#define SIMDATA_F1p0_60p0   0.016666666666666667L
 

#define SIMDATA_F1p0_86400p0   0.000011574074074074L
 


Typedef Documentation

typedef double degree_t
 

typedef double radian_t
 

typedef DateZulu::time_t SimTime
 

Simution time (seconds).

SimTime is not actually a class, but just a floating point type that stores seconds since midnight.

typedef short sint16
 

typedef int sint32
 

typedef double timing_t
 

typedef unsigned char uint08
 


Function Documentation

timing_t get_realtime  
 

Return the current time in seconds.

The offset is platform dependent, so do not use this value for absolute time.

SIMDATA_EXCEPTION InvalidDate   
 

Exception thrown by the Date class when invalid dates are detected.

void tend void   
 

Stop the timer.

void tstart void   
 

Start the timer.

double tval  
 

Get the time interval (in seconds) between last calls to tstart() and tend().

The precision should be about 1-2 ms on most platforms.


SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:39 2003, using Doxygen 1.2.18.

[SF.net]