File: rot2euler.c1 /* 2 * Academic License - for use in teaching, academic research, and meeting 3 * course requirements at degree granting institutions only. Not for 4 * government, commercial, or other organizational use. 5 * 6 * rot2euler.c 7 * 8 * Code generation for function 'rot2euler' 9 * 10 */ 11 12 /* Include files */ 13 #include "rt_nonfinite.h" 14 #include "calculateTransformations.h" 15 #include "rot2euler.h" 16 #include "error.h" 17 18 /* Variable Definitions */ 19 static emlrtRSInfo f_emlrtRSI = { 5, "rot2euler", 20 "C:\\Users\\jorgesv\\Dropbox\\PhD documents\\Matlab code\\underwater swimming manipulators\\Utilities\\rot2euler.m" 21 }; 22 23 static emlrtRSInfo g_emlrtRSI = { 13, "asin", 24 "C:\\Program Files (x86)\\MATLAB\\R2015b\\toolbox\\eml\\lib\\matlab\\elfun\\asin.m" 25 }; 26 27 /* Function Definitions */ 28 void rot2euler(const emlrtStack *sp, const real_T R[9], real_T eulerangles[3]) 29 { 30 emlrtStack st; 31 emlrtStack b_st; 32 st.prev = sp; 33 st.tls = sp->tls; 34 st.site = &f_emlrtRSI; 35 b_st.prev = &st; 36 b_st.tls = st.tls; 37 if ((R[2] < -1.0) || (R[2] > 1.0)) { 38 b_st.site = &g_emlrtRSI; 39 error(&b_st); 40 } 41 42 eulerangles[0] = muDoubleScalarAtan2(R[5], R[8]); 43 eulerangles[1] = -muDoubleScalarAsin(R[2]); 44 eulerangles[2] = muDoubleScalarAtan2(R[1], R[0]); 45 } 46 47 /* End of code generation (rot2euler.c) */ 48 |