Skip to content

Question on tai to utc conversion #99

@timweckx

Description

@timweckx

In eraTaiutc, there is an iteration block that calls back to eraUtctai to get the leap seconds deltas. In the iteration, the deltas for both arguments are added to the 2nd argument. Should the first delta be applied to the first argument?

/* Iterate (though in most cases just once is enough). */
   for ( i = 0; i < 3; i++ ) {

   /* Guessed UTC to TAI. */
      j = eraUtctai(u1, u2, &g1, &g2);
      if ( j < 0 ) return j;

   /* Adjust guessed UTC. */
      u2 += a1 - g1;    --> should this be u1 += a1 - g1
      u2 += a2 - g2;
   }

In practice, I think the first delta is always zero so it doesn't affect the actual values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions