Conventions used in CelestLab
All CelestLab exported names begin with the prefix "CL_" (for functions) or "%CL_" (for predefined data).
Most function names have an additional prefix (2 or 3 letters) that indicates the purpose of the function:
In CelestLab most functions are vectorized. Arguments of functions are generally vectors of size :
The frame transformation matrix P(i->f) is defined as the matrix transforming vector coordinates relative to an initial frame Ri to coordinates relative to a final frame Rf :
The rotation matrix that transforms the basis vectors of Ri into the basis vectors of Rf is then P(i->f)' (P transpose).
For example, the transformation matrix for a rotation of angle θ around the X axis is :
CelestLab contains operators for the management of quaternions :
- size(q)
- norm(q)
- inv(q)
- conjugate: conj(q) = ~q = q'
- extraction of real and imaginary part: real(q) = q.r, imag(q) = q.i
- concatenation: [q1,q2,...,qn]
- extraction: q2 = q1([i,j,k,...])
- insertion: q2([i,j,k,...]) = q1
NB: Quaternions as defined in CelestLab are consistent with rotation matrices.
Scilab's hypermatrix type (mlist 'hm') is partly overloaded in CelestLab. Hypermatrices should be of dimension 3.
A hypermatrix is considered as an array of matrices: A = [A1; A2...; An], where Ak = A(:,:,k).
The overloaded operations are :