Arrival Times in minutes

96 views
Skip to first unread message

@ShyamuP

unread,
May 11, 2012, 6:08:21 PM5/11/12
to TransLoc API
What would be the best way to access the estimated arrival time in
minutes as seen on your various agency tracking sites. (I'm using
lsu.transloc.com to test)

Currently, I've been forming a URL based on which agency/route/stop
the user selects to access your arrival-estimates resource and then
finding the difference between the generated_on and arrival_at
attributes in minutes.

However the minutes I get are not always 100% consistent with the data
on your agency tracking sites

Thanks,
Shyamal

Jason Feinstein

unread,
May 12, 2012, 2:44:39 PM5/12/12
to transl...@googlegroups.com
Hi Shyamal,

Would you mind providing examples of the URLs you're using and the data you're recieving back from the API?  I'm trying to determine if this is a bug in the OpenAPI or if it is a quirk of how you're implementing it.

Thanks,

Jason Feinstein
Jason Feinstein
TransLoc, Inc.
ja...@transloc.com


Shyamal Patel

unread,
May 12, 2012, 4:06:23 PM5/12/12
to transl...@googlegroups.com
Jason,

I'll be using LSU as the agency, route "Tigerland A", stop "Journalism"
so the agency/route/stop codes are respectively 60, 600003 and 600003

The url I form with this data to access the arrival-estimates data is

Currently I am getting an arrival_at value of  "2012-05-12T15:13:11-05:00"
and generated_on of "2012-05-12T19:54:18+00:00"

The difference between these two times are about 21 minutes
However, for Tigerland A at the Journalism stop at lsu.transloc.com the arrival times are currently showing at this moment in time as 2 & 29 minutes.

At first I was thinking it had something to do with timezones since generated_on is in UTC time while arrival_at was in -5:00 but my understanding was that these two times were just two instances and finding the difference in time between the two would be independent of any timezones. 

Thanks in advance

Shyamal Patel

unread,
May 12, 2012, 4:07:54 PM5/12/12
to transl...@googlegroups.com
Sorry, I copy/pasted the wrong URL.

the above URL should be 

Shyamal Patel

unread,
May 21, 2012, 6:40:19 PM5/21/12
to transl...@googlegroups.com
I'm still stuck on this issue was wondering if anyone could shed any light?

Stu Zhao

unread,
May 22, 2012, 10:10:29 AM5/22/12
to TransLoc API
Hi Shyamal Patel,

I tried to investigate this issue.

The problem I see is that in the system, the stop ID of Journalism is
not 600003.

If you go to http://api.transloc.com/1.1/stops.json?agencies=60,
search for Journalism, you will see its stop ID is actually 600045.

Hope this will solve your problem.

Stu

On May 21, 6:40 pm, Shyamal Patel <yankch...@gmail.com> wrote:
> I'm still stuck on this issue was wondering if anyone could shed any light?
>
>
>
>
>
>
>
> On Saturday, May 12, 2012 4:07:54 PM UTC-4, Shyamal Patel wrote:
>
> > Sorry, I copy/pasted the wrong URL.
>
> > the above URL should be
>
> >http://api.transloc.com/1.1/arrival-estimates.json?agencies=60&routes...

Shyamal Patel

unread,
May 23, 2012, 6:26:10 PM5/23/12
to transl...@googlegroups.com
Thanks Stu for your help, I was able to figure out my problem.

If you guys take feedback, I would suggest the option of being able to limit the stops resource by route parameter in order to get only stops that are along certain routes.
Would be for sure useful to me and I'm sure other developers :)

Stu Zhao

unread,
May 24, 2012, 10:07:33 AM5/24/12
to transl...@googlegroups.com
Currently the way to get stops for a certain route is to use routes feed combined with stops feed.

In http://api.transloc.com/1.1/routes.json?agencies=lsu, routes do have a list of stops it will serve.
And in the stops feed you can get the detailed information for it.

I do agree it will make things easier if stops feed have a route_id filter.

Thanks for your feedback.

--
Yanglei (Stu) Zhao
TransLōc, Inc.
Reply all
Reply to author
Forward
0 new messages