Skip to content

Time Classes

jonesg5 edited this page Sep 12, 2014 · 3 revisions

There are 4 custom classes related to time in this toolbox and they are:

absolutetime

The class absolutime creates an object that has the date and time in several useful formats. In addition to storing the time in several different systems it also stores it in UTC and in local. In order to be able to convert between UTC and local time absolutetime also contains a utcoffset object. For speed the whole time array should be stored within a single object of absolutetime, as opposed to having an array of objects, this allows the conversion between formats to be vectorized. If the offset of local time from UTC is constant it can be given to absolutetime as a single value and it will be converted to an array.

utcoffset

The class utcoffset is designed specifically to support the conversion between UTC and local time within the absolutetime class. As such a utcoffset contains the offset from UTC as an array the size of the time array. An object of utcoffset contains the offset in several different units to speed conversion.

relativetime

The class relativetime contains just that, the time relative to a given starting point. Like absolutetime the object should contain the whole time array to speed conversion between different units. An object of relativetime also contains a singular instance of an absolutetime object as the starting point that is referenced.

samplingrate

Unlike the other time classes samplingrate represents a singular value, since most data logging devices are set to record at one specific interval. Knowing this interval or epoch is useful for several different analyses. A samplingrate object contains the epoch in several useful units.

Clone this wiki locally