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.
Another tidbit: on high speed trains (maybe on regular trains too idk) the 'door flange' which is actually a hollow pneumatic tube (it can detect spike in pressure that's how the train know it's trying to close the door on somebody's hand) get's pressurized higher before entering the tunnel, to mitigate the "slam" effect due to the difference in pressure.
Hi! Having worked on this project, I can provide some details on why we didn't end up using the pressure sensor.
As others have stated, not all phones have pressure sensors, and the quality of the readings also varies a lot between different models. For example, we had one device where the readings would spike when squeezing the phone.
Transit also doesn't have permission to read the pressure sensor, and our use case wouldn't justify asking for it.
Eh, I wouldn't count on it. Transit's trying to compete with the behemoths, and this seems to be their latest shot at securing a competitive advantage. I, too, hope they open-source their work eventually, but I also want to see them succeed in disrupting the transportation navigation space! (Not that those things are mutually exclusive, of course.)
Even before that, there was a Google Maps experiment using the compass (magnetometer) to infer train movement, but IIRC the accuracy of that depended on the network's current (DC vs AC) and even the vintage of the cars.
Thing about training sensor fusion algorithms - more sensors, more better. Often adding a terribly inaccurate sensor whose failures are uncorrelated with the ones you're currently using, because it operates on an unrelated principle, is the thing that makes the solution highly accurate.
The Berlin Airport was ventilated by the train. But because the building was finished but not operational, for almost a decade the local train company had to drive trains in and out of the building.
That's all phones ever, not current/popular models. When you restrict it to the last 10 years, you get about 12%, and of the 70 most popular models almost a quarter are equipped with a barometer.
For an app as popular as Transit this is a purely academic exercise—25% of the most popular models is way too low to be worth building their detection around, even if they could assume that all of their customers use the most popular models (which they obviously can't).
25% of popular models doesn't mean 25% of phones currently in circulation. If the iPhone has a barometer (which it does), that's already a huge share of phones out there.
It may be too low, but I'd imagine the app could also look for other Transit users nearby and as long as one of them has the appropriate sensor, this might be sufficient. Probably still not something you want to rely on since it would be pretty annoying to have a feature not work when you're alone on a train.
> the app could also look for other Transit users nearby
That seems unlikely in an environment with no cellular / wifi signal. Theoretically possible, but expensive for battery and probably disallowed by the OS.
Does the current version of their app run on 25% of the most popular models? This update runs a classifier on your phone. I imagine that would be no less restrictive than the barometer requirement.
Most classifiers are nowhere near as heavy as the LLMs that are trending right now. The article doesn't specify, but I would be surprised if the resource requirements are especially onerous.
Inexpensive barometric sensors are _remarkably_ sensitive too. Like enough precision to detect less than 10cm or 4" changes in height/altitude.
Note that's "sensitive", not "precise". The atmosphere changes pressure with the weather, so you don't get accurate absolute altitude - at least not without knowing the local "pressure altitude". Barometric pressure can vary in a way that represents plus or minus 300 or 400m of altitude, and can swing between high and low fairly rapidly in extreme weather events.
But over short timeframe the change in barometric altitude can be very useful. Glider pilots (including paragliders and even RC gliders) often use very sensitive barometric pressure sensors to detect when they're in rising to sinking air, down at the few meters per minute range of sensitivity.
Not a faster lock, air pressure is actually more accurate on the z axis for the most part. GPS is not great at height, and including an extremely accurate barometer is a big help.
Because the SATs only give you a pseudorange distance between you and the sat, so each say is most accurate solving for distance to/from that sat, and much less helpful resolving angle to the sat.
With a clear SkyView, around just under half of the sats are hidden by the earth.
This means that you get a full 360 degrees of data that can be near the horizon helping resolve lat/long.
But only about half of that sky is helpful for altitude. The birds you can't hear directly below the earth would be the most helpful for improving the altitude fix if you could hear them.
Baro is handy because you can take the absolute altitude from GPS as a low frequency baseline and use the baro for high frequency changes. Then when GPS says we teleported +200 feet when a new sat comes into view, we can temper that that with baro information.
I know nothing about this, but I imagine two people at the same latitude and longitude could be at different altitudes.
A trivial example would be people on different floors of a skyscraper—although I suppose gps works poorly indoors anyway. Still, even outdoors there are peaks and crevices, and on a steep slope a very trivial change in lat/lon could lead to a major change in altitude.
I would imagine it's because your distance to the satellites changes more when you move along the ground than when you move up and down the same amount.
Sure, assuming you are not in a building, balloon, helicopter, plane, drone, etc. Not to mention interesting topology like a cliff where an error in long/last of even a single foot could mean your altitude would vary by 1000 feet.
One problem is that using position to get altitude would require a detailed elevation map and that would use a lot of storage space or require internet.
But elevation maps are not detailed enough and position is not accurate enough to get accurate elevation. Think about standing on trail along steep slope. The position not being that accurate is fine since you know you are on trail. But altitude could vary wildly going up or down slope, or even up or down trail. It is probably similar to GPS vertical accuracy, but were going for more accuracy that barometer provides.
The maps are only used when resolving a 3 bird fix. As soon as you lock a fourth bird you can solve 3D directly rather than leveraging an onboard spheroid. Many receivers refer to a three bird fix as a 2D fix for that reason.
It's one factor in estimating altitude you feed into an extended kalman filter. If the GPS altitude is holding steady but there's a sudden jump in pressure that's probably a storm front not indicative of motion.
you wouldn't need all of them to have it, just enough so that wifi beacons in-between train stations
could get added to the bssid - gps coordinate map. Though if the vendors wanted work with you, you could just tell them wifi bssid and the gps coordinates of them and the rest of it would just work.
You don’t need fixed base stations. Just infra on the train that rolls bassid based on location data the train already has. This would silently hook into native location services already on devices without additional sensing or models trained on other sensor data.
I wonder if it'll Just Work [eventually, given enough repetitions], or if the crowd-sourced network location algorithms will filter it because it is dynamic.
unless installed by the system operator, which is why they'd know the gps coordinates for them
I'd have to have missed the title of the post, not read the post itself, not read GP's comment, not thought about why there'd be a pressure change, to have missed that particular detail. I appreciate you trying to be helpful though. :)
I’m pretty sure every Android phone does. It’s called a microphone. It doesn’t give absolute pressure values, but that is not needed for this use case.
I forget which generation it was now, but many years ago I had a Samsung Galaxy phone that had a sensor that could measure your heart rate if you put your finger over it
The problem is, it was basically useless. The main use case for heart rate monitoring is continuously throughout the day/night, or during exercise. A watch is very good at this. An optical sensor on the back of your phone is not.
Periodically checking your heart rate by holding your phone in a specific way is not a useful feature for that many people.
+1. If a phone has a stopwatch, you can get your bpm at a given moment with a finger and a multiplication (or patience). Given the limited real estate on a mobile phone it's crazy to devote any space for something so trivial.
For me, just having something that you can check 1 time per year is much better than nothing. The anecdote: I was working two heavy manual labor jobs 7 days per week and felt absolutely fantastic, glowing with power. Turned out the heart rate at rest was 180 lmao. Like a rabbit. Took a few days off, it dropped below 70.
It should decline some 60 sec after physical activity. I think I measured after 10-15 minutes. Fatigue, dehydration, lack of sleep, a diet with lots of coffee. I just added those to the todo list. I went home to sleep (and confiscated the heart rate meter), the next morning it was around 100 bpm which is still terrible shape. Over the day it sunk to 80, over the 2nd day to 70, 3rd a bit lower. Back at work it would barely elevate. The moral of the story: Don't work out 11 hours per day for 6 months straight.
The heart rate monitors in Google and Fitbit devices are insanely inaccurate during exercise. I had suspected as much already. Whenever a brisk walk indicated my pulse was 150 or so. But first, I could not reproduce this wearing a halter device and later I could not reproduce this wearing a polar heart rate monitor or a Frontier X2 ECG.
Conclusion, Fitbit and Google heart rate monitors on those wearables are hot garbage. Cue some snooty googler insisting I'm doing it wrong somehow.
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.
I'm interested in extremely weak, high-frequency vibrations of everyday things while in resting state (which is sort of the opposite of what you're after, as I understand), but have not gotten far in acquiring the sensors. I'd love to get a laser doppler vibrometer, but they're pricey.
Well, I was just going to put a contact mic in my cellar. My understanding is that this is the best way to pick up low-frequency vibrations.
I know very little about audio engineering. I wonder what else I might be able to use to pick up the vibration signature?
I completely understand your drive to pick up those high-frequency vibrations! There's a whole secret world of vibrations out there, and we can analyze it!
Amplifying and digitizing the signal is straightforward for an experienced EE, but you might look into acquiring some Raspberry Shake hardware which has it all already done.
You might struggle using microphones if it's very low frequency because most human audio microphones intentionally filter frequencies that are below (and above) human hearing range. Perhaps fixing to he contact mic to the right resonant object might serve to translate the low frequency to a higher frequency?
Could you use the accelerometer on a smart phone to 'hear' the vibrations?
I don't know if a contact mic really has any filtering though; it's just a piezo element that I plug into a pre-amp.
However, what you're saying is completely legit. I read that I might want to lay a large, sturdy thing on the floor and put the mic on that, for the same reason that you gave. I used a large old pane of glass that I found in the cellar.
All that came to my mind is making sure to physically bond it to the floor. But then you still need to have something that moves relative to the magnet and then I got confused again.
What do seismographs do? People also use acoustic pings to measure soil and rock density underground. What are those devices using for their “microphone”?
And yeah, would an accelerometer work? I don’t know what the temporal resolution is on your standard Amazon / AliExpress accelerometer is but it’s probably pretty decent?
I remember building a toy interferometer in high school - a laser, splitter and a mirror. You could definitely see the interference patterns when you'd press on a wall with a finger.
Maybe something like that could be turned into a reasonable microphone?
I have pondered adding 4 microphones to the corners of my house. I suspect with some processing and filtering you could likely tell quite a bit about the house. When the front door or garage opens, what rooms are occupied, when it's raining or windy, what appliances are on, when someone parks in the driveway, when the mail comes, duty cycle of the fridge and furnace, when it's sunny out (expansion noises on the sunny side), when someone is showering (and which shower), when toilets are used, etc. Certainly should be able to detect when a window is broken or a door forced.
I was at an Open House at the Lamont-Doherty Earth Observatory [0] a few weeks ago, and one of the researchers was doing something adjacent to this -- recording the sound of earthquakes for analysis. Will try to find who it was.
I am sure that your work in discriminating what's happening deep underground with nothing more than passively recording surreptitiously available signals at the surface level on non-specialist hardware is of interest to a few governmental offices.
I used to live about 300 yards from where the subway went and I felt like I could hear it. I’m not sure if it was residual sounds from the sidewalk emergency exits or from the earth ringing like a bell.
Ha! If you happen to live in the battle area of South Wimbledon then the noise from the northern line in the early hours of the morning can wake you up! It’s roughly 30 meters under too!
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).
I donno which humans you read, but most people I know defecate their thoughts onto a page. Actually good writing takes a lot of effort most people don't do. AI's got a decent baseline.
This is the first time I'm hearing about it
I downloaded it pretty much as soon as I finished reading the blog post, only to discover it's not available in my region :-(
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!
Some trains even have modern technology called "screens" that display their current location, next stop, route and so on!
(Although in fairness they so often get this laughably wrong, and cycle through useless "remember your luggage" style messages so you have to wait like 20s to see the information you want - critically bad on a train.)
I really don’t understand why not every subway shows the next station on the screen instead of warning messages and other stuff. (And a marker for side the doors will open)
For at least months in my city, the screens in buses have been showing a "broken image" icon as part of their ad cycle. I'd much rather know about the next stop.
Ads make money, but not that much. I'm not convinced they are enough to be worth the bother. To have ads you need to pay people in sales to sell them, people to install them (now that this is electronic it is easier than the old paper days, but you need a more expensive tech person to keep them working). At best they are 5% of your gross budget, so not very significant and they often hard harmful to your riders.
Transit in the US seems to be constantly on a starvation diet budgetarily speaking so I'm not shocked small sums of money get chosen over options that would be better for their users.
The MTA is a huge outlier but still gets less money for upgrades and upkeep than they need. They limped along for years on extremely outdated train tracking infrastructure and are just getting around to doing updates that needed to be started two decades ago.
What often happen is a a company comes into install and maintain the displays for "free", on the proviso that they can display ads and keep most/all of the ad money.
5% of a transit authority's budget would be a lot of money! Advertising made £158 million for Transport for London in 2019, much less than 5% of their budget.
Also doesn't help travelers who aren't too familiar with English - I always wonder how many NY-bound tourists have stepped off the train at "Newark Penn Station".
I take the train every day in NYC. Around half the time the train is brand new and has nice displays that even show you where the stairs are located in each station as you pull up. The other half the train is from the 1960s and has no information whatsoever. So yeah this app will definitely be an upgrade over peering out the window to read the station names. Even the trains with displays are occasionally wrong/not working.
This assumes you aren’t riding a packed train with people standing wall to wall in front of seated passengers. Being a shorter than average person also can make this a challenge.
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.
More reliable might be to check rail track features from accelerometer: tilt, turns, bumps, or a combinations of everything. Even sounds on turns, changes of backround during merging tunnels, etc. Integrated acceleration gives train speed, which is also useful along with other inputs.
If you’re not putting the phone on the floor, wouldn’t the person holding it introduce a randomness factor that would make it much harder to reliably measure those? And then there’s sun curves, packed leaves, ice and the cars’ suspension.
I think I’d struggle with finding a signal through all that noise.
Contribution from the phone being held should be easy to cancel out for the most part, as high frequency noise. It of course gets much easier if you have acceleration data from two or more devices held by different people.
Not in any even remotely modern system that will have a high degree of automation and if there's a driver, they're only closing and opening doors, and telling the train to get going.
I just took a one day initiation with the SNCF for driving trains in France.
I assumed that everything would be automated but in fact nothing is.
They explained that they regularly face situations that require human intervention (several times a day), and that even a little automation would reduce the level of attention on the part of the conductor.
The conductor is required to interact with the controls at least every 30 seconds to avoid setting off alarms.
The SNCF is for regional and national train (with the exception of the RER) where the possibility of having a cow coming on the rail is non-negligible ... or a hot air ballon landing on the rail and stopping the Nantes-Paris lines for a whole morning :D .
So I think it is a much, much harder environment to automate. Paris do have some metro line that are fully automatic (line 1 at least) and both Rennes metro lines are fully automatic. It is much easier to control the environment around a metro and ensure that nothing can go on the rails, and have surveillance system to check if, if it does happen, it is detected ASAP.
> The SNCF is for regional and national train (with the exception of the RER) where the possibility of having a cow coming on the rail is non-negligible ... or a hot air ballon landing on the rail and stopping the Nantes-Paris lines for a whole morning :D .
> So I think it is a much, much harder environment to automate. Paris do have some metro line that are fully automatic (line 1 at least) and both Rennes metro lines are fully automatic. It is much easier to control the environment around a metro and ensure that nothing can go on the rails, and have surveillance system to check if, if it does happen, it is detected ASAP.
Even the non-fully automatic lines use heavy automation (e.g. lines such as 2, 3, 5, 7, 8, 9, 11, 12, 13).
The NYC train drivers union continue to fight against one person train operation and automation, to them the subway is more of a jobs program than transportation
We should automate the trains and repurpose the train staff to be conductors patrolling the trains to assist individuals in need and help in an emergency. That way, the jobs are saved, and the trains get more pleasant to ride!
I saw that, I saw trains with more than one MTA person onboard, and saw some construction work which had 30 workers sitting on their phones and 2 working (passed by multiple times that day, the ration never changed).
Grand Paris Express' president also talked about this, and compared the 2nd avenue subway to the Grand Paris Express (well, one cost $4.45 billion for 1.8 mi / 2.9 km and 4 stations; the first line of GPE, 15 south is 33km, 16 stations, and costs ~8 billion euros so it's a really bad comparison), and has said that if he had to do things the way the MTA do it, GPE would have gone nowhere.
The comment to which you replied specifically said "Not in any even remotely modern system"; neither of those are remotely modern, _especially_ not NYC. Only two or three lines of the famed Paris system would qualify.
Barcelona, on the other hand, would qualify for everything except line 4.
Every London Underground line built after 1906 is automatically driven - the human driver just pushes a button and the train drives itself to the next station.
That makes it sound as if they'd been automated right from 1907, which most definitely isn't the case – on most line automation only happened very recently. (The Victoria Line was automated right from its opening in 1968, then the Central line was automated in the 90s, the Jubilee and Northern lines in the 2010s and the subsurface network is currently under way.)
Also if we want to quibble, at least a few sections of the Bakerloo and Piccadilly lines (which are still completely manually driven) were opened after 1906.
> That makes it sound as if they'd been automated right from 1907, which most definitely isn't the case
From 1907 onwards every newly built line was automated from opening (though indeed extensions or "new" lines made by splitting an existing line were sometimes manually driven).
Even that is a bit disingenuous when you consider the very minimal number of completely new lines that have been built since 1906 – basically only the Victoria line in 1968 and (depending on whether you only count real tube lines or not) the DLR in 1987.
(The Jubilee line in 1979 – which started out being manually driven – wouldn't count according to your criteria, because part of it was "made by splitting an existing line", and apart from being heavy rail, arguably Crossrail could be argued to be an extension, too, even though it does operate automatically on the new-built bits, i.e. the central section plus the Abbey Wood branch.)
Most train systems around the world are not automated. Even though electronics can do better than a human driver, most trains have a human driver. (in subway systems you should be able to keep all dangers off the track so the safety problem is much easier than roads where kids might be playing in the street. But this requires platform screen doors which is also rare)
The real advantage of automation though is without a human driver it becomes cheap to run a lot of trains that are not very full and that makes your system nearly as convenient as driving in the suburbs.
> Most train systems around the world are not automated
All modern ones (in an urban/suburban context, which is what the post and thread are about; interurban is a bit more mixed, but every high speed line is highly automated too, because at those speeds there simply isn't the time for a human to react) are.
> The real advantage of automation though is without a human driver it becomes cheap to run a lot of trains that are not very full
And you can also have a very high frequency (60-90s intervals), which is impossible with manual operations. This increases capacity, on top of the convenience.
I believe that their intention is to have something that works on any track, without signatures. Collecting signatures would be cool, but a massive work if you want to have good coverage of cities AND phones. Maybe companies like Google or Apple have the data and the capacity to do so, smaller companies less likely.
I was surprised to read they don't collect any data. That would be a great way to gather samples to train the new generations of detection NNs on. If it is properly anonymized it shouldn't be a problem, imho (and I'm pretty paranoid wrt. privacy).
Then in 5 years: "Turns out this was marketing for investors and that our classifier was using 99% of the time last location and itinerary as primary factor to determine location"
The magic formula:
"if is_train_moving, countdown to next station"
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.
Using the microphone as a sensor is a bit of a no-go a transit app. You could just record the noise of the train rolling to find out the movement, but your users will suspect you are listening to them.
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?
> Wouldn't dead reckoning with the accelerometer and gyroscope in addition to their machine learning improve this significantly?
The thing that should help the most would probably be the hall sensor/magnetometer/compass. That should output decent dead reckoning.
Doing this just with the gyroscope will work very well for short movements, but it will be close to useless on long, gentle curves. Unfortunately, those MEMS gyroscopes drift quite a lot over tens of seconds. Not a problem if you can do sensor fusion with the magnetometer (reckoning) and the accelerometer (where is "down"), but the latter can't be used on a fast train, acceleration/deceleration of the vehicle and forces in curves make finding gravity challenging. No idea how well a compass works inside a subway tunnel.
But maybe I'm wrong, I just have experience trying an "artificial horizon" app on an aircraft - and here, the accelerometer is completely useless for "down". A single maneuver with some Gs and the horizon has no idea what the pitch angle is. Noisy magnetic environment, GPS off? It also doesn't know where it's going.
That is what they are doing. Dead reckoning is generally very inaccurate though, so by recognizing when they are on a train they can greatly increase accuracy because they know exactly where the train is.
Using the IMU seems hard as true signal of the train's gradual acceleration is likely drowned out by the noise of vibrations and the person's natural movements. I guess every time the train is stopped, you can calibrate the bias of the IMU if the user is standing/sitting sufficiently still, but even then the dead reckoning would drift a lot.
If you just did a FFT on microphone and acceleration for every link in a subway system and recorded the past travel times. Seems pretty straight forward to estimate your speed vs the historical records and then predict your arrival time.
Yeah while the solution they implemented is very interesting it doesn't actually "predict your location in a subway tunnel using your phone’s vibration signature"
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.
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.
This is actually a problem for my Volkswagen Tiguan, the car GPS data is wildly inaccurate probably ~30% of the time. The only fix is force it to use wired CarPlay or turn of CarPlay and let my map grab my phone's data before reconnecting.
It does! Unfortunately for me, I rented this one Ford Explorer where the car's GPS was off by a mile, so that was the opposite of helpful, and I didn't find a way to turn that off in the short time I had it.
Thats still surprisingly unsolved problem. I was daydreaming about pulling my laptop out somewhere without known wifi and it automatically using my phone as a hotspot, without going trough manual process of enabling said hotspot. Somehow we connected the world but forgot to connect out devices..
This has almost been a feature for Macs+iPhones for like a decade. You need to manually "pick a wifi network" but it'll turn on your phone's hotspot if you pick it from the list.
Never tried on my Mac, but on iPad, it’s totally automatic : the iPad automatically tells the iPhone to enable the hotspot (over Bluetooth I presume) then connects to it.
Similar thought, and Google acquire does seem like a plausible route. However, checking over on Play [1] they've apparently got In-App purchasing at $3-50 and 300+ cities and 1000+ transits that let you buy fare and passes. Seems like they're already making money anyway. Teams pretty extensive though, so it does look like a lot of annual money's probably necessary to float. [2]
They also partner with transit agencies where the transit agencies pays them to upgrade everyone in the region/system to the premium offering, and the transit app becomes the official app for that transit agency.
I never paid a single cent in this app and yet the app is perfectly enjoyable. I've used it since 2019. What's wrong with freemium? I don't need extra features and the free features are good enough for me.
The thing I specifically paid for (that Google Maps doesn't seem to offer) is answering the question "what transit lines/stops are nearby and how soon will a service arrive at the stop?" Last I looked they limit the number of lines shown in this way for freemium users.
If you're just putting in a destination and getting a fastest route (much like you'd do in Google Maps), then I didn't see much benefit to the premium version.
Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.
Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.
Please don't complain about tangential annoyances—e.g. article or website formats, name collisions, or back-button breakage. They're too common to be interesting.
Some could feel my comment escape them from it’s tone and it will be wonderful if you or someone else share a better way to say what I said. I’m doing my best to not hurt others, which sometimes is seen as coldness. Which I admit is not kind.
I can offer no better words for you, however can offer advice which I myself shall no heed.
Vote accordingly and proceed onward. If collectively a negligible fraction also do the same then the results might just surprise. Ostracism is a powerful tool, while not always used for good, it does serve a purpose in society.
Thanks, that is an idea I didn’t have and worth considering. Exclusion traumatized me in the past and that still haunts everyday. I didn’t thought it can be used for good.
It's likely that in this community actually substanceless comments will be down-voted. That on the other hand is very upvoted comment by the community, so I think it shouldn't be met with such criticism.
Well I think "one-liner" here adds more weight to "substanceless" and was not indented to be taken literally:
- it has no useful meaning in a media you can resize.
- adding dots (.) does not noticeably change the meaning, you could replace with a comma : "Oh thanks goodness, I new…", allowing cheating on the fight rules. I don’t think that’s desirable way we want to interact as a HN-user-community (personal opinion)
- taking the literal read anyway, I see one line and two sentences right now. It’s a one liner. (not English native, may I missed a secondary meaning?)
Dang clarify it bellow the post in linked and cite scott_s, none of which talking about the length of the joke but both referring to noise.
I personally also found it funny BUT I also saw like 10 substanceless not-so-funny jokes today on HN. INHM problem is not the joke itself but the emptiness of the post if you take the joke aside.
So true. This is the sort of thing that is so exciting from a usability and engineering standpoint. Until some marketer gets their hands on it and decide that they can increase the ROI on microtargeting advertisements by 0.1% if they use this data. Suddenly, we continue to slide into the advertising and propaganda driven attention economy dystopia.
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.
I'd assume they would have some opt in, or allowance for either federated learning or sharing of anonymized sensor data.
Google is a huge advantage here, they have both the spatio-temporal intent of the user as well as the physical flow feed. There is so much position data flowing off android phones, that they are able to see the whole topology.
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.
They're using Fourier transforms to focus on frequencies of acceleration associated with subway travel; gravity should mostly fall out as an independent factor.
Is there always a great reference for which way down is, given that the phone can be in various orientations? You might have to do some other heuristics / build some other model for that to figure out which axis to subtract your 9.8 m/s^2 from - maybe it's easier not to worry about it.
While I understand your question is about the Transit app in general, I'd just like to mention in correlation to the article that my team and I worked with one of the public transport operators in Denmark, to utilize the motion predictability feature found in Android and iOS SDK's, so I can enlighten you with some details regarding that.
Our conclusion was that the feature didn't work in the danish metros for reasons we never got to deep dive into. It's most likely related to the fact that many of the metro stations are built in concrete, as such there's no GPS data in most of them unless you're very close to or on the surface and no motion data.
I'd be surprised if they got this particular feature working but who knows... maybe if we had looked into the raw sensor output we might have been able to work something out.
In the end we made a solution to help determine when you're moving or not by utilizing beacons.
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'm one of the developers behind this project, so I want to jump in because we did explore some of these solutions.
You are correct in saying the low frequency acceleration from starts, stops and turns can be distinguished from the higher frequency noise.
One big challenge was with orientation. Acceleration can look the same as deceleration and turns from the sensor's perspective, if you turn the phone around. Taking the integral of the gyro reading, the error would grow quadratically, and we found magnetometer readings unreliable depending on the vehicles.
Your point about the hunting oscillation is interesting and I agree, estimating the speed would be a great improvement.
Well done! Have you considered spoofing Wi-Fi/BLE signals in addition to accelerometer data? This way you could verify that you are on the right station.
That's just an inertial nav systems, quite useful for missiles before/without usable GNSS, but also probably quite inaccurate with the MEMS accelerometers in phones.
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!
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.
I think there should be regulations that allow sending real GPS from low power ground based system. Sending incorrect GPS is a major problem, but a lot of location issues would become much easier if the owners of buildings would just install cheap GPS transmitters.
I wonder if you could just create a map of the cellular antennas along the metro/subway tunnels. Maybe I misunderstand how connectivity is delivered in underground systems it may pretend to be a "single cohesive base station" from a phones perspective but if there are thousands of antennas throughout the system and the phone switches from one to the next regularly you can decently estimate the location.
Having the train use Bluetooth Low Energy advertising to broadcast its location and some other data, like time-to-next station, next station name, would be a nice feature.
GPS spoofing should not be done in my opinion until the negative side-effects are well understood.
This is the case in some stations in Paris. To retrofit ancient trains with station announcements, they have installed Bluetooth broadcasters on each station so the train can detect when it enters/leaves and announce the next station for visually impaired people. Smart and simple imo.
Ona similar note I always thought it would be cool if there was a standard allowing (trusted) WiFi access points to relay location data, so that in-flight WiFi could pass on the plane's GPS feed.
No need; phones use sensor fusion these days. Wifi, ble, 4G/5G base stations, signals, etc. it's all taken into account. Which is why you can get accurate position in a lot of places where you definitely don't have any line of sight to any GPS satellites. Some of the more recent wifi standards also have some positioning features.
Early Android dev had a guide on how devs could pick the best location from various sources individually, and it was massive pain with dubious results.
You'd need to spoof at least three satellites to get a fix, right? And then you'd need to spoof different signals for different regions of the subway, because your signal sources aren't really in the orbit.
Sounds to me this could be very complicated and expensive. I wonder if it would even be possible because you'd need to have the same signal spoof the correct positions to everyone who hears that signal.
I don't understand this. As far as I know, the satellite basically sends its identifier and precise time, and from this information (combined with the information in GPS calendar that tells the locations of the satellites) the recipient can determines its own location.
How could it be possible to determine the location from a single timestamp and information about which satellite it belongs to? I suppose if the recipient already has a fix, then it could perhaps survive with less than 3 satellites by making some assumptions, but I imagine this will result in lower quality location information.
Were you proposing to assume the location of a 5m sphere the recipient is in?
> I don't understand this. As far as I know, the satellite basically sends its identifier and precise time, and from this information (combined with the information in GPS calendar that tells the locations of the satellites) the recipient can determines its own location.
I'd assumed the GPS calendar was somehow broadcasted by the GPS network too, which kind of means that they also share their location.
> Were you proposing to assume the location of a 5m sphere the recipient is in?
I guess the proposal was to change the problem from pinpoint a single point in space, to figure out roughly where I am, in which case being anywhere in a tiny sphere is pretty much the same as being in a point after you account for errors.
The satellite also sends information about all the other satellites that a receiver should be able to see. This is what makes adding other transmitters hard/impossible I guess - no way to tell the overhead satellites that your ground station also exists (there would presumably be thousands of them - most not in range of your receiver which would be even more problems.)
Well, you are not a GPS satellite, so you are indeed spoofing military equipment.
On a serious note, I recall that smartphone location in metro in my city started to "just work" as soon as all stations and tunnels had indoor cell towers. Suddenly all apps worked fine and I forgot that problem ever existed.
Modern location detection is as scary as it is amazing.
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!
The usual answer that will be thrown around to justify this is that London has the oldest underground metro system, whether that’s relevant or not. It doesn’t seem very relevant when even the deepest stations in Prague (which are newer but much deeper than most of London) have later added 5G throughout tunnels with download speeds of ~200 Mbps between stations.
I suspect the UK just doesn’t have modern standards for mobile internet service, as it isn’t limited to TfL services in London.
There isn’t even reliable mobile coverage on stretches of the West Coast Main Line rail corridor in England, which is outdoors and connects the UK’s most populous cities.
Much of London isn’t particularly reliable either on most mobile networks, in my experience. Meanwhile, in cities like Prague or Washington I can often get mobile download speeds outdoors of 400 Mbps - 1-2 Gbps.
Half the LU tunnels are barely larger than the train, the other half are cut'n'cover. And they're rarely straight. And most lines run from 5am to midnight. Some now run almost 24 hrs.
That probably influences the decisions on roll-out and cost.
TFL has been ahead-of-the-curve with the rollout of some tech (Oyster cards, tap'n'go), but not so much with others when they get hacked.
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.
To get position from accelerometer data you have to integrate it twice. Accelerometer data is noisy, and integrating noise quickly leads to large deviations. That's why you need some kind of absolute position reference, like GPS, to not get bigger and bigger errors.
Here, they seem to estimate which stations they are at or between, and use that as absolute references.
Your running app is using accelerometer data to recognize when you're taking a step, and combining that with GPS data to measure how far you're running. So if it measures 100 meter using GPS and counts 100 steps during that time, your step length is 1 m. Garmin watches uses this to measure your running distance on treadmills, but they want you to calibrate it by running with GPS on a flat surface outdoor first. I don't know if any watches or apps use this in combination with GPS to make better position estimates when the GPS reception is poor, my guess is no because it's really only useful for distance, not position, and generally when running outdoors you're not running in completely straight lines. But it should be possible to estimate distance and combining it with their routing software to guess which way you took for short parts of the course.
(guessing) Stride length is a scalar, path is a vector? Inertial navigation systems suffer from a build up of the error. Perhaps it's not practical even if it's possible to calculate position based on those sensors alone
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.
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.
> 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?
Great question! I'm one of the developers behind this project and your guesses are good.
Other difficult cases include trains stopping between two stations (doesn't happen everywhere, but it's frequent in NYC), or a user walking fast onboard a moving train, which can be mistaken for the user having gotten off the train.
Taking a train in the opposite directions will break the assumptions we make and we won't know until the next GPS location
For the express vs. local, sometimes it will ASK me what train I am on. When there are delays that cause trains to be closer together, it does this. I presume they are crowd-sourcing some data instead of trying to only use an algorithm.
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...
15 years ago, sat nav systems built into cars would sometimes be fitted with a rate gyro and get a wheel speed signal from the car - to make them work better in tunnels and other areas with poor GPS signals.
(Of course, that one area of superior performance couldn't make up for the awful GUIs, the awful resistive touchscreens, the $100 map updates, and suchlike)
I can't see inside Maps, but it does look like they use accellerometer data or just assumptions to continue animating your position on the map. Assumption being for example that you will follow the route through the tunnel at your current average speed. Close and good enough for most tunnels I suppose.
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 checked twice in disbelief, but amongst many many places - London (UK) not being listed was surprising to me. I thought it's maybe some extra challenge of the oldest subway system.
That’s a bummer, I use it daily in SF and the tracker it has for upcoming buses/trains has always been super accurate, and the stop countdown is always dead on. It even tells me when I need to speed up my walking to make it to the next bus in case it’s running a little early.
CityMapper is probably the best app for London, although I can't recall how it behaves in deep tunnels. I think it may just use a timer to alert you when to get off.
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.
Some cities let you pay with contactless credit cards (at least London and New York have it; Boston and San Francisco are working on it) which seems like the most elegant solution to this, at least from a commuter’s point of view.
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.
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.
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?
I'd assume it's the length (in time) of the vibration since the last stop. There may be edge cases where if the train is moving slowly, but overall it's a smart technique.
If there's a delay that will really confuse it though, either if your train isn't going at the speed the app expects or it stops at a point outside of a station
It probably would, but if someone has the app running, then the app knows what train they are trying to get on, and so if the data is all consistent with being on a train they are probably on that train. The app also knows where the train is, so it knows where you are as well. It won't know which train car you are on, but that normally doesn't matter.
This probably is wrong if trains for both directions stop at the same time from opposite sides of the same platform and you get on the wrong train. However this is a rare enough case that we can ignore it - but very annoying if you are that person (this case happens to most transit riders once or twice in their life). Even when this happens there often is other location data scattered around so you would likely only ride a stop or two before the app realizes you are on the wrong train and can reroute you.
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
I think it's one of the "pointless but cool" projects, but yes, I don't get it either. Any decent underground system would already have audio and visual announcements; I don't think I have ever cared to know where between stations the train is.
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.
But dead reckoning for train travel should be massively easier. Train movement is constrained to tracks so you only need to resolve how far along track train has moved + possible junctions, which should already make the problem much simpler than e.g. airplane ins where you are resolving full 3d position. To make things even more easier, you only need to reckon between individual stops which prevents error accumulation over the whole trip. Lastly you have schedule information, so you know roughly where the train should be at any given moment.
There is a very good set of podcasts[0] by Cautionary Tales about the German V2 rockets in WW2 which tried to use this. It was so hard the Allies allowed them to continue wasting money on it during the war. Well worth a listen to if you're into that.
Edit: found it. https://medium.com/snips-ai/underground-location-tracking-3e...