• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Never fall asleep and miss your stop again!

Status
Not open for further replies.
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

Nym

Established Member
Joined
2 Mar 2007
Messages
9,785
Location
Somewhere, not in London
I bet it was! I won't let myself fall asleep on my train. It goes to my station directly from London, then to King's Lynn, so if I fall asleep, it'll be a fair trek back home!

Yeah, I maintine my excuse was just finishing a double shift onto the morning, started at 2pm and just finished at 7am. Luckily I knew the conductor on the return leg and had a bit of a laugh about it, didn't get home at 9:30am though :(
 

HST Power

Established Member
Joined
25 Nov 2010
Messages
3,704
We should get every TOC to install really loud buzzers on all late evening/early morning services, that sound when the train arrives at a station. That way, you'll be woken up in an instant!
 

Xenophon PCDGS

Veteran Member
Joined
17 Apr 2011
Messages
35,434
Location
A typical commuter-belt part of north-west England
Technically that would be a grammar mistake since "your" and "you're" are still correctly spelt...

... I'll get my coat

Should that be "A GRAMMATICAL MISTAKE"...or " A MISTAKE OF GRAMMAR"?.

Place names also have incorrect spellings as some examples below:-
Altrincham......NOT Altringham
Castlefield......NOT Castlefeild
Fairfield.........NOT Fairfeild

We had the use of the English language (with all its many rules of grammar) impressed upon us at St. Bede's College, Manchester, in the 1950's by a most sadistic regime.....sometimes the impressions were weals on both hands from a tawse.
--- old post above --- --- new post below ---
I had a two hour sleep on an empty stock 142 once back from York. Just depends if it's one with Northern Spirit seats, Merseyrail seats or FNW bench seats. Think you also have to be under 5'7 too :)

With Class 142, the type of seats most certainly DO make a difference. That is why the units with the "bus" seats still have the "bus-type metal grab rails" fitted, so you can hang on for dear life. You would find it somewhat harder to fall asleep on these seats.:roll:

I have heard that it was difficult to "nod off" on the Liverpool Overhead Railway.
 
Last edited:

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Hello all. What a suprise to find this. I'm the developer of the application and yes I am in the process of doing a National Rail application. It is nearly finished, just a 500 or so stations to finish off.

I should have it ready for the end of the month. Unfortuantly it won't be available for iPhone any time soon due to the fact I need a Mac. I've also correct the description to make sense!

I'd appreciate any support you guys can offer :)

Pete
--- old post above --- --- new post below ---
It's pretty nifty, but I'd still trust it less than looking at the timetable for the scheduled arrival at your destination and setting an alarm for five minutes earlier.

Yeah I can see where that might be useful, however this app is be based on location, so if the train is delayed you get to enjoy a longer sleep :D

Pete
 

SS4

Established Member
Joined
30 Jan 2011
Messages
8,589
Location
Birmingham
Yeah I can see where that might be useful, however this app is be based on location, so if the train is delayed you get to enjoy a longer sleep :D

Pete

Would you be able to get a GPS fix on a moving train though? Especially if it was running through tunnels on approach to a station and assuming GPS would be used (can't see any other way given the droid's location gathering ways).
--- old post above --- --- new post below ---
It sounds like a good idea, I mean I know that it's 10minutes from BHI to BHM so will try and stay awake but if I'm away from home turf I could certainly see it coming in useful.

