maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Programming digital compass (https://talk.maemo.org/showthread.php?t=71810)

gerdich 2011-04-04 20:32

Programming digital compass
 
I am strongly convinced that the missing digital compass on the n900 is only a software problem and not a hardware problem.

The earth-magnetic field influences the reception of fm-radio waves.


If only anybody could help me to send a buffer of sound and to receive the same buffer of sound (without external antenna)!!!

The utility "sox" available on maemo should be enough to analyse the deformation of the wave from transmitter to receiver.


This should be enough to analyse the direction.

Bratag 2011-04-04 20:42

Re: Programming digital compass
 
Quote:

Originally Posted by gerdich (Post 981918)
I am strongly convinced that the missing digital compass on the n900 is only a software problem and not a hardware problem.

The earth-magnetic field influences the reception of fm-radio waves.


If only anybody could help me to send a buffer of sound and to receive the same buffer of sound (without external antenna)!!!

The utility "sox" available on maemo should be enough to analyse the deformation of the wave from transmitter to receiver.


This should be enough to analyse the direction.

Ok I will be the first to say it WTF???? If I understand it correctly you want to send an FM signal - then receive the same signal and based on the distortion of said signal you would be able to determine the direction the phone is facing?

dschwertb 2011-04-04 20:59

Re: Programming digital compass
 
Are you sure that this post isn't just late by three days?

But, maybe you can also try to analyse the influence of the earth-magnetic field on the speakers by playing back a sound and then recording with the microphone...
Or try to find a component of the N900 that shows some Hall effect behaviour...

Regards,

Dietmar

gerdich 2011-04-04 21:02

Re: Programming digital compass
 
@Bratac: Exactly!

I will also consider the distortion in the frequencies next to frequence of the sender.


In the first step I will save the results in the receiver as wav-files.
Then I will look at those wav-files with audacity.
I am sure that I will find a charateristic for each direction.


(Concernig the other post: Speaker and phone are not sensible enough to the earthmagnetic field: air-waves. But fm-waves are electro-magnetic waves. The earthmagnetic field is a magnetic field.)

tswindell 2011-04-04 21:05

Re: Programming digital compass
 
Good luck ......

gerdich 2011-04-04 21:09

Re: Programming digital compass
 
It's not only a question of luck.

It's also a question of knowledge.

If somebody could give me a small snippet of code for the transceiver and receiver. I will do the analyses.

(Sending a buffer is not difficult: "aplay xyz.wav' with emitter enabled.
What I need is receiving the buffer.)

j.s 2011-04-04 22:13

Re: Programming digital compass
 
Quote:

Originally Posted by gerdich (Post 981937)
(Concernig the other post: Speaker and phone are not sensible enough to the earthmagnetic field: air-waves. But fm-waves are electro-magnetic waves. The earthmagnetic field is a magnetic field.)

Magnetic fields affect moving charged particles and other magnetic fields.

They do not affect moving uncharged particles, motionless charged particles, or electromagnetic waves. For example, light is an electromagnetic wave, and it is unaffected by magnetic fields, even those much stronger than the Earth's magnetic field, such as just about any bar magnet, speaker magnet, etc.

gerdich 2011-04-04 22:44

Re: Programming digital compass
 
I've spoken about the RECEPTION of electromagnetic fields.

I've got to be more precise:
In the oscillators of the receiver and transmitter there are electrons moving.
Their movement is not only determined by the electro-magnetic field of the radio wave but also by the magnetic field of the earth (superposition).

javispedro 2011-04-04 22:55

Re: Programming digital compass
 
Quote:

Originally Posted by gerdich (Post 981940)
(Sending a buffer is not difficult: "aplay xyz.wav' with emitter enabled.
What I need is receiving the buffer.)

Use any radio player app and "arecord" or parec. And good luck...

Flynx 2011-04-04 23:01

Re: Programming digital compass
 
I'm not sure the FM receiver will be sensitive enough to detect the magnetic field of the earth. But you can test it.

Tune the FM receiver to a frequency where there is no radio station (static).

Start recording from the FM receiver.

Now, SPIN the N900 at a frequency that corresponds to the FM frequency you are tuned to.

The FM receiver should see the magnetic field of the earth oscillating (because of relative motion) at the FM frequency it is expecting and you should hear a tone.

Assuming you are tuned to a frequency of 87.7 mhz, you would have to spin the N900 at an rpm of 87,700,000. For reference, that is 551,034,887 rad/s.

At those speeds, the N900 would experience G-forces on the order of 789-million Gs (assuming radius of about 10cm).

Be sure to let us know how it goes :)


All times are GMT. The time now is 08:18.

vBulletin® Version 3.8.8