|
1 | 1 | Euler Angle and Axis
|
2 | 2 | ====================
|
3 | 3 |
|
| 4 | +```@meta |
| 5 | +CurrentModule = ReferenceFrameRotations |
| 6 | +DocTestSetup = quote |
| 7 | + using ReferenceFrameRotations |
| 8 | +end |
| 9 | +``` |
| 10 | + |
4 | 11 | The Euler angle and axis representation is defined by the following immutable
|
5 | 12 | structure:
|
6 | 13 |
|
7 | 14 | ```julia
|
8 | 15 | struct EulerAngleAxis{T}
|
9 | 16 | a::T
|
10 |
| - v::Vector{T} |
| 17 | + v::SVector{3,T} |
11 | 18 | end
|
12 | 19 | ```
|
13 | 20 |
|
14 | 21 | in which `a` is the Euler Angle and `v` is a unitary vector aligned with the
|
15 | 22 | Euler axis.
|
16 | 23 |
|
| 24 | +The constructor for this structure is: |
| 25 | + |
| 26 | +```julia |
| 27 | +function EulerAngleAxis(a::T1, v::AbstractVector{T2}) where {T1,T2} |
| 28 | +``` |
| 29 | + |
| 30 | +in which a `EulerAngleAxis` with angle `a [rad]` and vector `v` will be created. |
| 31 | +Notice that the type of the returned structure will be selected according to the |
| 32 | +input types `T1` and `T2`. Furthermore, the vector `v` **will not** be |
| 33 | +normalized. |
| 34 | + |
| 35 | +```jldoctest |
| 36 | +julia> EulerAngleAxis(1,[1,1,1]) |
| 37 | +EulerAngleAxis{Int64}(1, [1, 1, 1]) |
| 38 | +
|
| 39 | +julia> EulerAngleAxis(1.f0,[1,1,1]) |
| 40 | +EulerAngleAxis{Float32}(1.0f0, Float32[1.0, 1.0, 1.0]) |
| 41 | +
|
| 42 | +julia> EulerAngleAxis(1,[1,1,1.f0]) |
| 43 | +EulerAngleAxis{Float32}(1.0f0, Float32[1.0, 1.0, 1.0]) |
| 44 | +
|
| 45 | +julia> EulerAngleAxis(1.0,[1,1,1]) |
| 46 | +EulerAngleAxis{Float64}(1.0, [1.0, 1.0, 1.0]) |
| 47 | +``` |
| 48 | + |
17 | 49 | !!! note
|
18 | 50 |
|
19 | 51 | The support of this representation is still incomplete. Only the conversion
|
|
0 commit comments