It will be interesting to see it's permissions since wouldn't it need access to set the alarm (unless it does this in app) and possibly to read the time yet the Irish version only requires GPS (normally I'm wary about apps wanting GPS but this one is fine since I can see why it needs it :lol: )
--- old post above --- --- new post below ---
One last question (for now) - will it work on Gingerbread (specifically cm7)
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Would you be able to get a GPS fix on a moving train though? Especially if it was running through tunnels on approach to a station and assuming GPS would be used (can't see any other way given the droid's location gathering ways).

Yes. GPS listener wakes up every x minutes and gets the phones current position at the exact moment in time. It then calculates the distance between the phones location and the desintation. If it is within a certain range (user configurable) it will alert you, else the GPS listener goes back to sleep only to repeat the process later.

Reference the alarm premission. As you can see it doesn't use the alarm functionality given it's just based on GPS location. I can understand your possibly scepticism of the GPS permission but I can assure you that I don't record the locations for each listen

I have done a trial run around Belfast and it is reasonably accurate, given the nature of a fast moving train and the GPS listener going to sleep. The only pitfal is if you are traveling in a tunnel and the app checks the position, given that it needs line of sight to calculate it's location, the GPS listener will go back to sleep again and tempt it later. It therefore might be iffy if there are stations with long tunnels either side of it.

Here's me going on with a possible negative :s I should be pushing it's positives :p

I hope that answers your query.

Gingerbread = Yes it should, I haven't specifically tested against it given it's only just out.

Pete
 

jon0844

Veteran Member
Joined
1 Feb 2009
Messages
30,900
Location
UK
If GPS scans regularly it's going to kill your battery.

Would you consider using cell-ID locations initially, in order to get an approximate location, then switch to GPS when the approximate location shows you are coming within a set distance of your destination?
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
If GPS scans regularly it's going to kill your battery.

Would you consider using cell-ID locations initially, in order to get an approximate location, then switch to GPS when the approximate location shows you are coming within a set distance of your destination?

Yes I'm aware it does use battery power but thankfully the time between the GPS looking for a location can be set to reduce battery comsumtion.

Regards,

Peter
 

jon0844

Veteran Member
Joined
1 Feb 2009
Messages
30,900
Location
UK
Yes, but then you'll run the risk of missing the fix in time. By using an approximation, you can be within a 100-1000 metre range without using GPS at all. That would be more than adequate on a train journey.

In fact, you might just be able to do it without GPS entirely. The plus being that you can get a location even when the GPS can't get a fix.
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Yes, but then you'll run the risk of missing the fix in time. By using an approximation, you can be within a 100-1000 metre range without using GPS at all. That would be more than adequate on a train journey.

In fact, you might just be able to do it without GPS entirely. The plus being that you can get a location even when the GPS can't get a fix.

But how do you trianglate the location of the phone to compare it aganist the destination?

Anyway if anyone can think of any features that could be added to the app let me know.

Pete
 

jon0844

Veteran Member
Joined
1 Feb 2009
Messages
30,900
Location
UK
You shouldn't need to do anything. Google, and other platforms, take the information from the network and pass pack an approximate location, doing all the work for you.

Google also collects data from Wi-Fi hotspots (anonymously, first from Google Streetview cars and now from other Android phone users that collect this info and pass it back periodically to Google if you've agreed to let it do so), so as you pass these the phone can give an even more precise location.

I am not a developer, but the information should be easy to come by. It requires the use of mobile data, although the amount of data sent each way must be miniscule.

GPS will always give the pinpoint accuracy, but I doubt you need it merely to know when you're somewhere near your destination and for the purpose of setting off an alarm. If it's slightly early or late, it doesn't matter as long as you set a suitably long distance to give the warning!
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
You shouldn't need to do anything. Google, and other platforms, take the information from the network and pass pack an approximate location, doing all the work for you.

Google also collects data from Wi-Fi hotspots (anonymously, first from Google Streetview cars and now from other Android phone users that collect this info and pass it back periodically to Google if you've agreed to let it do so), so as you pass these the phone can give an even more precise location.

I am not a developer, but the information should be easy to come by. It requires the use of mobile data, although the amount of data sent each way must be miniscule.

GPS will always give the pinpoint accuracy, but I doubt you need it merely to know when you're somewhere near your destination and for the purpose of setting off an alarm. If it's slightly early or late, it doesn't matter as long as you set a suitably long distance to give the warning!

Yes I could have used the Google API however that requires Wi-Fi access and certainly in NI, NIR don't have that service so the data couldn't be retrieved.

On that note is there many companies on the mainland offer Wi-Fi, free or otherwise on their trains?

Pete
 

jon0844

Veteran Member
Joined
1 Feb 2009
Messages
30,900
Location
UK
No, you misunderstand. You don't need Wi-Fi.

Google is collecting that data from phone users, as they move around and pick up wireless hotspots - the phone records the cell-ID and the MAC addresses. If GPS is enabled, all the better.

Then, Google stores these addresses with an approximate location. Next time you use your phone to use Google Maps, if you can see any Wi-Fi routers that have been previously stored by someone else, it can pinpoint your location much quicker than having to work out a rough location by the cell-ID.

As the database increases (and by all accounts, I'd say it's massive given how many people have an Android smartphone, in conjunction with the data Google picked up when it drove around doing Street View photography) you can get good location data without enabling GPS.

I do think that if you're going to develop this app, you really must get over to the Android developer site and find out all of the ins and outs, or you may find it very hard to get the app up and running! http://developer.android.com/index.html
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
No, you misunderstand. You don't need Wi-Fi.

Google is collecting that data from phone users, as they move around and pick up wireless hotspots - the phone records the cell-ID and the MAC addresses. If GPS is enabled, all the better.

Then, Google stores these addresses with an approximate location. Next time you use your phone to use Google Maps, if you can see any Wi-Fi routers that have been previously stored by someone else, it can pinpoint your location much quicker than having to work out a rough location by the cell-ID.

As the database increases (and by all accounts, I'd say it's massive given how many people have an Android smartphone, in conjunction with the data Google picked up when it drove around doing Street View photography) you can get good location data without enabling GPS.

I do think that if you're going to develop this app, you really must get over to the Android developer site and find out all of the ins and outs, or you may find it very hard to get the app up and running! http://developer.android.com/index.html

I'll certainly contemplate the Google API in a future build however the code is all done at the moment. Trying to learn the Android API before taking on other APIs, but I appreciate your comments :)

Pete
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Incidentally this looks like quite a good app for Irish Rail, I’ll be trying it out this evening.

Aye it does. Shame that NIR don't provide a live timetable webservice. Apparently National Rail did but it's now under license, otherwise I would have incorporated those features into my app.

Regards,

Peter
 

tempests1

Member
Joined
3 Aug 2010
Messages
239
Location
Haslemere

cyclebytrain

Member
Joined
11 Jul 2009
Messages
311
In my understanding of Android (which isn't great) you just call the location service to give you the current location and don't worry about whether that location has come from GPS, Wifi or cell triangulation.
 

jon0844

Veteran Member
Joined
1 Feb 2009
Messages
30,900
Location
UK
I believe that is the case, although you can perhaps select how much accuracy you need (such that you may force it to give you a GPS position, as against an approximation from the cell IDs or Wi-Fi).

I suspect the information is easily accessible via Google, given the open nature of the OS.
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
I believe that is the case, although you can perhaps select how much accuracy you need (such that you may force it to give you a GPS position, as against an approximation from the cell IDs or Wi-Fi).

I suspect the information is easily accessible via Google, given the open nature of the OS.

In my understanding of Android (which isn't great) you just call the location service to give you the current location and don't worry about whether that location has come from GPS, Wifi or cell triangulation.

We are going a bit of topic but yes Cyclebytrain (love the name btw) is right. Looking to Google API for location listening it is primarily done using Geo Points which calls Android's Location Listener Class which is called via GPS. It is possibly to just triangulate using the phone's position from phone masts but running a test and chatting to colleague in work, the accuracy can be way off. In Belfast it was accuracy to 20meters while in Ballyshannon (Ireland), where said colleague lives, the accuracy was 2km!

Anyway, I'm making good process with the mainland version of the application so it should be ready for release to the public in around a week.

Pete
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Hi guys.

I've developed the application some more to allow the database under the app to be updated. This means that I could potentially release it tonight although it would be missing a few train companies in the south of England and fill those in at a later stage?

Do you feel that there would be enough demand to release it now and then update the database when I get the time, or wait? Time wise it might be well into next month before I could finish the task and would delay potential revenue.

Any comments/suggestions are welcome.

Pete
 

ApAp

Member
Joined
7 Nov 2010
Messages
130
About 7 years ago I was on a GNER service from Kings Cross to Glasgow, my destination was Edinburgh. This was a regular train for me and the crew knew me well. There'd been a problem at work so I never had any sleep, I was told just to relax and they'd make sure I was awake before Edinburgh.

I woke up just to see the train pulling out of Waverley station, next stop Motherwell.

Then the member of staff who promised to wake me was walking down with the tea and coffee jugs (this service was odd in the fact they kept the same crew all the way - does any EC Anglo-Scottish service still do this?) spotted me and then remembered. Apparently there'd been a medical emergency on the train just before Edinburgh which preoccupied the staff and understandably they forgot about me.

The guard was called over, he wrote something on the back of my ticket and it was accepted on Scotrail from Queen Street.
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
About 7 years ago I was on a GNER service from Kings Cross to Glasgow, my destination was Edinburgh. This was a regular train for me and the crew knew me well. There'd been a problem at work so I never had any sleep, I was told just to relax and they'd make sure I was awake before Edinburgh.

I woke up just to see the train pulling out of Waverley station, next stop Motherwell.

Then the member of staff who promised to wake me was walking down with the tea and coffee jugs (this service was odd in the fact they kept the same crew all the way - does any EC Anglo-Scottish service still do this?) spotted me and then remembered. Apparently there'd been a medical emergency on the train just before Edinburgh which preoccupied the staff and understandably they forgot about me.

The guard was called over, he wrote something on the back of my ticket and it was accepted on Scotrail from Queen Street.

Awww unlucky and I can imagine being annoyed but understandable in the circumstances.

Just a quick update. The application is going to be delayed by a few weeks.

Pete
 

cyclebytrain

Member
Joined
11 Jul 2009
Messages
311
Not wanting to step on Blackvaults toes, but if anyone wants a very basic GeoAlarm that will work on almost most modern smart phones (iPhones etc. But specifically not Android).
GeoAlarm

(I was doing something that used a lot of very similar code when I remembered this thread; so I thought I might as well take a half hour or so to do this...)
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
Not wanting to step on Blackvaults toes, but if anyone wants a very basic GeoAlarm that will work on almost most modern smart phones (iPhones etc. But specifically not Android).
GeoAlarm

(I was doing something that used a lot of very similar code when I remembered this thread; so I thought I might as well take a half hour or so to do this...)

Here watch my size 10s :P Nah no toes being stepped on. There are similar apps available so I can't get into a strop with what you posted. Very one (mine included) is just reinventing the the wheel.Yeah that page looks basic it does serve a similar purpose. Not sure what Geo-location support is but I'd assume that the mobile browsers have this built in?

Pete
 

Blackvault

Member
Joined
22 Jun 2010
Messages
14
Location
Northern Ireland
It crashes when you select First Capital Connect as an operator for some reason! The ads are also somewhat 'in-your-face' and, in my case, all the same. One banner is enough if they're the same!

If this can be fixed, it could become a very useful app for everyone.

http://www.whatmobile.net/2011/07/train-sleeper-app-never-miss-your-stop/

Hello Jon,

Thank you on your feedback last night. I was just going to bed when the bug report came in so stayed up to correct it. The revision is available but you will need to uninstall the entire app and reinstall it for the database change to take affect. This won't normally be the case with updates to the app just the database it uses.

Thank you for the comment on What Mobile.

Pete
 
Status
Not open for further replies.

Top