Not sure if anyone else uses Ruby, but I just whipped up a quick'n'dirty
wrapper that might be useful: https://gist.github.com/762761
Can anyone confirm that whether the adherence seconds needs to be added
or subtracted from the scheduled seconds?
Cheers,
Jonathan
My field testing suggests that negative "adherence" represents
"lateness". Therefore subtraction if you're telling the user an
absolute arrival time.
Even following this rule, I still see "arriving in -5 minutes"
sometimes. This /might/ be due to octranspo's clock skew, so I'd like
confirmation of this from the octranspo implementors.
--
karfai [AT] gmail.com
http://www.strangeware.ca
http://blog.strangeware.ca
I followed a bus I was on yesterday using a stop further down the
route. The driver seemed to either stop or drive slow any time the
number went over about -60 or so... Less than 60 seconds and it seemed
to be business as usual.
Not sure if you were doing that polling over the last week, but something to consider is that the buses (and streets) were ridiculously empty last week. I've never seen drivers deliberately drive slowly before, so perhaps the next weeks data will show different results once people get back to work.
Another thing I noticed. My bus came early this morning and after I got on, it just sat there for 30s of so. I refreshed the page and the ETA came up as -20sec and the entry disappeared once we got goin. So perhaps the negative ETA numbers are indicating wait time before the bus moves on??
I don't know that we can completely solve this issue via observation.
Whatever clock that octranspo uses for these timings doesn't seem to
be in sync with the NTP and carrier sync'd clocks I've been using for
field testing. Best I can observe, their time source is a minute or
two later than mine. This means that either a positive or negative
adherence could place the final time between my source and their's.
Therefore an "early" adherence (which ever sign is valid) could appear
"late" by the reckoning of the device I'm using.
Who ever has contact with the implementors should ask them which
direction the sign indicates in the feed. This way, we'll know for
certain.
For now, I'm going with Darren's conclusions since a snowy day
/should/ make the bus "late" from both time perspectives.
Don/
This e-mail originates from the City of Ottawa e-mail system. Any
distribution, use or copying of this e-mail or the information it
contains by other than the intended recipient(s) is unauthorized.
If you are not the intended recipient, please notify me at the
telephone number shown above or by return e-mail and delete
this communication and any copy immediately. Thank you.
Le pr�sent courriel a �t� exp�di� par le syst�me de courriels de
la Ville d'Ottawa. Toute distribution, utilisation ou
reproduction du courriel ou des renseignements qui s'y trouvent
par une personne autre que son destinataire pr�vu est interdite.
Si vous avez re�u le message par erreur, veuillez m'en aviser par
t�l�phone (au num�ro pr�cit�) ou par courriel, puis supprimer
sans d�lai la version originale de la communication ainsi que
toutes ses copies. Je vous remercie de votre collaboration.
That'd be awesome, thanks. There was some question that the actual
devices on the buses might not be in sync with this time source. Will
this new API produce the "official time" at octranspo? That is, will
it be in sync with the other octranspo services like the planner on
the website?
I try hard not to be pedantic, but I think it's important in this case.
Based upon what I have read, the buses reports a location every 2
minutes. Some of this, I think from what I've read, is based upon the
capacity of the data network to accept the data at that time.
I'm unclear if it reports it's current position or a position sometime
(somewhere) previous to when it reports.
How often do the buses sample their GPS data?
Is it synchronous or asynchronous to the reporting process?
That means that there will up to 2 minutes of jitter.
Sometimes, the buses will report their position exactly when they
measure it, and sometimes it will be delayed by up to 2 minutes.
That's jitter. Ones can hope it is stochastic around delay of 1 minute,
but I'll bet it's more complex.
lag (or latency) is a consistent amount of delay.
(Network Time Protocol, for instance, can set the clock on your computer
to within microseconds of the NRC atomic clock, if it can get an
accurate estimate of the latency of the network path.)
From what I've seen (I'm mostly an observer), there are few timestamps
on the data, specifically missing is:
- the current time on the bus (is it synchronized to something?)
- the time at which the data was received
--
] He who is tired of Weird Al is tired of life! | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] m...@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
then sign the petition.
I'm also curious why time syncro is such a problem given that the time signal given by the GPS device is crazy accurate. Isn't having an incredibly accurate clock the fundamental idea with GPS?
I think, it's not about knowing the precise time that the bus did the
reading ("I'm at the corner of Bank and Laurier"). It's about the
latency that it takes for the info to reach the user. If it takes too
long for the information about the location of the bus to arrive to the
user, then the uncertainty about the location is too high.
>>>>> "Edward" == Edward Ocampo-Gooding <edwa...@gmail.com> writes:
Edward> I'm also curious why time syncro is such a problem given
Edward> that the time signal given by the GPS device is crazy
Edward> accurate. Isn't having an incredibly accurate clock the
Edward> fundamental idea with GPS?
I think, it's not about knowing the precise time that the bus did the
reading ("I'm at the corner of Bank and Laurier"). It's about the
latency that it takes for the info to reach the user. If it takes too
long for the information about the location of the bus to arrive to the
user, then the uncertainty about the location is too high.
>> I think, it's not about knowing the precise time that the bus did
>> the reading ("I'm at the corner of Bank and Laurier"). It's
>> about the latency that it takes for the info to reach the user.
>> If it takes too long for the information about the location of
>> the bus to arrive to the user, then the uncertainty about the
>> location is too high.
swfiua> I don't think this is so bad in general. What most bus
swfiua> users care about is not so much the actual location of the
swfiua> bus but how late/early it is running.
I regularly care to know if a bus has passed a stop I can not see.
There are numerous places where I have a choice of walking one block
west (for one set of buses), or one block north (for another set of
buses). If you can tell me that my preferred bus has already passed
the stop, I'll make a difference choice.
This is truly down to intervals of less than 30s.
swfiua> The change in late/early is unlikely to be significant over
swfiua> the course of a few minutes. Worst case the bus is stopped
swfiua> during the entire time, either because it is having to wait
swfiua> due to being ahead of schedule (the bus user isn't going to
swfiua> be too worried about that, it will still arrive on schedule)
swfiua> or because it is stopped in traffic -- this one is just a
swfiua> bit unfortunate, but hopefully not too common.
Buses run early regularly. It's epidemic.
It was only in the past 3 years that OCTranspo management stopped saying
that "5 minutes early" was "on schedule"
swfiua> If OCtranspo want to get fancy they could track the last two
swfiua> readings for each bus and calculate the rate of change in
swfiua> the lateness and adjust the figure by this rate of change
swfiua> multiplied by the time since the last reading. Certainly it
swfiua> would be good to have rate of change estimates and the
swfiua> actual times of the readings along with the readings.
Or more complex things based that vary by time of day, location, traffic
conditions, etc.
Here is what I propose we request:
What we need is two additional elements added to the feed - trip Id (to compare against the GSF data) and timestamp (when the bus sent the data or when it was received by the server).
These two elements will allow for much greater integrity of the applications that rely on the data.
I also propose we chat about this over a few bubblies in the comming weeks. Woud be great to put some faces to the email addresses and domian names.
Sean
Alot of this info is in the gtfs feed for octranspo. All that is needed is a trip id (stop + bus intersection at a given time) to cross reference the two data sets.
Don/
Yup, this is what I meant. Thanks.
Unfortunately, there's no cross referencing id b/w the two data sets.
Currently, I've had to use the bus# + arrival time to map back into
the static schedule (gtfs) data.