Go Down

#### Jellycow

##### Aug 17, 2013, 01:29 am
Hey!
I'm working on a navigation-algorithm for my robot, including law of sines and law of cosines.
However, I do not get the right results from my formulas as the cos,sin and tan functions from Arduino only return degrees in radians.
That's why I'm asking if there's any functions that can give me return-values from the cos,sin and tan tables instead of radians?

// Andreas

#### Grumpy_Mike

#1
##### Aug 17, 2013, 01:33 am
Why not just convert the returned value into degrees?
Two Pi radians is 360 degrees.

#### Osgeld

#2
##### Aug 17, 2013, 01:35 am
what are you looking for ...

like radians to degrees is as simple as d = r*(180/pi)

#### Jellycow

#3
##### Aug 17, 2013, 01:53 am

Why not just convert the returned value into degrees?
Two Pi radians is 360 degrees.

what are you looking for ...

like radians to degrees is as simple as d = r*(180/pi)

Hey!
I do not want a returned value into degrees, as my input value already is in degrees.
Instead, I want values from the cosine table like this https://www.grc.nasa.gov/WWW/k-12/airplane/tablcos.html.

#### Jellycow

#4
##### Aug 17, 2013, 03:58 am
Nevermind, I solved it
At first, I did for some reason thought that the radian was the output value, when it in fact was the input value.
So it was just about to create a function that converts degrees to radians by using the formula you gave me.