How to change from 'Radian' to 'Degree'?

Hi there,

I have a question about Units.

I don’t know how to change from ‘Radian’ to ‘Degree’.

Do i have to modify some code like (180/pi)?

Thank you,

Best regards,

Hi Dwan Lee,

I usually use a linear combination measure to do this:

AnyKinMeasureLinComb Rotations_in_degrees = {  
  AnyKinRotational rot = {     
    Type = RotAxesAngles;
    AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
    //AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
  }; 
  Coef = {{1,0,0}, {0,1,0},{0,0,1}}*180/pi;
  OutDim = 3;
};

This particular example gives all 3 rotations as output, but you could easily do it just for one or two if you rather.

Or you can also use expressions if you want:

AnyVar KneeAngle_degree = KneeAngle_Radian*(180/pi)

Best Regards,
Christine

1 Like

Hi Christine,

Thank you for your answer. You gave me what i want to do :slight_smile:

Hugely thanks,
Dwan

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.