You Are Here:

Community: Blogs

Paul Coulton's Forum Nokia Blog

Understanding the Magnetometer (Digital compass) Sensor

coultonp | 17 March, 2009 11:46

It seems a long time ago since I blogged about the operation of the accelerometer sensors and made a plea for their inclusion as a standard feature (I am of course assuming the positive outcome was because people actually listened to me rather than me being just prophetic Wink). Anyway I have already discussed in previous blogs about Streetview and other aspects of Point ‘N’ Seek utilising the magnetometer sensor (generally described as the digital compass) so here are some practical details of how it works in practice (I always feel a visualisation helps). As with the accelerometer in its raw form you have three outputs x,y,z which means that you can find directional information ,were your phone is pointing, whatever its orientation. For example the Figure below shows the outputs on the three axis for the phone held with the screen parallel to the users face (i.e. upright) and in the normal portrait orientation and when the phone is held so that the screen is parallel with the ground as you would use a normal compass. The plots start with the phone facing North then rotated through East, South and West and pausing at each alignment for around 5 seconds and you can clearly see the four compass points.

The illustrate the actual rotational change the following figure illustrates the three outputs for a continuous clockwise rotation with the phone held upright going clockwise from North.

The second graph of the figure is after applying some simple signal processing whereby we can combine these outputs along phone orientation from the accelerometer to produce an output that could easily be turned into an angle from North. Indeed the sensor API does provide a range of options one being for an angle from North as shown. 

 

The problem but we have found this appears to be slightly sluggish (as illustrated) and my feeling is that a low pass filter has been applied to give a smooth scrolling of Maps when used for navigation. However, I have other plans for the sensor so will likely create my own algorithms using the raw outputs previously illustrated. Hopefully people will find this blog as useful as the one on accelerometers but judging by the time lag from last time you might want to return to this in about 12 months Laughing.

BTW should have said the data is from a S60 application running on the Nokia 6210 Navigator

 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxItE20allE20startedE20innocentlyE20enoughE2eE20TheE20notebookE20didnE27tE20fitE20inE20myE20pocketE2cE20andE20myE20N93E20wasE20alreadyE20thereE2eE20ItE92sE20beenE20aE20greatE20coupleE20ofE20weeksE2cE20butE20IE92mE20gladE20toE20beE20backE2eE20NareshE20E2cE20ToteE20andE20E52onE20haveE20alreadyE20commentedE20onE20theE20ChampionE20E44ayE2eE20IE20echoE20theirE20thoughtsE20thatE20itE20isE20wonderfulE20toE20meetE20inE203E44E2dlandE20thoseE20peopleE20whoE20IE20workE20withE20andE20workE20forE2cE20butE20rarelyE20actuallyE20seeE2eE20Ea0E20AfterE2eE2eE2eE20E45ventE2cE20GeneralE20IE92veE20beenE20workingE20onE20myE20ToE44oE20listE20thisE20weekE2eE20WellE2cE20workingE20mightE20beE20aE20stretchE2eE20ItE92sE20beeE2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2ftastyE2dmultimediaE2djournalsE2dforumE2dnokiaE2dblogE2fgeneralX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxTastyE20MultimediaE20JournalE27sE20ForumE20NokiaE20BlogE20E7cE20GeneralX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZBlogContentQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxItE20allE20startedE20innocentlyE20enoughE2eE20TheE20notebookE20didnE27tE20fitE20inE20myE20pocketE2cE20andE20myE20N93E20wasE20alreadyE20thereE2eE20ItE92sE20beenE20aE20greatE20coupleE20ofE20weeksE2cE20butE20IE92mE20gladE20toE20beE20backE2eE20NareshE20E2cE20ToteE20andE20E52onE20haveE20alreadyE20commentedE20onE20theE20ChampionE20E44ayE2eE20IE20echoE20theirE20thoughtsE20thatE20itE20isE20wonderfulE20toE20meetE20inE203E44E2dlandE20thoseE20peopleE20whoE20IE20workE20withE20andE20workE20forE2cE20butE20rarelyE20actuallyE20seeE2eE20Ea0E20AfterE2eE2eE2eE20E45ventE2cE20GeneralE20IE92veE20beenE20workingE20onE20myE20ToE44oE20listE20thisE20weekE2eE20WellE2cE20workingE20mightE20beE20aE20stretchE2eE20ItE92sE20beeE2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fX qfnZtypeQUqfntypeZBlogContentQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZupdatedQDx2008E2d10E2d03X qmarsZdescriptionQSxItE20allE20startedE20innocentlyE20enoughE2eE20TheE20notebookE20didnE27tE20fitE20inE20myE20pocketE2cE20andE20myE20N93E20wasE20alreadyE20thereE2eE20ItE92sE20beenE20aE20greatE20coupleE20ofE20weeksE2cE20butE20IE92mE20gladE20toE20beE20backE2eE20NareshE20E2cE20ToteE20andE20E52onE20haveE20alreadyE20commentedE20onE20theE20ChampionE20E44ayE2eE20IE20echoE20theirE20thoughtsE20thatE20itE20isE20wonderfulE20toE20meetE20inE203E44E2dlandE20thoseE20peopleE20whoE20IE20workE20withE20andE20workE20forE2cE20butE20rarelyE20actuallyE20seeE2eE20Ea0E20AfterE2eE2eE2eE20E45ventE2cE20GeneralE20IE92veE20beenE20workingE20onE20myE20ToE44oE20listE20thisE20weekE2eE20WellE2cE20workingE20mightE20beE20aE20stretchE2eE20ItE92sE20beeE2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZBlogContentQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