system
June 3, 2014, 2:26am
#1
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)

system
June 3, 2014, 3:32am
#2
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" ?

system
June 3, 2014, 3:46am
#3
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

system
June 3, 2014, 3:50am
#5
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.

system
June 3, 2014, 3:59am
#6
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.

system
June 3, 2014, 4:46am
#7
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..........
PS, is this what you are trying to do?
http://www.esrl.noaa.gov/gmd/ozwv/dobson/papers/report6/appf.html

system
June 3, 2014, 1:20pm
#10
Hmmmh.....very astute Grasshopper....