Skip to content

Commit 9d84c56

Browse files
committed
Add illustrations in feature space, wip.
1 parent fae4240 commit 9d84c56

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

_02_Material.qmd

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,24 @@ $$
227227
\end{bmatrix}.
228228
$$ {#eq-angular-vel}
229229
230+
In practice, we can compute the angular velocity vector of a unit QTS using the `squat::qts2avts()` function as follows:
231+
232+
```{r}
233+
avts <- squat::qts2avts(smoothed_qts)
234+
avts |>
235+
dplyr::rename(`v[x]` = x, `v[y]` = y, `v[z]` = z) |>
236+
tidyr::pivot_longer(
237+
cols = c(`v[x]`, `v[y]`, `v[z]`),
238+
names_to = "component",
239+
values_to = "angular_velocity"
240+
) |>
241+
ggplot(aes(x = time, y = angular_velocity)) +
242+
geom_line() +
243+
facet_wrap(~component, ncol = 1, scales = "free_y", labeller = label_parsed) +
244+
theme_bw() +
245+
labs(title = "", x = "Time (seconds)", y = "Angular velocity (rad/s)")
246+
```
247+
230248
The angular acceleration vector $\dot{\pmb{\Omega}}$ is then computed as the derivative of the angular velocity vector:
231249
232250
$$
@@ -243,6 +261,24 @@ $$
243261
\end{bmatrix} \right)
244262
$$ {#eq-angular-acc}
245263
264+
Again, we can compute the angular acceleration vector of a unit QTS using the `squat::qts2aats()` function as follows:
265+
266+
```{r}
267+
# aats <- squat::qts2aats(smoothed_qts)
268+
# aats |>
269+
# dplyr::rename(`a[x]` = x, `a[y]` = y, `a[z]` = z) |>
270+
# tidyr::pivot_longer(
271+
# cols = c(`a[x]`, `a[y]`, `a[z]`),
272+
# names_to = "component",
273+
# values_to = "angular_acceleration"
274+
# ) |>
275+
# ggplot(aes(x = time, y = angular_acceleration)) +
276+
# geom_line() +
277+
# facet_wrap(~component, ncol = 1, scales = "free_y", labeller = label_parsed) +
278+
# theme_bw() +
279+
# labs(title = "", x = "Time (seconds)", y = "Angular acceleration (rad/s²)")
280+
```
281+
246282
Euler angles
247283
248284
: The angles named *Roll*, *Pitch* and *Yaw* represent rotations around the three principal axes. They are computed from a unit quaternion $\mathbf{q} = (q_w, q_x, q_y, q_z)$ using the following formulas:

0 commit comments

Comments
 (0)