4 ms·
One of the interesting corner cases of leap second is in traffic enforcement. It you are building section control traffic enforcement system, you measure the t1
by debarshri 5y ago
One of the interesting corner cases of leap second is in traffic enforcement. It you are building section control traffic enforcement system, you measure the t1 at point on entry and t2 at exist. Because of you know the length of a section , distance over time difference becomes your speed. But when you have leap second, you might just get a fine for driving at jet-fuelled speed on your grandpa's car.
- adrianN 5y agoI really hope that traffic enforcement systems don't use timers that know the date.
- debarshri 5y agoIt is not just for timer, as part of evidence you also have to capture when that event occurred. There it does capture the date.
- q3k 5y agoYou should record the event time separately [1] from the beginning/end of the measurement period - the first as a time instant in UTC ('wall clock'), the latter as a difference between two values of a guaranteed monotonically increasing clock. This is something you need to do regardless of leap seconds to handle things like NTP kicking in to adjust your local wall clock time. [1] - Depending on the programming environment, these might be either different timestamp types recorded separately or converted appropriately to reflect different uses, or a smart combination type like time.Time in Go.
- Faaak 5y agoSupposing the speed-controlled road spans 1km, then if you go at 100km/hour, it will take you 36s: You have: 1km/(100km/hour) You want: s * 36 With a second less, your speed would be miscalculated to: You have: 1km/(36s - 1s) You want: km/hour * 102.85714 So not really something to worry about
- seanc 5y agoUnless the road span in question is a 10m intersection. Now if you went through at 30km/hour it took you 1.2s, but lose that second and now you went through at 180 km/hr. Go through at 60km/hour and you left the intersection before you entered it. Does that mean the government owes you the fine?
- foxhill 5y ago> Does that mean the government owes you the fine? no it just means the fine is immediately overdue :)
- foxhill 5y agoin the UK, speed traps (that aren't "average speed check" traps) operate over a distance of ~10-30 meters, depending on the road's speed. that second is very important.