[Q] Driver or app / use GPS to spoof magnetometer - Android Q&A, Help & Troubleshooting

There are a lot of devices out there without a built-in magnetometer, such as the Parrot Asteroid Smart (runs gingerbread, it's a double-DIN sized car stereo head unit). Without a magnetometer, lots of apps that expect one default to true north and otherwise don't function well. I've searched an there isn't a current app/driver that will respond to magnetometer direction requests with current (or previous) GPS heading.
So here's my plan:
create a driver that sits in between the magnetometer and user-ring applications. When a request is made for current compass direction, the driver redirects to the GPS and requests current (or if not moving, previous) heading. Voila! Apps that want to talk to the compass are now happy.
This could be used for other things as well, such as bypassing the internal magnetometer (on devices where there is one), useful for playing Ingress to override the cruddy compass experience (on my HTC one, which I prefer to call my HT cone).
So, why the post? I think I've searched pretty well, looking for "no compass", "no magnetometer" and '" simulate magnetometer' gps" but the only app I found was for some ancient version of Windows Mobile, and that app put predictive data in between the applications and GPS data, smoothing the GPS output. (The concept is the same, however .... intercept geo requests and respond with modified (or in my case, new) data.)
I'm getting to work creating a driver, but so far it's not very easy going, but it is almost going (thank you github, stackoverflow) but I can't be the first person to try and use GPS heading to simulate magnetometer direction. There are base classes that provide direction, 99% of the direction apps out there are simply requesting compass direction, certainly not crunching raw magnetometer data. Conceptually it should be easy to hook that call (compassGetDirection) and respond with gpsGetHeading data.
I still haven't asked a question. So, in the interest of being annoying (yes, <==noob), please assume all the above sentences are in the form of a question, like "what do you think of ..." and "have any of you ..." or "is it possible to ..."

Related

Google Maps lack of compass

How can the developer of Google Maps not have a compass and auto rotation of maps on the Hero version when other apps are able to provide one ?
Anyone know why as its a pain.
Not sure, but if you are using street view withing Google Maps, then you can enable the compass. I really like that. It should be available with the normal maps.
What other map application uses the compass?
This was a big disappointment for me as well. Compass was the main reason for switching to a low resolution device from HD.
Having compass on the map would help a lot with pedestrian navigation. The compass in streetview in my opinion is only a gimmick and not really needed more than a few minutes when you first got the device.
However, in the map view if you had a compass on one corner, then you would work out which direction to walk. Even with low accuracy, it would certainly help. The map points north and therefore, seeing which direction is north would give you idea rather than walking around fast to see your direction from GPS.
HereIm Map Helper sort of does the job but you still need two applications.
Also it is interesting to see, Google staff's replies to this issue.
http://www.google.com/support/forum/p/Google+Mobile/thread?tid=6b2c0d5872df9ab2&hl=en
It seems, they are not really using the products they are developing.
I still like the device and no regrets. but I could not give up HD yet mainly due to proper exhange support. Now that I am using sony ebook reader, resolution is also not a big deal anymore.
clobber said:
What other map application uses the compass?
Click to expand...
Click to collapse
RMaps, Location Scout to name but two...
When I use google map theres a little blue arrow showing which direction I'm facing...if I turn the phone around, the arrow turns too so its using the compass. I Guess you want the map to turn?
Ah... thats the direction arrow, not the compass. It will only turn if it detects you walking.
If standing still it won't generally face the way you are until you move forwards.
A compass would point north and rotate the map with you as you turn... like on iPhone...

Navigation software

wasnt sure if i should put this here or in the general forum.
Disclaimer: I used igo with my winmo device (ATT tilt) so i may be a bit biased. igo was also the first navigation software i used
So i do not have a data plan, i use wifi most of the time. Does anyone have a recommendation on the best gps software for our phones (unlike most people my gps works, even though it takes about 2-3 minutes for a cold fix.
Here are the ones i know:
COPILOT 8
I got copilot 8, sweet interface (truly the best gps interface out there), runs quite smoothly. only one problem:
-It calculates the best route horribly.
-POIs are great.... if you do not like popular chains ( can you beleive it has no burger king, mcdonalds, popeyes or any of the popular fast food places).
-you need to specify a city to find the street (just never liked that)
-super fast and smooth, no lag and hardly any choppiness except when panning the map
- live weather (traffic to come soon)
- great detour options (can choose to avoid any road on your route)
- displays pois right on the map so you can see every POI right on the map without having to go searching in the menu.
kinda nice just to click an icon and see everything around you.... now only if it had half of the things around you in its database
-uses your default keyboard (could be good or bad)
* the poi issue can kinda be fixed if you have a data connection, it can do an internet search for places, then you can save them to your favorites, but next time you want to find some other place you have not been to, get ready to use the internet again. but if you want that, might as well stick with google/bing navigation
so basically copilot 8 UI : SUPERB
actual navigating: Crap
IGO
so igo has 2 navi softwares, and unfortunately for us, none work on our devices properly.
igo motonav (the one i actually tested): resolution is meant for motorola android devices, which are 54 pixels longer.
igo myway: resolution is way smaller (320 x 480 i think), only takes up about a third of our screen real estate.
there is a work around for motonav to make it fit our screen, but for some reason it still produces a very choppy/laggy experience, but still very useable.
so basically: igo has the great navigation capabilities
-, an ok UI,
-EVERY POI YOU WILL EVER WANT
-ability to search for a street without specifying a city
-also has live traffic
-NO OPTIONS FOR DETOURS, only detours i could find was traffic detour, and that it does automatically if it finds too much traffic on your route.
-has its own keyboard, kinda makes it easier for finding places since it eliminates letters while you type
-You do have alternate routes depending on how you want to travel (fast, economical, short etc)
SO OVERALL:
igo: better maps, poi and actual navigation
copilot: better UI, ease of use, smoothness/speed of software and quite a few more navigation options.
does anyone have any suggestions on a gps app that combines both igos 'actual navigation' ability and copilots 'features/smoothness'? Or a quick fix to get better POIs on copilot easily
hopes this helps anyone looking for navigation software, feel free to leave input
I don't have a data plan either. And I'm a CoPilot fan simply cause due to it's ease of use. Plug in an address, it gets you there. Usually when I need a GPS I'm in a hurry somewhere and rely on the GPS to get me there as fast as possibly so this is why I appreciate the CoPilot.
I also like how pretty it looks on the Vibrant. Very high resolution, responsive, and it has VOICE! I'm not sure if Igo has voice but for me, that is a BIG feature while driving. I integrate it with my music so I listen to music and every now and then a nice voice tells me where to go. I don't need to look at it much. I love it
I have been using Copilot since September of 2009. Earlier versions had all sorts of problems and imagine it running on G1 - slow and paiinful. It was working very well on my Vibrant pretty from the software side but the Vibrant GPS problems made it rather hit or miss as my device would accasionally freeze or reboot. So, following suggestions of many, I have finally bit the bullet and reset my Vibrant to factory settings. I reinstalled Copilot from the Market but now it tells me that my trial period has expired and I am not able to go past that to enter my product license key. Earlier this year I have even bought the live traffic for a year for $20 and I have a separate product license key for that as well. However, as a result of being completely locked out of the software by the initial activation (where you have to enter your Google checkout number and Copilot ID) screen, I am unable to use it anymore. I paid $35 for the software and $20 for the traffic addon and I am completely unable to use it as if I was a pirate that stole the darn thing - great job ALK Sofware. I opened an online support request but they are notorious for not answering these requests so I am not holding my breath at this point for ever being able to use their software again - unless I change my Google account and buy the software again I guess but that is just not going to happen. Very frustrating...
Bottom line is, Copilot is great when it works but once you have problems with it, good luck getting their support and fixing your issue.
So, since Copilot is quickly turning into a throwaway for me, does anybody else have some comparable or hopefully better suggestions? Has anybody heard of or used Sygic Aura for example? How about Destinator? Any input and reviews will be greatly appreciated since I seem to be in a market for a new navigation software. Thank you in advance...
if you search the internet hard, you could find people who have modified igo to fit our screens
I've been using Sygic Mobile Maps for some time now. Have used it on Windows Mobile and it's even better (more responsive on my Android (Galaxy S i9000).

[Q] Cycling GPS Turn-by-Turn Nav.

Is there a good app that gives Turn-by-Turn Cycling Navigation on Android? I know that you can get directions on Google Maps but it doesn't provide Navigation like they do for driving, walking, & public transit. I've been googling all over the place trying to find an app that actually works and have not come across anything. Does anyone know of a good one?
If you're riding in the streets, just use any other carnav, right? Clearly sometimes depending upon the circumstances you'll have to be aware of road rules or safety and there are times one must do a P turn rather than a left turn, but you just assess that as you go along.
Curious how you're doing this... Headphones? (Hopefully not!) Handlebar mount?
As for if you're riding in bike paths, offroad, etc, there are apps out there which you can record a path and they can direct you on that path. I could do some searching, I know I saw at least one out there that'll direct you down a known route. Keep in mind that you'll be creating these routes yourself as they're typically intended as breadcrumbs.. ie: Getting back out of a hike or such.
A bit of googling and I found this: http://www.appbrain.com/app/bike-hub-cycle-journey-planner/com.bikehub.journeyplanner but some of the comments say it HAS to leave the screen on in order to keep working... Derp. And might be UK only, although they say they rely on OSM so it's very possible it works elsewhere. Yeah, seems to be, I keep getting "Destination too far away"... Aha, because it uses a "cyclestreets.net" as its routing engine, which is UK-only. Poo.
This one you can plan on the web and get turn by turn, but from what I'm reading it does not do online maps so you need to preload them? Might have to look into it some more.. https://market.android.com/details?id=com.trimble.outdoors.gpsapp.android
Thanks khaytsus for looking that up for me but unfortunately those apps are not what I'm looking for and I have tried them before making my post.
To be a bit more clear though, I am looking to keep my phone in my pocket or arm band, have only one speaker in my ear (like a bluetooth earpiece) to tell me the instructions for each turn and have the phone vibrate as well.
The closest I found was bike-hub but you are right that it is just UK because I was unable to map out any route when searching thru the app.
I would prefer to have it more GPS like so I don't have to map it out on the PC beforehand and do not want to really use the regular GPS apps because even walking directions (though they avoid going on highways) they do not follow bike trails (which may be quicker than following side roads).
If you can't find it or someone else then I can look more but I'm starting to think there is not one currently for the US market
I hope now that this is in Android Q&A that someone will find/develop this
I guess I'm the only one interested in this

[App Request] Gyroscope Emulator/Virtual Gyroscope

I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance
Hi, I'm also looking for some app that fakes gyro sensor as I have the same problem. In theory a dev could interpret those algorithms from that Github repo and make an emulator, unfortunately this is out of my knowledge.
So I hope someone could help us poor ungyroscoped people.
Yeah, it's big problem with most phones to use VR apps/games that require gyroscope. I have the same problem.
Google should think about gyro pseudo emulation with accelerometers in their Cardboard API or at least implement there something like this lib: https://code.google.com/p/openintents/wiki/SensorSimulator
so anyone could use different phone (with gyro) as remote gyro for phone in cardboard glasses or write gyro emulators much more easily (as this lib can open TCP port for remote sensors data).
Technically, yes, it should be possible, using Xposed.
I am working on a module that eliminate the jitter in unreliable phone's gyroscopes. It does so by hooking to the function that distpaches the various sensors' data to every apps that require them, and it fakes the values before these data get sent.
Since you can easily access any sensor's data, you can do any sensor fusion you want by using the accelerometer and magnetometer, or even just the touch screen, and then fake the gyroscope's values.
If you are interested, here is the Xposed module I'm working on, which shows how to hook to the gyroscope and fake the values:
On github: lrq3000/JitteryGyroFixForCardboard
And to implement sensor fusion, you can either use the new virtual sensors of Android 4, or code it yourself, there's a very good open source app that shows it all here:
On github: KEOpenSource/GyroscopeExplorer
Hey thank you for that info! I'll be taking a look at that as soon as I can, although I'm not an avid dev I hope we can get something for our phones.
shafiaszad said:
I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance
Click to expand...
Click to collapse
Yes, same problem here. The facts, med-low or med or med-high device not attached by gyro, except xiaomi. Some people on quorra debated, they have idea to make an app which can do headtracking with camera by detecting pixel shift. Yes i like that idea and the idea sounds possible, but it out of my knowledge. Can anyone make app like that? Or maybe we can ask google to make the app?
Thanks
What about emulating gyro using accelerometer and compass? In the Google Play is app for phones without gyroscope, (we are in space: LINK) so it is possible
I would love to see something like this too. This dev has several VR apps and the head tracking all works perfectly on my Moto G 3rd gen which has no Gyro, so I know it is possible. I've played House of Terror and the head tracking works extremely well and pretty smooth too, I wonder what their method is, I assume compass + accelerometer. https://play.google.com/store/apps/developer?id=Lakento
shafiaszad said:
I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance
Click to expand...
Click to collapse
Same problem. I also have a k3 note and it has a virtual gyro. i think there must be something that uses accelateometer and magnetometer to detect direction and angle.(and i think this is possible)
Guys try vr player from play store then goto settings and there would be orientation detector set it to accelerometer +compass and you are donw
Same Problem
lrq3000 said:
Technically, yes, it should be possible, using Xposed.
I am working on a module that eliminate the jitter in unreliable phone's gyroscopes. It does so by hooking to the function that distpaches the various sensors' data to every apps that require them, and it fakes the values before these data get sent.
Since you can easily access any sensor's data, you can do any sensor fusion you want by using the accelerometer and magnetometer, or even just the touch screen, and then fake the gyroscope's values.
If you are interested, here is the Xposed module I'm working on, which shows how to hook to the gyroscope and fake the values:
On github: lrq3000/JitteryGyroFixForCardboard
And to implement sensor fusion, you can either use the new virtual sensors of Android 4, or code it yourself, there's a very good open source app that shows it all here:
On github: KEOpenSource/GyroscopeExplorer
Click to expand...
Click to collapse
I bought a vr case and have the same problem my galaxy sm a510m (A5 2016) doesnt have gyro! When i saw that i couldnt believe it.... it opens with my fingerprint for the love of crist!!! :crying:
Any solutions?
I have a moto g 3 and can't experience Pokemon go neither vr visor from one plus
Sent from my MotoG3 using XDA-Developers mobile app
Is there still hope?
If there is no way (for whatever reason) to emulate a gyro...is there a method to add a gyroscope sensor to an android?
Sent from a Samsung Galaxy J7 user
Same here, i too need an APP that simulate the gyro functions.
Hope that someone could implement that using compass and accelerometer!
Thanks
Some app like this would be so cool...
I was a bit dissapointed after buying the Moto X Play and noticing it doesn't have gyroscope so no Augmented Reality on Pokemon GO.
Im so sad, i had a moto g2 and bought motog3 1 month ago, this thing doesnt have a gyroscope while motog2 had one. Is there no solution for this? I mean, with something like a virtual gyroscope
pokulan said:
What about emulating gyro using accelerometer and compass? In the Google Play is app for phones without gyroscope, (we are in space: LINK) so it is possible
Click to expand...
Click to collapse
I've tested with my Moto G 3rd and works well. I hope somebody develop some hook in Xposed to work with accelerometer and compass...
or lests just hope the pokemon go app support accelerometer + compass it in the future.
I feel where you all are coming from. I agree there needs to be an app, an xposed module, or something to get this functionality. I'm gonna try and figure this out, there's a post on stackoverflow about this. A guy was talking about how in order to do it you'd need to recreate files similar to the ones that poll the actual hardware. He's basically saying you need to create some sort of mock gyroscope polling code right above the hardware level. I don't think that's the best approach, we gotta go top down not bottom up on this. I don't know much about the inner workings of android but I know this, looking at how to grab sensor data just using a plain app uses the classes sensor and sensor manager. As far as i can tell these are fed with information by the sensor event listener. That is fed by the object sensor event. It states right on the documentation "This class represents a Sensor event and holds information such as the sensor's type, the time-stamp, accuracy and of course the sensor's data." Its a generic sensor class which means we could possibly give it a fake gyroscope right?
Now, back to the sensor event listener, on the documentation it says "The application doesn't own the event object passed as a parameter and therefore cannot hold on to it. The object may be part of an internal pool and may be reused by the framework.". That means sensor event listener is literally just the messenger and should take whatever it finds as long as its valid. It seems like it will take whatever is passed to it correctly if we can make an event that it hears.
Now, amazingly on the sensor event page shows some fantastic stuff. Sensor event class is literally a 4 field class and I believe gets its values from that "hardware polling code" that sits above the hardware level. (the code that other guy was talking about.). If we can just make up some sensor events that mimic a gyroscope using accelerometer + compass and hope that the sensor event listener is configured to pick it up (I don't see why not) then I think this could be a possible solution. With all that being said, I'm just a beginner when it comes to android. I'm a college kid with a background in c and java just trying to piece the puzzle pieces together and play some pokemon lol.
Edit: So I may have been way off the mark, I'm not sure anymore. I found this though, a way to use actual custom sensors with android http : // riansanderson.blogspot . com/2012/03/integrating-sensors-into-android . html . Sorry for the spaces, I can't post links. After more java delving it seems it is not possible to create your own spoofed sensor or sensor event if your code is not in the same package as android.hardware.Sensor or SensorEvent
Edit2: So I guess unless you can get code to run in that android.hardware package, you'd have to do something like that link above and make like a fake driver for fake hardware.. I suppose if you could modify android.hardware.sensor to just make a gyroscope sensor and take the values from the accelerometer and modify those on the fly.
Try this solution
hello all from Egypt
this tutorial isn't mine or my invention you can say it's information sharing
I am Waleed and i have Huawei honor 4x which has no gyroscope at all, but i found some solution to this problem which is:
1- you must have ROOT (without root you can't do anything at all)
2- install root explorer if it isn't installed in your mobile and be sure to allow root permission to it
3- download the attached xml file which activate soft gyroscope in your mobile and place this file in your SD card
4- open root explorer and copy the xml file you downloaded and go to this path "/system/etc/permissions" and paste the file there and be sure the file exists in this place
5- reboot the phone then install any app from Google play to check the gyroscope i suggest sensor box
6- I hope this information is valuable and useful for you
thanks

[App request] HUD GPS Map app

I'm running a stock Moto G7 Power (Android Pie) (no root)
I'm looking for an app that offers a mirrored interface for a cheap reflective HUD gadget with something like Google Maps' driving mode (it shows a map, with my location on it, and [here's where apps like HUDWAY Go and most of what I've found falter] it needs to show street names of the upcoming streets, not just the one I'm on).
I have weird use case, I know, but I'm not looking for turn-by-turn navigation. I'm making a lot of residential stops so that's mostly not even an option (I haven't seen an app that can handle 50 residential stops well [and I don't want to go into why various approaches won't work unsolicited (eg only putting some of them in, futzing around with the routing, etc., if you really feel the need, I can explain of course)]).
I'm tempted to put in a request to an open source app like OSMAnd for the feature, since adding it to a map view can be bodged with `SetRotationY(180)` pretty easily, and for a proper dev, adding a setting menu entry for it would also be pretty easy (an elegant solution would probably take a few hours) or even just forking it and doing the bodge job myself. I figured I'd ask first if anyone knew of an easier or off the shelf solution.

Categories

Resources