need help beginner for aurdino

i am using aurdino and accelerometer
attached is the coding for accelerometer

after knowing the angle, i would like to use the angle for this equation:

cos(teta) = cos (delta)cos (alpha)cos(omega) + sin(delta)sin(alpha)

where the teta is the z and alpha is x

omega = 15.(t-12)

i wan to know de value of delta…

how do i write the code?

pls help me.

accelerometer_2.ino (1.48 KB)

cos(teta) = cos (delta)cos (alpha)cos(omega) + sin(delta)sin(alpha)

where the teta is the z and alpha is x

Where did you get this "equation" ?

It looks very familiar to a trig idenity. Do you want to solve the problem or do you want the arduino to solve the problem. Is that suposed to be (cos) Theta

Is that suposed to be (cos) Theta

Ya think ?

Its been a while like two years but I don't even see how if you knew how to write the code for this could help you in the arduino field. I guess there is much this grasshopper needs to learn.

This is a homework assignment if ever there was one...

after knowing the angle, i would like to use the angle for this equation:

Ok, what is the angle ?

cos(z) = cos (delta)cos (x)cos(omega) + sin(delta)sin(alpha)

where the teta is the z and alpha is x

omega = 15.(t-12)

i wan to know de value of delta.

after knowing the angle, i would like to use the angle for this equation:

So ? You have the equation.
Why don't you write the code ?

raschemmel:

after knowing the angle, i would like to use the angle for this equation:

So ? You have the equation.
Why don't you write the code ?
Arduino - Cos

I think this is more a maths question than a coding one, since he has yet to isolate delta from the equation

cos(teta) = cos (delta)cos (alpha)cos(omega) + sin(delta)sin(alpha)

which if you know the other angles and therefore their sins and cosines reduces to

p = cos (delta) qr + sin(delta)s

But my trig skills are a little rusty to solve that for delta unfortunately.

Hi, what is the value of t in the omega equation.

Or are you looking for delta= function(omega, alpha, teta)
delta= function(t, alpha, teta)

In any case this is all maths trig, identity, I'd be off to a tutor or lecturer to get some hints.

I used to have a sheet of identity formulas when I was in high school, ahhhhh yes those were the days.

Tom.......... :slight_smile:
PS, is this what you are trying to do?
http://www.esrl.noaa.gov/gmd/ozwv/dobson/papers/report6/appf.html

Hmmmh.....very astute Grasshopper....

Thankyou Master Po.