November 13th, 2024

No GPS required: our app can now locate underground trains

Transit app introduces offline motion detection to locate underground trains without GPS, enhancing navigation in low connectivity areas. It has tracked 1.5 million stations while ensuring user privacy.

Read original articleLink Icon
CuriosityAppreciationFrustration
No GPS required: our app can now locate underground trains

Transit has introduced a new feature in its app that allows users to locate underground trains without relying on GPS. This innovation addresses the common issue of poor cell service and GPS unavailability in subway systems. The app utilizes offline motion detection technology to predict a user's location between stations by analyzing the vibration patterns of their phone. Users can start a trip with the app, which will then display their predicted location on a map, count down the stations, and update their estimated time of arrival (ETA). The technology involves a series of steps, including motion classification, data collection from various subway systems, and training a machine learning model to accurately identify when a user is on a moving train. The app has been tested successfully, helping riders track 1.5 million underground stations and approximately 400,000 trips. This feature operates entirely offline, ensuring user privacy by not sending data to Transit’s servers. The app aims to enhance the experience of underground travel, providing reliable navigation even in areas with limited connectivity.

- Transit app now locates underground trains without GPS.

- Uses offline motion detection to predict user location.

- Successfully tested with 1.5 million underground stations tracked.

- Operates without sending data to Transit’s servers, ensuring privacy.

- Enhances navigation experience in areas with poor cell service.

AI: What people are saying
The comments on the article about the transit app's offline motion detection feature reveal several key themes and opinions.
  • Users express excitement about the app's innovative technology and its potential to improve navigation in low connectivity areas.
  • Some users report mixed experiences, with a few stating that the app's accuracy was lacking during their commutes.
  • There are discussions about the technical aspects of motion detection, including suggestions for improving accuracy using accelerometers and machine learning.
  • Concerns about user privacy and data handling are raised, with some users appreciating the app's focus on privacy.
  • Several comments reference similar technologies or past experiences with navigation systems, indicating a broader interest in the evolution of transit technology.
Link Icon 58 comments
By @rossant - 3 months
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.

Edit: found it. https://medium.com/snips-ai/underground-location-tracking-3e...

By @dmazin - 3 months
This is SO cool.

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.

By @ripe - 3 months
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).

Whoever wrote this did a fantastic job.

By @wffurr - 3 months
"Classifier" how quaint. I am impressed that they wrote the whole article without mentioning "AI" one time.
By @mdergosits - 3 months
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!
By @modeless - 3 months
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.
By @zephyreon - 3 months
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.

By @scottbez1 - 3 months
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.
By @devit - 3 months
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?

By @333c - 3 months
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.
By @mjamesaustin - 3 months
This is one of the best apps I've ever used, and I'm excited to see it's only getting better!
By @dietr1ch - 3 months
This is really cool.

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.

By @daghamm - 3 months
Correct me if I am wrong, but this looks like something that Google would buy for 3.14B and quietly roll out to anything including your smart toaster.

My point is, I see only one real business case for this.

By @__MatrixMan__ - 3 months
Oh thank goodness. I knew I buried a train somewhere around here but I just can't find it.
By @sailfast - 3 months
I appreciate that this is not a mass surveillance play and all of the data stays on your phone. Well done!
By @barbegal - 3 months
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.
By @clarkmoody - 3 months
Alternative title idea: "Instead of Reaching for AI, we used Good Old-Fashioned Engineering to Solve a Tough Problem"
By @aeternum - 3 months
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.
By @grav - 3 months
Very impressive. Also interesting that the motion type prediction ("is this a moving train?") generalizes to underground trains in other cities.

I see they support the the largest cities in Sweden and Norway, wonder if there are any plans for Copenhagen, Denmark?

By @IIAOPSW - 3 months
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.

By @brirec - 3 months
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!

By @isaacfrond - 3 months
Anybody know what model architectures they used?

The motion detection might be a convolutional network or an svm. The mixer model perhaps a classic neural network.

By @tgtweak - 3 months
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.

By @fullofstack - 3 months
Is GPS spoofing an option, underground? Would instantly work on all phones.
By @alkonaut - 3 months
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!

By @aitchnyu - 3 months
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.
By @MagicMoonlight - 3 months
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.
By @ekzy - 3 months
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.
By @bsimpson - 3 months
I live between stations. One is a nicer walk; the other is a shorter walk. I check the next train when I leave to see which station to walk to.

Would be useful if I could teach this to your app.

By @yonran - 3 months
> 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?

By @svag - 3 months
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...

By @mattlondon - 3 months
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.

Wildly inaccurate even with GPS it seems.

Instant uninstall. Sorry.

By @admax88qqq - 3 months
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.

By @armada651 - 3 months
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.

By @tdiff - 3 months
I believe Yandex does smth. similar in their navigation in Moscow, because GPS is heavily jammed in some areas.
By @CarVac - 3 months
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.

At least in NYC it should listen for door beeps.

By @voidUpdate - 3 months
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?
By @eps - 3 months
There are metro systems where trains sometimes stop in the tunnels or go at slower speeds.

I'm guessing this app won't work that well there. In fact it would probably generate false positives when labeling stations... ?

By @DrNosferatu - 3 months
Nice! dead reckoning to another level (Y)

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?

By @snodnipper - 3 months
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".
By @nycerrrrrrrrrr - 3 months
Great article, I'll have to try it out next time I'm on the subway.

One correction though - there is no subway line that goes across the Queensboro.

By @elromulous - 3 months
Citymapper has been able to tell you what stop you're at for many years (at least on the NYC subway). How does their solution work?
By @jacooper - 3 months
Google maps(wuth google location service) is alao crazy accurate underground somehow.
By @maxehmookau - 3 months
This is so freaking cool. What a fantastic idea and a great write-up.
By @ingen0s - 3 months
This is why I open this site everyday several times a day
By @exabyte - 3 months
https://youtu.be/bFM9HHB9JXI

I found this to be a really well-done video on using quantum physics to track location integrating upon acceleration

By @riffic - 3 months
would love to use collective sensor data to shame operators who accelerate or brake too harshly. that's kind of my transit annoyance these days.
By @0xFEE1DEAD - 3 months
@OP how can I get my city added to the app?

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.

By @DrBazza - 3 months
Is this the same sort of technique that Shazam uses?
By @h1fra - 3 months
Oh they so going to get bought by Google
By @lacoolj - 3 months
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

By @Woeps - 3 months
Uhm, Don't most underground trains already show you where you are? Or at worst, the sign of the station shows you your location?
By @Avlin67 - 3 months
this is dope. my chinese GF loves it so much. so impressive.
By @aucisson_masque - 3 months
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.

By @bambax - 3 months
Dead reckoning is... hard.

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-...

By @mateobelanger - 3 months
Test
By @gregoriol - 3 months
This is way too heavy computing, battery consumption, ... while fun engineering, it's very much inefficient to perform