On 4/12/2013 8:48 AM, Kent A. Reed wrote:
> On 4/12/2013 8:22 AM, andy pugh wrote:
>> Someone on the forum seems to have spotted something odd in 
>> pmMatRpyConvert
>> http://www.linuxcnc.org/index.php/english/forum/30-cnc-machines/26392-the-study-of-arithmetic#32609
>>  
>>
>> At best it seems like there is redundant code.
>>
>
> Don't have my fingers on the right reference (yet) and my brain is 
> rusty but I expect the seemingly odd coding is protection against the 
> usual problems representing mathematical functions in binary 
> arithmetic. Don't be too quick to suspect redundant code. Then again, 
> trust but verify!
>
> If I get a chance later today I'll look for something I can pass to 
> these guys on the forum.
>
>

I shouldn't compose email while sitting "on hold" with a medical 
insurance representative. Too distracting.

At a glance, the form of the code looked ok but now that I've actually 
read it, I agree with the OP that comparing the computed value of pitch  
with +/-2*pi doesn't make sense (that's two revolutions of a wrist!?!). 
It's not that the clauses triggered by the if tests are redundant code, 
it's that they can never be executed because of a coding mistake. 
Fortunately, it may not matter in most usage, but it's annoying. My 
first inclination is to say someone meant PM_PI_2 instead of 2 * PM_PI 
but I don't want to shoot from the hip again. Needs some investigation.

Unfortunately, the posemath routines come from early in the development 
of the Realtime Control System (RCS) and are essentially undocumented:-(

Has anyone actually exercised the rountines related to roll-pitch-yaw 
(Rpy),  especially the mappings to/from rotation matrices?

Regards,
Kent


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to