4 ms·
It's strange, I look at my Google maps histories, and it showed when I traveled by car vs by motorcycle. In a state like California, where lane splitting is leg
by ralusek 5y ago
It's strange, I look at my Google maps histories, and it showed when I traveled by car vs by motorcycle. In a state like California, where lane splitting is legal, I figured they might use [going faster than surrounding stopped traffic] to determine, but since I've moved, it continues to indicate correctly. Only way I assume they're doing this is via accelerometer.
- jeffbee 5y agoWow I never noticed that. I wonder how they do that. iOS activity recognition only offers "automotive", and Android has "IN_VEHICLE" and "TILTING". You could classify motorcycling pretty easily offline with sensor data but I'm not really familiar with how motion data is collected, and how often.
- photojosh 5y ago> iOS activity recognition only offers "automotive" I assume you mean in terms of motorised movement? Because it definitely tracks cycling, running and walking separately.
- jeffbee 5y agoRight, of the relevant activities, I meant. Android also has others like walking, bus, etc.
- jimmygrapes 5y agoFrom this point on I shall lean into my turns in my car
- ggreer 5y agoThe forces are balanced when turning on a motorcycle, just like turning in an airplane. The phone’s gyroscope could notice the roll, but the accelerometer will just read slightly higher g forces in the “down” direction. That said, you can differentiate between car vs motorcycle. Cars don’t tilt so turning causes lateral acceleration.
- dmitrygr 5y agoYes. Activity detection is performed by occasionally sampling the the accelerometer in android phones. IIRC, it is turned on for a few seconds every 60 seconds or so, and the samples are sent through a rather simple ML model that produces: {activity as one of: {biking, walking, running, driving, motorcycling, unknown, <a few i do not remember>}, confidence: float [0..1)} . Source: worked on this long ago at Google.
- nitrogen 5y agoHow does one turn this off?
- DoingIsLearning 5y agoOn Android, if you go into Permissions, your Google Maps app will probably have 'Physical Activity' as an allowed permission. You can change it to 'Deny'. In fact you can do the same for 'Google Maps' and 'Google'. Weather that permission denying actually blocks accelerometer access to the app or simply stops it being associated with your profile is beyond me. At least on Pixel I cannot deny 'Google Play Services' from access Physical Activity so it seems like a feel good permission and they still grab whatever data they want. Perhaps someone working in Maps can answer that?
- dmitrygr 5y agoThe actual processing happens on a microcontroller, not on the main application core. In some cases it is a small hexagon core on the main CPU, in other cases an actually separate Cortex-M3 (or the like). Doing this sort of thing on the main CPU would cause too much power draw due to frequent wakes. The microcontroller OS code lives here: https://android.googlesource.com/device/google/contexthub/+/refs/heads/master https://android.googlesource.com/device/google/contexthub/+/... It supports loading binary "micro-apps" (with optional encryption and/or signing) and provides them an API to use to gain sensor data access. Sensor drivers are also loaded as micro-apps. As is the "communicate with the main android CPU" code. It is also a micro-app. The OS itself is little more than an event loop, some power management, timer provider, and the loader of micro-apps in a particular format. Activity detection is one of such micro-apps and is, as far as I know, not itself open source. Source: I was the TL for this project back in the day
- BurningFrog 5y agoAs in, the bike ride is shakier?