Skip to content
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

Add time info to travel behavior activity #1002

Merged
merged 2 commits into from
Jul 15, 2019

Conversation

cagryInside
Copy link
Contributor

Timestamps are added to transition events. For each transition event we collect the following timestamps:
(A) -> TransitEvent.elapsedRealtimeNanos() ,
(B) -> SystemClock.elapsedRealtimeNanos(),
(C) -> System.currentTimeMillis(), and
(D) -> (C) - (A) = number of nanoseconds in the past when the event happened.

The data looks like the following in Firebase:

Screen Shot 2019-07-14 at 2 02 19 PM

@barbeau
Copy link
Member

barbeau commented Jul 15, 2019

@cagryInside Thanks for implementing this! So, I made a mistake in the original Google drawing describing this, which I've corrected here:
https://docs.google.com/drawings/d/1AHvO62fClfBOfXmfUGWUltg8hnjkXitohq4FYq1quho/edit?usp=sharing

Here's the correct version:

(A) -> event.elapsedRealtimeNanos() ,
(B) -> SystemClock.elapsedRealtimeNanos(),
(C) -> System.currentTimeMillis(), and
(D) -> (B) - (A) = number of nanoseconds in the past when the event happened.
(E) -> (C) - (D) = Clock time (milliseconds past epoch) when transition happened

I've changed the implementation to match this (including the new field "(E)" in bc27281, but could you please review to confirm I got it right?

I also changed the field name from "transitEventElapsed..." to just "eventElapsed", as it's shorter and a better description of the data (again, my fault from not correctly the text in the diagram).

@barbeau barbeau force-pushed the travelBheaviorTimeExtension branch from bc27281 to f2377e3 Compare July 15, 2019 16:39
@barbeau
Copy link
Member

barbeau commented Jul 15, 2019

Sorry, I just rebased it to get rid of other unrelated changes, new commit of mine is f2377e3

@barbeau barbeau merged commit 2ef1d76 into OneBusAway:master Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants