[Xastir-dev] src/util.c
Derrick J Brashear
shadow at dementia.org
Wed Mar 31 23:36:54 EST 2004
On Wed, 31 Mar 2004, Derrick J Brashear wrote:
> if you extend the precision of the seconds by one, shouldn't you also be
> dividing the number you add into centi_sec by 10?
e.g. the diff is:
+
+ // Keep the next digit as well, as it resolves to 0.6 of a
+ // 1/100 sec resolution. Two counts here make one count in
+ // the Xastir coordinate system.
+ if ( (!isdigit((int)n[3]))
+ && (n[3] != '\0') )
+ n[3] = '0'; // extend low precision
+
+ n[4] = '\0'; // Make sure substring is terminated
+
centi_sec += atoi(n)*6;
and i think that last line should be
centi_sec += atoi(n)*0.6
yes?
More information about the Xastir-dev
mailing list