﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
104	Difficulties with libTAI	calvin.harman@…	eugene	"After working with libTAI for the past few days, I've encountered several 
issues which may justify not using it. I've listed problem areas below and 
provided a possible alternative.

1. Cumbersome to install. The make process for libTAI is simple, but the user 
must follow instructions in the INSTALL file after making the library to 
complete installation. These instructions require the user to create a binary 
data file from a text file and copy it to another system directory, and also 
run several tests to insure that the data file is correct version. If the data 
file is incorrect or fails the install tests, you have to find a corrected data 
file on the internet.

2. Untested. The current version of libTAI is an alpha version and has not been 
fully tested. The author states this in the INSTALL file, and even says that 
some code has not been tested at all. 

3. Uncorrelated results. libTAI results don't agree with with International 
Bureau of Weights and Measures (bipm.org) value of TAI time. Using libTAI's 
taia_now() function to get the current TAI time adds 10 sec to the current 
timeval (UTC time) time, which is incorrect. It should add 32 seconds, since 
UTC time currently lags TAI time by 32 seconds. Also, when using the caltime_utc
() function to convert from TAI time to UTC time, the resulting UTC time ends 
up 22 seconds behind current UTC time. 

4. Clock resolution. libTAI can't provide attosecond accuracy. Even though it 
provides a few algorithms for manipulation of an attosecond structure member, 
these do not enter into the mainstream libTAI conversion functions. The taia_now
() function is responsible for calculating initial time values, but currently 
sets attoseconds to zero and also bases the the nanosecond calculation on 
timeval's microseconds value. Since many computer platforms only support timing 
accuracy to microseconds, the attosecond functionality turns out not to be very 
useful. 

5. TAI time changes/jumps occasionally. Every few years TAI time changes to add 
a leap second to UTC time. Predicting when this change occures is not possible, 
since it is based on the Earth's rotation rate and the movement of Earth's 
continental plates. It originally increased by a second every few months, but 
stopped being increased in 1998 when it was determined that the Earth's crust 
was accelerating to compensate for the TAI time offset. If TAI time does 
increase again in the future, it would be the responsibility of individual 
psLib users to locate and install the correct data file with the new leap 
second data.  

Based on what I've learned so far, my recommendation would be to not use 
libTAI. I'd recommend staying with the more standard timeval (UTC) calculation. 
If TAI time is still desired, then a conversion to TAI time could be created, 
which simply adds 32 seconds to UTC time. If TAI time jumps to 33 seconds in 
the future, users would simply change a constant and recompile, as opposed to 
going through the libTAI configuration process."	defect	closed	high		IPP SDRS	unspecified	normal	fixed		
