struct tmx

R

Richard Tobin

Richard Heathfield said:
If we assume a satellite to be, say, 10m long (when stationary
relative to the earth, say at pre-launch), then at 3000km/s (still
relative to the earth) it will be approximately 9.9995 metres long
- that is, it will have contracted by about half a millimetre.
That's easily measurable with modern instruments.

How easy is it when the satellite is moving at 3000km/s relative to
the modern instrument?

-- Richard
 
J

James Kuyper

Richard said:
How easy is it when the satellite is moving at 3000km/s relative to
the modern instrument?

Not at all easy, particularly when you consider that launch stresses
might have compressed the instrument.

It's easier to measure the time difference than the length difference,
and satellites have been launched for that precise purpose. These are
satellites in low earth orbit, moving a whole lot slower than 3000km/s,
and the effect is still measurable (with state-of-the-art instruments).
 
D

David Thompson

If you mean how are leap seconds used in precision timekeeping,
wikipedia is pretty good on the subject; especially (IMO) the links to
USNO and Markus Kuhn.

If you mean how would C programs use them (assuming they aren't
eliminated) I'm not sure anyone knows yet.

The two main systems that distribute time widely and precisely enough
for this to be an issue are GPS (and I believe the other similar
satnav systems) and NTP. GPS internally uses modified TAI (no leaps)
and carries an information-only offset to UTC (with leaps). NTP can
specify impending leap in the protocol, accepted from some reference
clocks like GPS or a file created from IERS bulletin C data, but it
executes it by just changing the clock as for any phase hit.

or in http://www.open-std.org/jtc1/sc22/wg14/www/docs/
1997-09-23; apparently it was intended for C99, but it wasn't
accepted. (I'd love to see better time zone handling in standard C.)

The existing struct tm does allow for leap seconds, by making the
"normal range" of the tm_sec member of struct tm [0,60] rather than
[0,59], but it doesn't say much else about them. The time() function
is generally going to give you the current time as computed by the
underlying system.

Hi Keith,

I guess the list of new features Im looking at was based on a draft and
not the final standard then? Hmm.
I recall that this -- at least some version of it -- was in at least
one fairly late draft, but it was taken back out by n897 (and the
adopted version). While looking at the various drafts (and working
papers) can be interesting, if you want to know what actually is in,
either get the actual standard (USD30 last I checked from the ANSI
webstore for individual-use pdf) + corrigenda, or n1256 which is the
'starting' C1x draft which consists of C99 + corrigenda.
What do you think are the main problems with time zones? The gmtime and
localtime seem to have it pretty well dealt with AFAICS. I dont really
know what the issue is with leap seconds but I dont think its something
youd need to worry about every day.
Not every day indeed. In practice currently once every few years, and
possibly up to twice a year during our lifetime(s). Barring serious
damage to or disturbance of the Earth, in which case C time
computation will not be our first concern. <G>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top