Maybe ten years ago, I read a blog post by, I think, a French company called snips, that explained how their app used the pressure sensor to detect when the train entered or leaved a station. It turned out there was a very clear signal due to the sudden pressure increase or decrease when the train entered or left the tunnel between the stations.
I am actually currently working on a project to record the sound of the London Underground passing under me.
We can very clearly hear the Northern Line under us. It's < 30 meters below us.
I have become obsessed with getting high-quality, low frequency recordings of it passing under us.
Why? I don't know. I just can't take my mind off it.
For example, there are two tunnels (north and south bound). By correlating it with actual TfL data, can I figure out the sound signature of each?
More intriguingly, I know that there are maintenance vehicles that operate under us in off hours. Can I "catch" them?
I'm not sure what else I might do with this project, but the idea of capturing the sound of this semi-ephemeral creature that operates below me has captivated me.
Can we take a moment to appreciate the engaging, conversational tone of the writing? The article was a pleasure to read, even when it gets into some weeds explaining the frequency charts, etc. (I read the English-language version).
Some cities will put BLE beacons in tunnels that transmit the location and then you can find your location via the strongest beacon signal. This seems like a nice way to figure that out without installing hardware!
Seems like you could do a better job of tracking progress between stations by detecting the specific acceleration signature of each segment of track. At least for tracks that are not completely straight and level. Somewhat similar to the first primitive in-car navigation systems before GPS, that worked on dead reckoning with drift correction by matching the shape of the measured path to map data.
As a user of Transit (thank you for such a great app!) this was always one of my biggest annoyances. Not just transit though — with any app that supports navigation on public transit (looking at you Apple Maps).
I figured someone was working on this but it’s so refreshing to read about the thought and level of detail that went into your design. What an effort too! Congratulations transit team, you all should be so proud for solving what I’d imagine is one of transit’s largest small gripes.
This is super cool! As a regular BART commuter I always thought it'd be fun to try and build a location classifier based on the screeches in different tunnel locations, but using accelerometer data is probably much more practical.
I used this feature in the New York subway last week. I didn't know it was new. It's a cool idea, but it didn't work for me. The app said that the train was several stops behind its actual location.
Wouldn't dead reckoning with the accelerometer and gyroscope in addition to their machine learning improve this significantly? (constraining motion along the known tunnel path when in a moving train, constraining the user to be within the train stopping rectangle when detecting a train starting to move)
Or is the hardware in smartphones too inaccurate even with the extra information?
Sort of related, what I find kind of silly, is that my car probably knows really well where I am, but can't help my phone figure out where my car is pointing to despite being connected to it.
With this sort of tech it only achieves good usability if it is accurate a high percentage of the time. Anything less than 90% accuracy on a whole trip and I likely won't trust it. So that means getting to >99% accurate on each underground train stop. I'm still not sure if this tech reaches that sort of threshold or if this is one of those things that looks like a good idea on paper but falls apart in real world use cases.
This was really exciting to read, but after trying it on four NYC MTA commutes (with one transfer on each commute, so a total of 8 different train rides) over the past couple of days I’ve given up on Transit App for now…
Yesterday night and this morning it kept telling me to get off the train either two early or too late, and this evening it didn’t even think I got on the L in the first place. The app even lightly scolded me for “missing” my train!
Why does the acceleration graph not take direction into account? Seems like you could get much cleaner data if you looked only at the directions orthogonal to gravity.
A few thoughts come to mind. Some said others not.
1. Seems a bit weird to be looking at the accelerometer data yet miss the obvious approach of summing up the acceleration to get the velocity and then summing that up to get position. Yes I know about drift but even then I'd assume the fairly constant several-second g force of pulling in or out of a station or taking a curve would be a strong signal easy to distinguish from short lived jostling.
2. The "train moving" frequency you discovered via fourier analysis was most likely the hunting oscillation. This has to do with how the wheels of the train are designed to force it to turn opposite to any deviation from the direction of the track. Thus there is a back and forth "hunting" for the center that is completely determined by the geometry of the track and the wheels, and therefore the length of track per complete back-and-forth cycle (aka the wavelength) is constant. The frequency of the oscillation (aka back-and-forth cycles per second) is just this constant length divided by the velocity of the train. This fact could be leveraged to estimate the actual train speed rather than just moving/not moving.
3. Combining 1 and 2, a combination of integrating acceleration and confirming / correcting estimated velocity with the expected hunting oscillation would likely be the most powerful / reliable model.
4. Using a classifier seems overkill here. But I'm sure at some point it was easier to just raw-data it than work out a theory driven model which accounted for all the practical confounding factors.
I think you can "spoof" gps satellite timestamp transmissions with single transmitter inside the train. This would require on-train equipment but typically the trains know where they are and could translate that into the required gps satellites and timestamp signatures to allow any devices onboard to acquire a "gps" signal and decode the location using timestamp variation.
I don't believe any of those are encrypted and transmit ~1000-10000 time per second on 1500-1600mhz spectrum which is fairly simple to reproduce using even a cheap SDR kit.
It could also work with 0 input from the train's telemetry - in much the same way as the app - the device would get a reference gps signal (or wifi/BLE when it knows it's in the station), then with a built-in accelerometer (which it has the luxury of direction + stability if it's mounted in the train car) it can determine with greater accuracy where the train is and how far it's moved.
Could you also pick up the audio announcements? Could be weird for the app to request microphone permission though, but I think lots of lines have them and should be doable to transcribe them locally on the phone. I think your approach is better and simpler, but as I was reading the edge cases (like someone changing train and going back in the other direction), the audio could maybe help getting from 90% accuracy to 98%. Sounds a bit more involved to implement though.
I visited London this weekend and found even many underground _stations_ were without mobile service, 15 years after I got used to having spotless end-to-end mobile coverage even in deepest tunnels. I don't know why the London Underground lags that of other cities?
Knowing the next station is usually a solved problem that doesn't need a smartphone, because that's displayed in the train itself and called out on speakers. But once you are on the platform and you need to ask the route planner what the fastest route is to a specific station (It could be walking to the surface and taking a bus, so it's not as simple as looking at the subway map) - then you are out of luck if platforms don't have 4/5G coverage!
Tangential, why dont phones use accelerometer+gravity to figure out the path travelled and the "plane" its on when gps is out? Somehow my running app knows my stride length but may refuse to count the distance travelled when gps was out.
I thought it was just going to count the stops to figure out where you are. If it has stopped 12 times then you would assume the next stop will be the 13th stop. Then you’re not reliant on schedules.
> It now makes the right location prediction 90% of the time.
I’m curious about the failure cases. Are they caused by exceptional circumstances, such as the train moving more slowly than normal or skipping a station? Or when you unexpectedly catch an express train or go the opposite direction? Does the algorithm know that it doesn’t know where you are, or does it confidently tell you the wrong station until the GPS is acquired?
I find the bus tracking of this app in my city is pretty poor unfortunately. Probably not the apps fault probably an issue of the municipality but still annoying.
That being said, if this app could convince cities to also be used for payment that would be a game changer. Uber for public transit would really remove so much friction from using transit.
Why all the complicated detection? The user already knows whether or not they are on a train, you don't need to tell them.
Just show the predicted location of the train they should be on separately from their last known GPS position. Of course it would be difficult to market that alone as a novel innovative AI feature.
This is a very interesting article. I suppose something similar can be made for vehicles entering a tunnel, where eventually will lose the GNSS signal.
I have noticed that a year ago or so, Google Maps app would lose the GNSS signal and stop updating the position while there was no signal. But now I have noticed that the position is updated, although is not accurate. I wonder if something similar has been implemented...
I'm trying this out literally right now and it got fooled by an unscheduled stop due to train traffic. It thought we were already at the next stop and took a bit to get its bearings again.
Just tried installing it on my commute in London. Didn't work - in fact it thought I was at the stop before the one I got on at (when I did have GPS) even when I was 5 or 6 stations further along on my journey. Then it spent the whole rest of the journey spamming me with notifications about the next departure time at the station I didn't get on at.
I'm still a little confused as to how this shows where a train actually is, it seems like this is only a solution to know when you're on a train or not. Does it just guess based on what trains should be moving at that time?
ML level - for some reason, made me think of ITER / fusion research trying to predict plasma behavior with ML also. Any specific connections people in the know care to point out?
I worked for signalbox.io and they had this for the London Underground ~8 years ago. There was some impressive maths / approaches behind all of the "magic".
I was excited to try it out but bummed to see my city isn't listed.
It's even more disappointing considering Ulm Germany (with around 100k people) is there, but Cologne Germany (with a population of about 1.1mil) isn't.
There are lots of potential users here, especially since the official apps are aweful.
The timing of this post is nuts. I was thinking about a post-apocalyptic future last night (as one does) and wondered if using the gyro on your phone would suffice if the initial location and full map was already available.
I think the answer is still unclear since they are using pre-determined routes (easier to track east -> west or east -> southwest than it is east -> north -> south -> north -> east again). But this is very cool that they have so much of the work done already. Maybe even all of it? I don't have the code to look at so ¯\_(ツ)_/¯
Either way, still freaked out they read my mind lol
Side note, that's why I don't like that the Google plays services in Android have a permanent access to Physical Activity that can't be disabled.
Even without gps data, just having access to your phone accelerometer is enough to give a lot of data about your life. Cumulated with Google insanely big amount of data about wifi access point location, it means that they know where you are even without gps activated and how you got there.
The first car navigator, the Etak, came out in 1985 and used dead reckoning and quantization to tell where the car was on the map; see this excellent article from 2017:
Today dead reckoning is used in aerial navigation, and commercial planes (and others) are equipped with Inertial Navigation systems to supplement GPS information; they are getting more and more precise but can still go wrong and need frequent re-calibration.
The next step is "Quantum Positioning System" that promises to detect infinitely small movements and produce perfect dead reckoning at all times, with a precision of the order of one centimeter. It has already been tested successfully. For now the machines are heavy and extremely expensive, but it's imaginable that in some not-so-distant future the technology will be much more available.
No GPS required: our app can now locate underground trains
(blog.transitapp.com)1002 points by dotcoma 13 November 2024 | 309 comments
Comments
Edit: found it. https://medium.com/snips-ai/underground-location-tracking-3e...
I am actually currently working on a project to record the sound of the London Underground passing under me.
We can very clearly hear the Northern Line under us. It's < 30 meters below us.
I have become obsessed with getting high-quality, low frequency recordings of it passing under us.
Why? I don't know. I just can't take my mind off it.
For example, there are two tunnels (north and south bound). By correlating it with actual TfL data, can I figure out the sound signature of each?
More intriguingly, I know that there are maintenance vehicles that operate under us in off hours. Can I "catch" them?
I'm not sure what else I might do with this project, but the idea of capturing the sound of this semi-ephemeral creature that operates below me has captivated me.
Whoever wrote this did a fantastic job.
I figured someone was working on this but it’s so refreshing to read about the thought and level of detail that went into your design. What an effort too! Congratulations transit team, you all should be so proud for solving what I’d imagine is one of transit’s largest small gripes.
Or is the hardware in smartphones too inaccurate even with the extra information?
Sort of related, what I find kind of silly, is that my car probably knows really well where I am, but can't help my phone figure out where my car is pointing to despite being connected to it.
My point is, I see only one real business case for this.
Yesterday night and this morning it kept telling me to get off the train either two early or too late, and this evening it didn’t even think I got on the L in the first place. The app even lightly scolded me for “missing” my train!
1. Seems a bit weird to be looking at the accelerometer data yet miss the obvious approach of summing up the acceleration to get the velocity and then summing that up to get position. Yes I know about drift but even then I'd assume the fairly constant several-second g force of pulling in or out of a station or taking a curve would be a strong signal easy to distinguish from short lived jostling.
2. The "train moving" frequency you discovered via fourier analysis was most likely the hunting oscillation. This has to do with how the wheels of the train are designed to force it to turn opposite to any deviation from the direction of the track. Thus there is a back and forth "hunting" for the center that is completely determined by the geometry of the track and the wheels, and therefore the length of track per complete back-and-forth cycle (aka the wavelength) is constant. The frequency of the oscillation (aka back-and-forth cycles per second) is just this constant length divided by the velocity of the train. This fact could be leveraged to estimate the actual train speed rather than just moving/not moving.
3. Combining 1 and 2, a combination of integrating acceleration and confirming / correcting estimated velocity with the expected hunting oscillation would likely be the most powerful / reliable model.
4. Using a classifier seems overkill here. But I'm sure at some point it was easier to just raw-data it than work out a theory driven model which accounted for all the practical confounding factors.
I see they support the the largest cities in Sweden and Norway, wonder if there are any plans for Copenhagen, Denmark?
I don't believe any of those are encrypted and transmit ~1000-10000 time per second on 1500-1600mhz spectrum which is fairly simple to reproduce using even a cheap SDR kit.
It could also work with 0 input from the train's telemetry - in much the same way as the app - the device would get a reference gps signal (or wifi/BLE when it knows it's in the station), then with a built-in accelerometer (which it has the luxury of direction + stability if it's mounted in the train car) it can determine with greater accuracy where the train is and how far it's moved.
The motion detection might be a convolutional network or an svm. The mixer model perhaps a classic neural network.
Knowing the next station is usually a solved problem that doesn't need a smartphone, because that's displayed in the train itself and called out on speakers. But once you are on the platform and you need to ask the route planner what the fastest route is to a specific station (It could be walking to the surface and taking a bus, so it's not as simple as looking at the subway map) - then you are out of luck if platforms don't have 4/5G coverage!
Would be useful if I could teach this to your app.
I’m curious about the failure cases. Are they caused by exceptional circumstances, such as the train moving more slowly than normal or skipping a station? Or when you unexpectedly catch an express train or go the opposite direction? Does the algorithm know that it doesn’t know where you are, or does it confidently tell you the wrong station until the GPS is acquired?
That being said, if this app could convince cities to also be used for payment that would be a game changer. Uber for public transit would really remove so much friction from using transit.
Just show the predicted location of the train they should be on separately from their last known GPS position. Of course it would be difficult to market that alone as a novel innovative AI feature.
I have noticed that a year ago or so, Google Maps app would lose the GNSS signal and stop updating the position while there was no signal. But now I have noticed that the position is updated, although is not accurate. I wonder if something similar has been implemented...
At least in NYC it should listen for door beeps.
Wildly inaccurate even with GPS it seems.
Instant uninstall. Sorry.
I'm guessing this app won't work that well there. In fact it would probably generate false positives when labeling stations... ?
ML level - for some reason, made me think of ITER / fusion research trying to predict plasma behavior with ML also. Any specific connections people in the know care to point out?
One correction though - there is no subway line that goes across the Queensboro.
I was excited to try it out but bummed to see my city isn't listed. It's even more disappointing considering Ulm Germany (with around 100k people) is there, but Cologne Germany (with a population of about 1.1mil) isn't.
There are lots of potential users here, especially since the official apps are aweful.
I found this to be a really well-done video on using quantum physics to track location integrating upon acceleration
I think the answer is still unclear since they are using pre-determined routes (easier to track east -> west or east -> southwest than it is east -> north -> south -> north -> east again). But this is very cool that they have so much of the work done already. Maybe even all of it? I don't have the code to look at so ¯\_(ツ)_/¯
Either way, still freaked out they read my mind lol
Even without gps data, just having access to your phone accelerometer is enough to give a lot of data about your life. Cumulated with Google insanely big amount of data about wifi access point location, it means that they know where you are even without gps activated and how you got there.
https://en.wikipedia.org/wiki/Dead_reckoning
The first car navigator, the Etak, came out in 1985 and used dead reckoning and quantization to tell where the car was on the map; see this excellent article from 2017:
https://www.fastcompany.com/3047828/who-needs-gps-the-forgot...
Today dead reckoning is used in aerial navigation, and commercial planes (and others) are equipped with Inertial Navigation systems to supplement GPS information; they are getting more and more precise but can still go wrong and need frequent re-calibration.
The next step is "Quantum Positioning System" that promises to detect infinitely small movements and produce perfect dead reckoning at all times, with a precision of the order of one centimeter. It has already been tested successfully. For now the machines are heavy and extremely expensive, but it's imaginable that in some not-so-distant future the technology will be much more available.
https://newatlas.com/aircraft/quantum-navigation-infleqtion-...