Is it possible to calibrate the compass? - Hero, G2 Touch General

Dear Android users,
I will buy a Hero soon, but I'm a bit sceptical about the digital compass.
Is it possible to calibrate it in some way? A friend of mine told me he used the "sky map" pointed his phone at the moon and it was way off, the time was set correctly and the location set by gps...
If it isn't poissible it would be a nice idea for a developer
Hope to hear from you guys,
Daanjordaan

none that i have found. Mine is slightly off, but not by much...
but then, i'm not worried massivley, as it is accurate enough for my needs.
but yeah, it would be great to be able to re-calibrate it just for the sake of being deadly accurate.

For developers
Exeactly it's just a nice feeling to now that it's dead on.
I think its not that hard to make a calibration tool for it.
Use GPS and walk a few meters north.
The GPS app then knows which way it's pointed.
Then port that information to the digital compass and voila...
Since I'm not a developer, I hope someone who is can do something with this idea

Related

Any compass app for TP2 ?

Hey, I would like to use a compass with my TP2, any nice app available?
You'd only get some form of GPS compass as there is no magnetic compass in the TP2 like there is in the 3GS...
I love how apple put a relatively useless app into a phone and then all of a sudden everyone wants one
Well, it's Apple, man. they can make canned sh*t and everybody will want it. They are godlike on marketting.
As for the compass, no there isn't one, only GPS compass, and then again, you need to have a signal.
You can try this thing I found while googling and binging, Here at softpedia
jeah, f**king hype.. why the hell somebody needs a compass, although most navigationsoftwares got it integrated
iPhone users need the compass to navigate, obviously!
comingloud said:
why the hell somebody needs a compass
Click to expand...
Click to collapse
We have GPS, which gives us a reference point in space. We have a G-sensor, which gives us rotation with reference to center of the earth. Problem is, these two only let our phone know where it is, and how high it's looking, whether down at the ground, up into the sky, or somewhere in between. It also tells it which way it's tilted (clockwise/counterclockwise). However, we need at least two points of reference to give an exact orientation of a device. A compass can do that with north pole being the second reference. With all three sensors a phone can not only tell where it is, but also exactly what it is looking at (not just how it's tilted or where it is in relation to the horizon). With information like this, we would also be able to teach the phone to know what it is looking at, not just where we are (as current GPS software does). Here's a great example of what's possible with a compass:
http://www.engadgetmobile.com/2009/...-layar-is-worlds-first-augmented-reality-bro/
I can see where this is going. Sure it's fun for games, presentations, virtual tours, etc, but hey, I really wonder if someone is stupid enough to actually use to use the compass with the GPS when finding a spot. I can imagine, "In 200 Meters turn RiGhT. You are NOt LooKING at ThE RIghT WaY. In 10 MeTErs Turn your head LeFT, You have ARRiVed."
That would be me
I'm as dense as an iphone user. I get really confused when google route tells me to head east. Not good at navigating by clouds, or stars for that matter.
Philio25 said:
iPhone users need the compass to navigate, obviously!
Click to expand...
Click to collapse
true as that may be, how can they see the compass if the phone is in their arse? bluetooth earpiece telling them which way maybe?

Working on a Track app for motorcycles

Hi all,
I'm relatively new to the WinMo programming, but so far I've been able to capture and process the Gsensor data, but I can't seem to understand how to use the GPS data.
I want an app that will record the GPS position along with all of the Gsensor data so that I can record the route and have data for each point that contains lean angle, acceleration, deceleration, etc. I figure I'll have to have the Gsensor fill in for some of the GPS data and vice-versa.
Why you ask?
Well, let's say you put it in a suspension test mode. You could accelerate gradually and brake. Hopefully the gsensor could catch the dive and bobble of the bike and give you some feedback. Knowing how far you are leaning in some turns is nice. You could possible detect and calculate if you are sliding at all. Perhaps you could even calculate the power output if you included the weight. You could make a mode that would yell at you if you get the front wheel too far off the ground, etc. I think there are all kinds of fun things to do. I know there are expensive and half solutions out there, but having an opensource solution would be nifty.
I'm a relative noob with C# and I'm using SharpDevelop. If anyone has any suggestions for things to implement or can help me acquire and use the GPS data I'd appreciate it.
If this sounds like a dumb idea I can always abandon it too.
Thanks guys.
lol, actually I think its a cool idea to be able to log what your doing. And maybe a top speed via the GPS. I think that would be a really cool app to have when I ride.
gliscameria said:
Hi all,
I'm relatively new to the WinMo programming, but so far I've been able to capture and process the Gsensor data, but I can't seem to understand how to use the GPS data.
I want an app that will record the GPS position along with all of the Gsensor data so that I can record the route and have data for each point that contains lean angle, acceleration, deceleration, etc. I figure I'll have to have the Gsensor fill in for some of the GPS data and vice-versa.
Why you ask?
Well, let's say you put it in a suspension test mode. You could accelerate gradually and brake. Hopefully the gsensor could catch the dive and bobble of the bike and give you some feedback. Knowing how far you are leaning in some turns is nice. You could possible detect and calculate if you are sliding at all. Perhaps you could even calculate the power output if you included the weight. You could make a mode that would yell at you if you get the front wheel too far off the ground, etc. I think there are all kinds of fun things to do. I know there are expensive and half solutions out there, but having an opensource solution would be nifty.
I'm a relative noob with C# and I'm using SharpDevelop. If anyone has any suggestions for things to implement or can help me acquire and use the GPS data I'd appreciate it.
If this sounds like a dumb idea I can always abandon it too.
Thanks guys.
Click to expand...
Click to collapse
I don't think its a "practical" idea, not dumb, but for learning how to code and stuff, its a great idea. I'm assuming you enjoy riding at the track, so that'd keep you motivated to continue the app development.
There are already similar apps, but I don't know if they will detect lean angle and brake dive.
That's the first thing I thought of when I saw this app:
http://forum.xda-developers.com/showthread.php?t=424423
I haven't played with it, but maybe it could give you something to start with.
Check this out too
http://www.racechrono.com/
The newest SpeedoHealer has a top speed recall on it, and its only $100 for the whole system. Much less than having to buy a WM phone just to record top speeds.
Most of us need one of those anyway, but if you could make your app work in conjunction with that system.. could be very useful.
Especially for the initial calibration. Get the correct GPS speed from the phone, and then get on the SH website from the phone for the correct calibration code! Or find a way to integrate the SH code program thing into your app. so you don't have to get online for the code. That would be very useful for gearing changes at bike nights when the dyno is unavailable.
But you could load some track maps in it, have the thing record acc/dec at which points at each corner. Then you could see where you started braking at, and decide if you need to brake sooner and softer, or later and harder.
Maybe if (lets hope not) you go down, you could see how much decel. at what angle caused the loss of control.
Think you could set it up to calibrate the 2 axis independantly?
set the side to side while on a stand, then remove the stand and calibrate the front to back when loaded with the rider at static sag, cuz its going to change from when its on the stand and the stand is the only way you're going to get anything close to accurate verticle calibration, but the front to back will be off with the back wheel raised.
Where you thinking of mounting the phone to the bar/tripple clamps?
or under the tail?
I think I'd be afraid of losing such an expensive piece of equipment if it was mounted upfront. But you can't see anything on the screen under the tail.
Unless you didn't want it to display anything, just collect data.
Not that you'd be able to do much screen touching with gloves on anyway.
Better use large buttons! lol
Do you think you could setup the light sensor to determine if a headlight bulb is getting old? I don't know if the sensor will work when flooded with that much direct light.
Well anyway, just a few ideas for ya.
I don't ride at the track, but I'd like to test the app out when you get a working beta going.
I'm sure it could have its uses on the street.
And I know the speedo is off on my 08 Busa.
KYT said:
Well anyway, just a few ideas for ya.
I don't ride at the track, but I'd like to test the app out when you get a working beta going.
I'm sure it could have its uses on the street.
And I know the speedo is off on my 08 Busa.
Click to expand...
Click to collapse
Thanks for the input. Until I can find some help on the GPS aspect of it I'm kinda idling.
I'm thinking...
When you start the app you will have to have it mounted and be on the bike. There will be a calibrate button which you will press when you are centered. From there on out you can pick a mode.
Your busa better not have any chrome on it. =/
Keep it up!
Very cool idea! I actually experimented with an analog 'curve counter' mounted to my motorcycle several years ago. Built a box with a steel ball inside that rode along a curved piece of metal and made contact closure with a terminal on each end - different viscosities of oil provided the dampening to keep it from bouncing around. This was coupled to an electronic counter that I built from a kit. It was kinda cool, but a pain to get mounted.
I don't have the experience to lend for application development, but I would certainly be willing to test any versions of the app you would like.
FYI - right now I use Run.GPS for tracking but would love to have lean angle and acceleration/deceleration data to go along with it. The only glitch with lean angle is that I assume the centrifugal force during cornering would prevent the accelerometer from reading the true lean angle...maybe some calculations could compensate.
go for it!
my hayabusa, my tp2 and I would be happy to be in your test team ;-)
and BTW, I am a veteran C# developer, so let me know if I can help.
(experienced in C#, but not in Win-Mo or HTC hardware)

Does compass really tell the truth?

We have a few HD2's in the office and just playing around with all the apps. The compass seems to be either plain wrong or flaky at best. Mind you we are in a building so that is unlikely to help.
Just wondered if someone has test it's accuracy.
It's accurate.
But remember that electrostaticity will make your sensor to not work accurately!
Tried it
rphillip said:
We have a few HD2's in the office and just playing around with all the apps. The compass seems to be either plain wrong or flaky at best. Mind you we are in a building so that is unlikely to help.
Just wondered if someone has test it's accuracy.
Click to expand...
Click to collapse
in several places, and even after re-calibration.
was off by up to 90 degrees.
It can be .. in car for example. But in on outside, no way. The error should be in degrees.
Electronic compasses tend to be very sensitive to any metal around, so watch out. But generally HD2 compass should work very, very well.
Here is video how to calibrate:
http://www.youtube.com/watch?v=sP3d00Hr14o
I recommend doing it a bit slower. But this move. I totally didn't get it from the HTC description.
That's totally different from how I tried to calibrate it!
Any idea how I can recalibrate it? It's showing something crazy here...
for me it asks for calib every time i start it, maybe a soft reset?
But ye, i also did a way different calibration at first (bscly drawing a figure 8 in the air as if the bottom of the device was a pen) but doing the one shown in vid its now spot on compared to a analog compass, thx for the tip!

A Quasi-Solution to the Compass issue

So, I happened to accidentally launch Google Sky map and found that the map auto-rotated to the direction (due west) immediately. I thought possibly Eugene373's Vibrant9 ROM had some extra GPS mojo that no one had mentioned and I was all excited until I turned my phone to landscape and saw the bearing get all jacked. After a few seconds I realized the issue with the compass is that it is not compensating for the orientation of the screen. If you hold your device in "portrait mode" and perfectly vertical, the compass works flawlessly and fast. If you change the orientation to anything off that axis (ie turn the phone to "landscape" or rotate the phone so that it is not perfectly perpendicular to the ground), the compass gets slower and further off it's correct bearing. This would explain why occasionally I seem to have "decent" compass functionality while other times it is completely jacked up. So the good news in my mind is that this should be fixable via software, and there is an immediate work around to being able to use things that require the compass to work (hold your phone in a portrait orientation).While I prefer (as I assume most people do) to view maps, google sky maps and layar with the phone in a landscape orientation, at now I can use the apps now whereas before they were completely unusable.
If someone else figured this out, please let me know. As far as I can everyone knew the compass wasn't working but noone knew "why".
K
my compass has been fine, but i read somewhere that if you need to "recalibrate" it, you just make a swinging motion with the phone in your hand. i guess the movement is supposed to reset it or something?
i dunno. hasn't been an issue for me
It seems to be calibrated fine as long as you "hold it right" (credit to Steve Jobs for that one.... )
Nope. Even when I hold it in perfect "portrait" orientation it's really, REALLY slow to adjust to movement...even when said movement is on an axis level with the ground. You're right, though, other orientations seem to completely throw it for a loop. Laying it flat seems to work the best for me.
I can usually get it to work ok, but it's flaky and nowhere close to the performance I've seen in the compass in other, cheaper Android phones. Forget about SkyMaps...when I hold the phone pointed upward to look at stars the compass just spins to wherever it wants to.
It's not just my device, either, I've personally had 2 Vibrants that were exactly the same way, and others seem to be sharing the experience (those who know what the compass does, anyway...it has nothing to do with GPS). Calibrating helps a little, but it doesn't get it to the point of what I would consider "working well."
Well, glad it worked on mine, sorry it doesn't seem to be more universal.
:|
klkarlin said:
Well, glad it worked on mine, sorry it doesn't seem to be more universal.
:|
Click to expand...
Click to collapse
Just curious...after your compass "settles" and you turn 180 degrees how long does it take for the compass to settle again? How does it compare with other Android phones?

Gyro stability

Hi,
I'm a proud S2 owner but I'm note sure for how long. It seems the gyro in my device is very unstable. For example, if I use Google Maps and I turn on the sensor, the map will rotate if I only the tilt the device upwards (and this shouldn't cause a map rotation).
I've also tested some other apps using the gyro (STLView by ModuleWorks https://market.android.com/details?id=moduleWorks.STLView or some artificial horizon apps) and they all share this instability.
I have an EEE-Pad as well, and there those apps are really great.
So the question really is, is it just my device or can anyone else reproduce these issues?
Thanks,
Mark
I have the same issue.
pub00515 said:
Hi,
I'm a proud S2 owner but I'm note sure for how long. It seems the gyro in my device is very unstable. For example, if I use Google Maps and I turn on the sensor, the map will rotate if I only the tilt the device upwards (and this shouldn't cause a map rotation).
I've also tested some other apps using the gyro (STLView by ModuleWorks https://market.android.com/details?id=moduleWorks.STLView or some artificial horizon apps) and they all share this instability.
I have an EEE-Pad as well, and there those apps are really great.
So the question really is, is it just my device or can anyone else reproduce these issues?
Thanks,
Mark
Click to expand...
Click to collapse
I tested it on my sgs2 with maps and I don't seem to have the issues that you are experiencing. I even downloaded STLView and did not have this "instability" problem. Perhaps your handset is faulty?
Another possible reason is that you might have been trying to use your sgs2 in the bermuda triangle. It has been documented that the bermuda triangle wrecks havoc on electronics.
Are you sure maps use gyro ? I guess they use primarily compass and G-sensor, while of course, gyros can help too.
Did you try to calibrate the gyro sensor?
Yupp, tried calibration, didn't help.
@info5i2002
Pretty far from bermuda
In STLView, did you enable the gyro button (the button on the left side)? What happens if you tilt the phone by 90° (hold it over your head facing towards you) - does the heading swing around?
When I hold the phone level (in landscape orientation), and I tilt the phone up and down, I can clearly see the axis swing from left to right.
pub00515 said:
Yupp, tried calibration, didn't help.
@info5i2002
Pretty far from bermuda
In STLView, did you enable the gyro button (the button on the left side)? What happens if you tilt the phone by 90° (hold it over your head facing towards you) - does the heading swing around?
When I hold the phone level (in landscape orientation), and I tilt the phone up and down, I can clearly see the axis swing from left to right.
Click to expand...
Click to collapse
Yeap, tried it in landscape and tilted it up and down and it seems to move only up and down only.
If the device is in a case/cover which has Magnetic Lock then the issue is normal.
issue is NOT gyro related, what's described here is unstable accelerometer and/or compass readout. i guess it's mainly due to missing magnetic calibration (try to do the "8" pattern with the phone, AND turn the phone twice around each axis). if the problem persists, than it's maybe within technological limits (and everyone faces it, although the people here are more upset about it). also possible is magnetic interference due to huge amounts metal etc...
Yes .. people often confuse accelerometer (G-sensor), electronic gyroscopes, and compass. All do different things, but all can be used in applications like maps.
I also noticed that the magnetometer of my s2 is kind of imprecise.
I have continuously swinging head indication, of about +/- 15 degrees. Moreover, the correspondance from phone orientation and indication is not linear. I get higher sensitivity towards one direction and lower towards the opposite direction...
However what I did notice, is that the magnetometer, responsible for the compass, is very sensitive not only to nearby magnets, but even to metal objects at considerable distance. So perhaps it is all just this sensor beind a tad too sensitive.
Sent from my GT-I9100 using XDA App
Hi,
I've done a few more tests - I placed a strong magnet next to my Eee-pad and I had no deflection when I moved the magnet. So in this case, the app is correctly using the device's gyro and accelerometer. I then performed te same test with my S2 and bingo, I had a strong deflection as I moved the magnet. This is plain silly, as the sensor I'm using in my own app doesn't rely on the compass, instead it relies on the rotation vector sensor as provided by the SDK. Now the question is, who was sloppy? Does Gingerbread perhaps not support the gyro fully or did Samsung not implement the sensor correctly? As I wrote, the same code works perfectly on my Honeycomb tablet so it's not a programming error per se.
Regards
Mark
Yes, there definitely must be something wrong with the gyro and/or the magnetometer.
Some time ago I opened a specific thread on this subject in this forum, got many "reads" but no replies whatsoever...
So strange nobody did actually notice it so far.
pub00515 said:
Hi,
I've done a few more tests - I placed a strong magnet next to my Eee-pad and I had no deflection when I moved the magnet. So in this case, the app is correctly using the device's gyro and accelerometer. I then performed te same test with my S2 and bingo, I had a strong deflection as I moved the magnet. This is plain silly, as the sensor I'm using in my own app doesn't rely on the compass, instead it relies on the rotation vector sensor as provided by the SDK. Now the question is, who was sloppy? Does Gingerbread perhaps not support the gyro fully or did Samsung not implement the sensor correctly? As I wrote, the same code works perfectly on my Honeycomb tablet so it's not a programming error per se.
Regards
Mark
Click to expand...
Click to collapse
Now that's interesting. Could be !
My compass works a bit weird. I put it on table, let it show the north. Then I rotate the device 180 degrees .. and the north shifts like 5 degrees. It can be worse, but calibrating (waving the 8 pattern) helps .. but I can't get the error under 5 degrees no matter what.
Btw. it's common that that electronic compasses are much more sensitive to metal objects, that's not Samsung's mistake. But the sensors should not be linked.
Edit: I downloaded some sensors monitoring application. And gyroscopic sensor itself for sure is not sensitive to magnetic fields and works as it should, same for accelerometer. But then there are some IMHO virtual sensors: linear acceleration and rotation. They seem to be synthesized from more sensors, and the rotation does react on magnet.
So perhaps if someone has a different phone running Gingerbread with a gyro on board, we can see if the issue exists there as well (best would be to try it with STLView, as I know what API calls are made)
Thanks,
Mark
Dr.Sid said:
My compass works a bit weird. I put it on table, let it show the north. Then I rotate the device 180 degrees .. and the north shifts like 5 degrees. It can be worse, but calibrating (waving the 8 pattern) helps .. but I can't get the error under 5 degrees no matter what.
Click to expand...
Click to collapse
Mine does the same. Actually I can get even 15 degrees deviation. I noticed that it seems to depend on the location I am, despite apparently there should be no magnetic objects nearby. I am pretty sure that if if you try rotaring your phone at constant angular speed in the horizontal plane (with it horizontal on a table for instance) with a "compass" app running you will notice that the indicaton on the screen speeds up considerably when the phone is pointing to the north, and slows down when is pointing to the south.
Which Gingerbread version are you guys running?
I'm still waiting for the 2.3.4 update.
It would be interesting if someone could try this with 2.3.4, perhaps it works with the update?
Thanks...
Mark
pub00515 said:
So perhaps if someone has a different phone running Gingerbread with a gyro on board, we can see if the issue exists there as well (best would be to try it with STLView, as I know what API calls are made)
Thanks,
Mark
Click to expand...
Click to collapse
hi mark,
again, what you (we) experience here has nothing, i repeat nothing, to do with the GYRO. what you mean is the accelero- and magnetometer! a gyro knows nothing about it's current position (it only detects deviations, read about a coriolis vibratory gyro for more details about the mems gyro the sgs2 is using)
most programs i know are not using the gyro for positional information, for example google maps, google sky... they are all using the magnetometer in combination with the accelerometer ONLY!
regards,
markus
Hi Markus,
thanks for the heads-up, but I think I have a pretty good idea of what's going on:
Why?
Well, for starters, I'm a software developer in a technical field and I'm also the author of STLView mentioned above. Secondly, the same app running under Honeycomb with an Asus EeePad is working perfectly, and it is using the gyro there. Yes gyro and no, not magnetometer.
The problem with the S2 as I see it, is:
either Gingerbread or Samsung have failed to implement the rotation_vector sensor, as provided by the official API, correctly. On the S2, it is using the acceleration sensor combined with the magnetometer, which is just plain silly, as the magnetometer is too unstable for correct rotation rate measurement. On the EeePad, the same virtual sensor is using the accelerometer and the gyro in combination (gyro for rotation rate and the accelerometer to eliminate gyro drift). What you get is a very accurate sensor reading, which is just not possible on the S2 as of now.
Hopefully, either Samsung or Google are going to fix this flaw, but I think the problem is more on Samsung's side as they are the ones who actually know what physical sensors are available. That's also why it would be interesting to find out if other devices running Gingerbread that have a gyro on board are also experiencing the same problems.
By the way, I'm also a pilot so I think I have a pretty good understanding of what a gyro is and what it measures, thank you very much. Next time, remember: "Halbwissen ist gefährlich"
Regards
Mark
pub00515 said:
Hi Markus,
thanks for the heads-up, but I think I have a pretty good idea of what's going on:
Why?
Well, for starters, I'm a software developer in a technical field and I'm also the author of STLView mentioned above. Secondly, the same app running under Honeycomb with an Asus EeePad is working perfectly, and it is using the gyro there. Yes gyro and no, not magnetometer.
The problem with the S2 as I see it, is:
either Gingerbread or Samsung have failed to implement the rotation_vector sensor, as provided by the official API, correctly. On the S2, it is using the acceleration sensor combined with the magnetometer, which is just plain silly, as the magnetometer is too unstable for correct rotation rate measurement. On the EeePad, the same virtual sensor is using the accelerometer and the gyro in combination (gyro for rotation rate and the accelerometer to eliminate gyro drift). What you get is a very accurate sensor reading, which is just not possible on the S2 as of now.
Hopefully, either Samsung or Google are going to fix this flaw, but I think the problem is more on Samsung's side as they are the ones who actually know what physical sensors are available. That's also why it would be interesting to find out if other devices running Gingerbread that have a gyro on board are also experiencing the same problems.
By the way, I'm also a pilot so I think I have a pretty good understanding of what a gyro is and what it measures, thank you very much. Next time, remember: "Halbwissen ist gefährlich"
Regards
Mark
Click to expand...
Click to collapse
hi mark,
sorry - i didn't meant to be rude...
nor did i know your background; the thing nowadays is, a hell lot of people are talking technical nonsense all the time, which is quite frustrating...
i have to admit as i'm no software developer i didn't know the thing with the rotation_vector, what's sure for me was that the actual situation is caused from the accel/mag sensor, simply because of its behavior. that it would be way better to use the gyro as well for all this applications is absolutely true.
so let's hope either samsung or google will provide a fix, as you said!
glück ab, gut land!
markus

Categories

Resources