Julia 1.0 is not supported anymore.
DCM
is now a custom type derived fromStaticMatrix
. Since it was previously aSMatrix{3, 3, T, 9}
, then this modification must be considered breaking. However, all the API was implemented so that everything is supposed to continue working besides some initialization functions. (Issue #21).The function
eltype
was not returning the correct value forEulerAngles
andEulerAngleAxis
.The Julia conversion API
convert
is now supported to convert between any of the supported representations. (Issue #18) (PR #19)A random rotation can now be sampled using
rand
. This feature is supported for all representations.The operator
∘
can now be used to compose rotations. In this case, if two different representations are used, the one in the right is converted to the same type to the one in the left.A new constant called
ReferenceFrameRotation
is now exported as a union of all the supported rotations.The test coverage was improved, reaching almost 100% of coverage.
Previously,
Quaternion
was<:AbstractVector
. However, this choice was leading to many problems when interfacing with other packages. For example, it was very difficult to make it works together with Zygote.jl because of the multiplication. In the previous version,Quaternion
was an array in which the multiplicationq1 * q2
(both 4x1 arrays) leads to another 4x1 arrays, breaking a lot of assumptions about arrays. Many functions were defined to reduce the number of breakage. Quaternion supports iterations and broadcast. Hence, I do not expect many problems.The function
zeros
forQuaternion
is now deprecated. Usezero
instead.The function
create_rotation_matrix
is now deprecated. Useangle_to_dcm
instead.The function
angle_to_dcm
can now create a DCM from a single rotation.The function
angle_to_quat
can now create a quaternion from a single rotation.The function
angle_to_rot
can now create a rotation from a single rotation.The functions
zero
andone
are now defined forQuaternion
.Many improvements related to the type promotion in the functions.
The following rotation representations and the conversion between them are now considered stable:
- Direction cosine matrix (DCM);
- Euler angle and axis;
- Euler angles; and
- Quaternion.
The printing of Euler angle and axis, Euler angles, and quaternion were improved. Everything is now printed with context
:compact => true
, and can be changed usingIOContext
.The tests were entirely redesigned, leading to 100% of coverage.
The code now follows the BlueStyle.
All deprecated functions in v0.4 were removed.
The operation
-(::Quaternion)
is now defined.The package is now tested only against Julia 1.0 and 1.5.
Quaternion now supports scalar indexing. This forced
Quaternion
to be a subtype ofAbstractVector
. Thus, it can now be broadcasted to a vector without any allocations.The package is now tested only against Julia 1.0 and 1.4.
Improvements in the documentation of functions and macros.
The package is now tested only against Julia 1.0 and 1.3.
It is not necessary to use
sprint
to create the color sequences when using Crayons.jl.
- Dummy release to add
Project.toml
and switch to Registrator.jl.
The conversion from DCM to Euler Angle and Axis had a bug when an identity DCM was being used. In this case, the returned axis was
[NaN, NaN, NaN]
, when the correct is[0, 0, 0]
.The test coverage was highly improve, reaching more than 97% of the code.
All the colors in printing functions are now handled by the package Crayons.jl.
The function
smallangle_to_dcm
now returns a orthornormalized DCM by default. This behavior can be modified by the keywordnormalize
.The nomenclature of all conversion functions was changed from
<representation 1>2<representation 2>
to<representation 1>_to_<representation 2>
. Hence, for example,angle2dcm
is now calledangle_to_dcm
. All the older names are now deprecated.Many bugs were fixed in the conversion from DCM to Euler angles related to singularities, gimbal-locks, multiple representations, and signed zeros.
When converting from Euler angle and axis to quaternion, the real part will always be positive now.
The operations
*
andinv
withEulerAngles
are now defined.The operations
*
andinv
withEulerAngleAxis
are now defined.The conversion functions between DCM and Euler angle and axis were added (
angleaxis_to_dcm
anddcm_to_angleaxis
).EulerAngles
andEulerAngleAxis
structures now have a dedicated printing function.The conversion functions between Euler angle and axis and Euler angles were added (
angleaxis_to_angle
andangle_to_angleaxis
).The function
orthonormalize
, which orthonormalizes DCMs using the Gram-Schmidt algorithm, was added.The function
angle_to_angle
was added to modify the rotation sequence of Euler angles.Many performance improvements.
Improvements in the printing function of quaternions.
The API functions
inv_rotation
andcompose_rotation
now support all the representations (DCM, Euler angle and axis, Euler angles, and quaternions).A new, more general constructor for
EulerAngles
was added.
The operation
\
between Quaternions and Vector now supports everyAbstractVector
.The
EulerAngleAxis
now stores the vectorv
usingSVector
instead ofVector
. Notice that the constructors were adapted to accept allAbstractVector
. Hence, it is not expected any breakage in old code.The conversion between
Quaternion
andEulerAngleAxis
now checks if the Euler angle is 0. In this case, the Euler vector[1;0;0]
is used. Previously, a vector withNaN
was returned.
The function
dcm2quat
forced the returned Quaternion to be of the same type of DCM. However, since some floating-point operations are required to convert between these two rotation representation, then it could lead toInexactError
exception. Old code that depends on the quaternion type returned fromdcm2quat
may break.DCM{T}
was defined asSMatrix{3,3,T}
. However, this can lead to type-unstable functions in some cases. Hence, the definition was changed toSMatrix{3,3,T,9}
. Code usingDCM{T}
will continue to work without problems.The function
eye
has been marked as deprecated in favor of the initialization using theUniformScalling
(I
) object.The
norm
function was not being exported.The left and right division operations between two quaternions was defined. Hence, the operation
inv(q)*v*q
can be now written in the more compact formq\v*q
.DCMs and Quaternions now fully support the
UniformScalling
object for initialization and operations. Hence, an identity DCM can be created usingDCM(I)
and an identity quaternion can be created usingQuaternion(I)
.The structures and operations no longer restrict the type of the rotation representation to be real numbers. Hence, it is now possible to perform, for example, the multiplication between two integer quaternions. The type of the result will be automatically inferred.
The package is not tested against Julia 0.7 anymore. Although it is still supposed to work with Julia 0.7, it is highly advisable to use Julia 1.0 or higher.
The documentation of the functions was modified to be less verbose.
- Full support for
Julia 0.7
andJulia 1.0
.- The support for
Julia <= 0.6
is dropped in this version. Hence, ReferenceFrameRotations.jl will not work with those versions anymore. If it is necessary to useJulia <= 0.6
, then you should need to stick withReferenceFrameRotations.jl <= 0.2.1
.
- The support for
-
Performance improvements:
eye
andzeros
functions are@inline
now.
-
Tests:
- Add new tests to increase coverage.
-
Documentation:
- Initial version of the package documentation.
-
Performance improvements:
- The Direction Cosine Matrices were converted from
Matrix
toSMatrix{3,3}
. This provided a huge performance boost, but now the DCM is immutable. - The Quaternions, Euler Angles, and Euler Angle and Axis representations were also converted to immutable types.
- The Direction Cosine Matrices were converted from
-
New:
- It is now possible to create Direction Cosine Matrices and Quaternions
that represent small rotations using the functions
smallangle2dcm
andsmallangle2quat
. - The function
angle2quat
can now be called usingEulerAngles
as argument. - A set of rotations described by Direction Cosine Matrices or Quaternions
can now be composed using the function
compose_rotation
. The input is the rotations in the desired order (from the first to the last). angle2rot
andsmallangle2rot
are two functions that can be used to create rotations descriptions from Euler angles based on the type of the arguments.inv_rotation
is a new function that can be used to compute inverse rotations. It can receive as input a Direction Cosine Matrix or a Quaternion.
- It is now possible to create Direction Cosine Matrices and Quaternions
that represent small rotations using the functions
-
Changes:
- The rotations sequences are now described by symbols instead of strings.
Hence,
"ZYX"
was replaced by:ZYX
,"XYZ"
by:XYZ
,'x'
or'X'
by:X
, and so on. - Due to the new type of DCMs, they now must be initialized using the type
DCM
. Hence,dcm = [1 0 0; 0 -1 0; 0 0 -1]
must be replaced bydcm = DCM([1 0 0; 0 -1 0; 0 0 -1])
. - The
RotationSequenceError
exception were removed and replaced byArgumentError
with a useful error message. - The function
angle2quat
was modified so that the real part of the quaternion is always positive.
- The rotations sequences are now described by symbols instead of strings.
Hence,
-
Dropped functions:
<Function>!
: All functions that modify a parameter (the ones that end with!
) were dropped because now all the types are immutables.
- Initial version.
- This version was based on the old package Rotations.jl v0.4.0 that was renamed to ReferenceFrameRotations to be submitted to julia METADATA repo.