diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
| commit | 14c854543b1a3cf344a371a5b45595657f95786b (patch) | |
| tree | 70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/localization/src/c/eul2quat.c | |
| parent | 5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff) | |
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/localization/src/c/eul2quat.c')
| -rw-r--r-- | SD-VBS/benchmarks/localization/src/c/eul2quat.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/SD-VBS/benchmarks/localization/src/c/eul2quat.c b/SD-VBS/benchmarks/localization/src/c/eul2quat.c deleted file mode 100644 index bea75cf..0000000 --- a/SD-VBS/benchmarks/localization/src/c/eul2quat.c +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "localization.h" | ||
| 8 | |||
| 9 | F2D* eul2quat(F2D* angle) | ||
| 10 | { | ||
| 11 | F2D *ret; | ||
| 12 | F2D *x, *y, *z; | ||
| 13 | int k, i, j; | ||
| 14 | int rows, cols; | ||
| 15 | |||
| 16 | rows = angle->height; | ||
| 17 | cols = angle->width; | ||
| 18 | |||
| 19 | x = fDeepCopyRange(angle, 0, angle->height, 0, 1); | ||
| 20 | y = fDeepCopyRange(angle, 0, angle->height, 1, 1); | ||
| 21 | z = fDeepCopyRange(angle, 0, angle->height, 2, 1); | ||
| 22 | |||
| 23 | ret = fSetArray(x->height, 4, 0); | ||
| 24 | |||
| 25 | for(i=0; i<rows; i++) | ||
| 26 | { | ||
| 27 | float xi, yi, zi; | ||
| 28 | k = 0; | ||
| 29 | xi = asubsref(x,i); | ||
| 30 | yi = asubsref(y,i); | ||
| 31 | zi = asubsref(z,i); | ||
| 32 | |||
| 33 | subsref(ret,i,k) = cos(xi/2)*cos(yi/2)*cos(zi/2)+sin(xi/2)*sin(yi/2)*sin(zi/2); | ||
| 34 | k++; | ||
| 35 | subsref(ret,i,k) = sin(xi/2)*cos(yi/2)*cos(zi/2)-cos(xi/2)*sin(yi/2)*sin(zi/2); | ||
| 36 | k++; | ||
| 37 | subsref(ret,i,k) = cos(xi/2)*sin(yi/2)*cos(zi/2)+sin(xi/2)*cos(yi/2)*sin(zi/2); | ||
| 38 | k++; | ||
| 39 | subsref(ret,i,k) = cos(xi/2)*cos(yi/2)*sin(zi/2)-sin(xi/2)*sin(yi/2)*cos(zi/2); | ||
| 40 | } | ||
| 41 | |||
| 42 | fFreeHandle(x); | ||
| 43 | fFreeHandle(y); | ||
| 44 | fFreeHandle(z); | ||
| 45 | |||
| 46 | return ret; | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | |||
