34 bool units_init(
const char* sProgName);
38 extern const char* UNIT_US2000;
39 extern const char* UNIT_MJ1958;
40 extern const char* UNIT_T2000;
41 extern const char* UNIT_T1970;
42 extern const char* UNIT_NS1970;
43 extern const char* UNIT_UTC;
49 extern const char* UNIT_TT2000;
52 extern const char* UNIT_SECONDS;
53 extern const char* UNIT_HOURS;
54 extern const char* UNIT_DAYS;
55 extern const char* UNIT_MILLISECONDS;
56 extern const char* UNIT_MICROSECONDS;
57 extern const char* UNIT_NANOSECONDS;
59 extern const char* UNIT_HERTZ;
60 extern const char* UNIT_KILO_HERTZ;
61 extern const char* UNIT_MEGA_HERTZ;
62 extern const char* UNIT_E_SPECDENS;
63 extern const char* UNIT_B_SPECDENS;
64 extern const char* UNIT_NT;
66 extern const char* UNIT_NUMBER_DENS;
68 extern const char* UNIT_DB;
70 extern const char* UNIT_KM;
72 extern const char* UNIT_EV;
74 extern const char* UNIT_DEGREES;
75 extern const char* UNIT_DIMENSIONLESS;
153 DAS_API
das_units Units_fromStr(
const char*
string);
162 DAS_API
const char* Units_toStr(
das_units unit);
395 DAS_API
int Units_getJulianDay(
double timeDouble,
das_units epoch_units );
const char * das_units
Handle SI and other units, with accommodations for Epoch systems, from units.h.
Definition: units.h:139
Basic date-time structure used throughout the Das1 & Das2 utilities.
Definition: time.h:43
DAS_API double Units_convertTo(das_units toUnits, double rVal, das_units fromUnits)
Generic unit conversion utility.
DAS_API das_units Units_invert(das_units unit)
Invert the units, most commonly used for Fourier transform results.
DAS_API das_units Units_reduce(das_units orig, double *pFactor)
Reduce arbitrary units to the most basic know representation.
DAS_API double Units_convertFromDt(das_units epoch_units, const das_time *pDt)
Convert a calendar representation of a time to value in time offset units.
DAS_API das_units Units_root(das_units unit, int root)
Reduce units to a root.
DAS_API bool Units_canConvert(das_units fromUnits, das_units toUnits)
Determine if given units are interchangeable Though not as good a solution as using UDUNITS2 works fo...
DAS_API das_units Units_divide(das_units a, das_units b)
Combine units via division.
DAS_API bool Units_haveCalRep(das_units unit)
Determine if the units in question can be converted to date-times.
DAS_API bool Units_canMerge(das_units left, int op, das_units right)
Determine if the units of values in a binary expression are compatible.
DAS_API das_units Units_power(das_units unit, int power)
Raise units to a power.
DAS_API void Units_convertToDt(das_time *pDt, double value, das_units epoch_units)
Convert a value in time offset units to a calendar representation.
DAS_API char * Units_toLabel(das_units unit, char *sBuf, int nLen)
Get label string representation das_units.
DAS_API das_units Units_interval(das_units unit)
Get the unit type for intervals between data points of a given unit type.
DAS_API das_units Units_multiply(das_units ut1, das_units ut2)
Combine units via multiplication.
DAS_API double Units_secondsSinceMidnight(double rVal, das_units epoch_units)
Get seconds since midnight for some value of an epoch time unit.