-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agree on minimal set of parameters for fixed time programs #5
Comments
Parameters have been split into region/controller/intersection/program. Parameteres for fixes time program is in: |
Define the cycle length. |
Is offset part a a fixe time program, or is that a controller parameter that's outside the program? |
I added cycle length as a parameter. |
Offset should be a parameter of the signal program. Usually is. There can be an option to dynamically set the offset if there is a need later. Historically there are multiple absolute cycle time sources (second of the day, month, year, etc.) New system should not copy obsolete solutions - let us have just one. CTX = Cycle time within the signal program CTX = (Timestamp + Offset) % CL |
Good idea to define this, although UTC is used for timestamps in RSMP. Unix time differs from UTC in the handling of leap seconds: |
What we need is a global counter of seconds. Traditional methods use the number of seconds between a fixed point in time (day, month, year, arbitrary date). To my knowledge they all disregard leap seconds. (That does not mean that the system itself should not support handling of leap seconds.) Using Unix time allows us to have a widely available integer counter to use for synchronization. The main benefit is that the relationship between UTC are already well defined and understood. Occurrence of a leap second will cause a coordinated signal program to fall out of synchronization (just like any other clock synchronization) and a need to synchronize again. All the traditional methods would be affected the same. A way around this would be to use something like TAI (https://en.wikipedia.org/wiki/International_Atomic_Time), but I think it is not worth the effort. |
A global counter implies syncronization, and the de facto standard to handle this is NTP. UTC also handles leap seconds, although in a different way than Unix time. Would it not be easier to use UTC, since all RSMP timestamp are in UTC already? |
Since, as you point out, we need a second counter, that is in effect unix time, which is defined as "the number of non-leap seconds which have passed since 00:00:00 UTC on Thursday, 1 January 1970". The handling of leap-seconds is a bit tricky, but can be managed as you suggest. So I think we agree :-) |
Yes, it is a synchronization mechanism. I believe we are talking about different synchronization mechanisms on a different level and for a different purpose. The controller clock is running in UTC and there are multiple different methods of synchronization. |
I agree Unix time is a simple and well-defined way to get a second counter from the UTC time that controllers use. When a leap second occurs, Unix time jumps forward or backwards one seconds. We can handled like we otherwise handle changes in offset, as you mention above. |
No description provided.
The text was updated successfully, but these errors were encountered: