Skip to content

Commit e150184

Browse files
committed
📚 Add documentation for CRP and MRP
1 parent eb610e6 commit e150184

File tree

9 files changed

+718
-16
lines changed

9 files changed

+718
-16
lines changed

docs/make.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ makedocs(
1818
authors = "Ronan Arraes Jardim Chagas",
1919
pages = [
2020
"Home" => "index.md",
21+
"Classical Rodrigues Parameters" => "man/crp.md",
2122
"Direction Cosine Matrices" => "man/dcm.md",
2223
"Euler Angle and Axis" => "man/euler_angle_axis.md",
2324
"Euler Angles" => "man/euler_angles.md",
25+
"Modified Rodrigues Parameters" => "man/mrp.md",
2426
"Quaternions" => "man/quaternions.md",
2527
"Conversions" => "man/conversions.md",
2628
"Kinematics" => "man/kinematics.md",

docs/src/index.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,19 @@ julia> Pkg.add("ReferenceFrameRotations")
2525

2626
This packages supports the following representations of 3D rotations:
2727

28+
* **Classical Rodrigues Parameters (CRP)**;
29+
* **Direction Cosine Matrices (DCMs)**;
2830
* **Euler Angle and Axis**;
2931
* **Euler Angles**;
30-
* **Direction Cosine Matrices (DCMs)**;
32+
* **Modified Rodrigues Parameters (MRP)**; and
3133
* **Quaternions**.
3234

33-
However, composing rotations is only currently supported for DCMs and
34-
Quaternions.
35+
All of those representations support rotation composition and inversion in this package.
3536

3637
## Roadmap
3738

38-
This package will be continuously enhanced. Next steps will be to add other
39-
representations of 3D rotations such as Rodrigues parameters, etc.
39+
This package will be continuously enhanced. Next steps will include API improvements,
40+
performance optimizations, and additional utilities for supported representations.
4041

4142
## Manual outline
4243

@@ -46,6 +47,8 @@ Pages = [
4647
"man/euler_angle_axis.md",
4748
"man/euler_angles.md",
4849
"man/quaternions.md",
50+
"man/crp.md",
51+
"man/mrp.md",
4952
"man/conversions.md",
5053
"man/kinematics.md",
5154
"man/composing_rotations.md",

docs/src/man/composing_rotations.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,23 @@ compose_rotation(R1, R2, R3, R4...)
1717
in which `R1`, `R2`, `R3`, ..., must be of the same type. This method returns the following
1818
rotation:
1919

20+
```text
21+
First rotation
22+
|
23+
|
24+
R1 => R2 => R3 => R4 => ...
25+
|
26+
|
27+
Second rotation
28+
```
29+
30+
Hence, `compose_rotation(R1, R2)` means the rotation `R1` is applied first, followed by
31+
`R2`.
32+
2033
![Composing rotations](../assets/Fig_Composing_Rotations.png)
2134

22-
Currently, this method supports DCMs, Euler angle and axis, Euler angles, and Quaternions.
35+
Currently, this method supports DCMs, Euler angle and axis, Euler angles, Quaternions,
36+
Classical Rodrigues Parameters (CRP), and Modified Rodrigues Parameters (MRP).
2337

2438
```@repl composing_rotations
2539
D1 = angle_to_dcm(0.5, 0.5, 0.5, :XYZ)
@@ -45,6 +59,18 @@ q1 = angle_to_quat(0.5, 0.5, 0.5, :XYZ)
4559
q2 = angle_to_quat(-0.5, -0.5, -0.5, :ZYX)
4660
4761
compose_rotation(q1, q2)
62+
63+
c1 = angle_to_crp(0.2, 0.1, -0.1, :ZYX)
64+
65+
c2 = angle_to_crp(-0.1, 0.1, 0.2, :XYZ)
66+
67+
compose_rotation(c1, c2)
68+
69+
m1 = angle_to_mrp(0.2, 0.1, -0.1, :ZYX)
70+
71+
m2 = angle_to_mrp(-0.1, 0.1, 0.2, :XYZ)
72+
73+
compose_rotation(m1, m2)
4874
```
4975

5076
## Operator ∘

0 commit comments

Comments
 (0)