Tests.CompareAngle.Max

From RadiWiki
Jump to: navigation, search

Comparing turntable angles to each other requires more checks than just comparing the two different angle values to eachother. Because one round of the turntable is indicated by 360 degrees, every angle value is the same as the same value 360 degrees higher, or 360 degrees lower. For example -10 degrees is the same angle as 350 degrees. An emission that is measured at an angle of -10 degrees should thus be interpreted the same as an emission that is measured at a 350 degrees angle.

To correctly compare two different angle values, it is best to place both to be compared angles in the same range. The simplest range is from 0 degrees to 360 degrees. The -10 degrees of the example is thus temporarily changed to 350 degrees, and then it is compared with the other angle that is also converted to fall in the correct range. A comparison of two different angle values to determine their equality can be done using the above method.

However comparing angles becomes more difficult if two angles should be compared to determine the largest of the two angles. Assume a situation where two angles of -45 degrees and 90 degrees should be compared to determine the largest angle. As a first step both angles are converted to fall in the 0-360 degrees angle range. The -45 degrees angle is thus temporarily changed to +315 degrees, and the 90 degrees angle is not changed. After the conversion the +315 degree value is larger than +90, so the comparison has determined that the -45 degree angle is also bigger than the 90 degree angle. Depending on the turntable layout that is in use by the end-user this could be the expected result, or not. When a turntable layout is used where the turntable is turning from -180 degrees to -180 degrees, the +90 degrees angle is clearly the largest angle.

To correctly compare two different angles, it is thus important that the angles are temporarily converted to an angle range that matches with the turntable layout of the end-user. The Tests.CompareAngle.Min and Tests.CompareAngle.Max advanced options determine this angle range.

The advanced option Tests.CompareAngle.Min specifies the start angle of the angle range, to which all the angles should be normalized before the angles are compared. The advanced option Tests.CompareAngle.Max specifies the end angle of the angle range, to which all the angles should be normalized before the angles are compared. Tests.CompareAngle.Max should be at least 360 degrees higher than Tests.CompareAngle.Min. There is NO requirement that the difference between Tests.CompareAngle.Min and Tests.CompareAngle.Max should be exactly 360 degrees.

For the example above it is best to set Tests.CompareAngle.Min to -180 and Tests.CompareAngle.Max to +180. With this combination of values the -45 and +90 degree angles are not modified and the comparison of the largest value results in the expected result, that the 90 degree angle is the larger value.

The default value for Tests.CompareAngle.Min is -180 degrees. The Tests.CompareAngle.Max is +370 degrees. These default values indicate a large range which results in the correct results for the comparison for almost all situations.

There are other advanced options available that are related to this advanced option:

Warning-48px.png
Warning: Any change and/or modification to the advanced options, can result in unexpected results and/or incorrect measurement results. Changes in any advanced option should be verified and checked very carefully!