02-12-2013 03:00 PM
Hi, I have a little problem with a program, I'm calculating an angle in a triangle using sine and cosine laws. Given the values of a, c and B (beta) I want to get alpha (see the image of the triangle at the .VI), the first formula is to get "b" [b=b=sqrt((c*c)+(a*a)-(2*a*c*cos(B)));], it is proved at the calculator and it's well... the second formula is to get the desired alpha value [A=arcsin((a*sin(B))/b)]. THE PROBLEM APPEARS at the time when I want to get the arcsin of the the argument: (a*sin(B))/b).
For example given a=18, c=16.135 and B=35°, b segment is equal to 23.75154 (the calculator confirms it) and the value of alpha in my VI is 0.44968 (the same result if I use formula node or the asin function), that is obviously wrong!! my calculator says that alpha=25.76507.... what is wrong in my VI??
Thank you
02-12-2013 03:18 PM
I wonder (I don't really) what 0.44968 radians is in degrees?
02-12-2013 03:26 PM - edited 02-12-2013 03:29 PM
LabVIEW uses radians as base unit for angles!
So you need to provide your input angles in radians and get the results in radians too.
Radians is the only mathematically correct unit for angles. Degree is ambigious since you have systems with 360 as well as 400 degree for a full circle.
02-12-2013 05:03 PM
thank you to all, I checked it again, exatly, LabVIEW's arcsin function gets a value in radians, so to have the degree value wee need to convert it again, no matter if we did it at first. Here is the correct VI. Thank you to all guys!!!
02-13-2013 01:53 PM
@rolfk wrote:
LabVIEW uses radians as base unit for angles!
So you need to provide your input angles in radians and get the results in radians too.
Radians is the only mathematically correct unit for angles. Degree is ambigious since you have systems with 360 as well as 400 degree for a full circle.
This is not true. There are many ways to measure angles (see http://en.wikipedia.org/wiki/Angle#Units), but the most mathematically "pure" unit is the radian, with a full circle measuring 2*Pi radians.
There are always 360 degrees in a full circle. Dividing a circle into 400 parts gives 400 grads. That is a different unit altogether.
The only exposure I have ever had to grads is the "DRG" setting on every scientific calculator that establishes the input/output unit for the trigonometric functions. Wikipedia (which is never, ever wrong) identifies that the grad is primarily used in triangulation and was originally used to define a kilometer. Interesting factoid there!
Jeff
02-13-2013 03:03 PM - edited 02-13-2013 03:08 PM
@Jeffrey_Zola wrote:
There are always 360 degrees in a full circle. Dividing a circle into 400 parts gives 400 grads. That is a different unit altogether.
Didn't know English uses different words for these units. In German, which is my native language, for both "Grad" is normally used. However the 400 parts unit is fully correct called "Neugrad" but few know this unit at all and even fewer that it really should be called Neugrad.
02-20-2013 07:58 AM
Well I don't consider neccesary to use a 400 degree scale, yeah, it is right that the 360 convention is ambiguous, but is is the most accepted and as I don't need exatly as much accuracy, it is not neccesary to use. It is enough to convert radians to "normal degrees", I didn't know that labview works in radians, that was the problem here 😞
Carlos Ignacio Sarmiento
Electronic Engineer
National Institute of Neurology and Neurosurgery
Mexico City