Module utils

Source
Expand description

Utility functions shared by different modules, and which may be useful to engineers.

Functions§

are_eigenvalues_stable
Checks if the given matrix represents a stable linear system by examining its eigenvalues.
between_0_360
Returns the provided angle bounded between 0.0 and 360.0.
between_pm_180
Returns the provided angle bounded between -180.0 and +180.0
between_pm_x
Returns the provided angle bounded between -x and +x.
capitalize
Capitalize the first letter of a string
cartesian_to_spherical
Converts the input vector V from Cartesian coordinates to spherical coordinates Returns ρ, θ, φ where the range ρ is in the units of the input vector and the angles are in radians
denormalize
Denormalize a value between -1.0 and 1.0
is_diagonal
Checks if the provided 3x3 matrix is diagonal.
kronecker
The Kronecker delta function
mag_order
Returns the order of mangitude of the provided value
normalize
Normalize a value between -1.0 and 1.0
perpv
Returns the components of vector a orthogonal to b
projv
Returns the projection of a onto b
r1
Returns a rotation matrix for a rotation about the X axis.
r2
Returns a rotation matrix for a rotation about the Y axis.
r3
Returns a rotation matrix for a rotation about the Z axis.
rotv
Rotate a vector about a given axis
rss_errors
Computes the Root Sum Squared (RSS) state errors between two provided vectors.
rss_orbit_errors
Computes the Root Sum Squared (RSS) orbit errors in kilometers and kilometers per second.
rss_orbit_vec_errors
Computes the Root Sum Squared (RSS) state errors in position and in velocity of two orbit vectors [P V].
spherical_to_cartesian
Converts the input vector V from Cartesian coordinates to spherical coordinates Returns ρ, θ, φ where the range ρ is in the units of the input vector and the angles are in radians
tilde_matrix
Returns the skew-symmetric matrix (also known as the tilde matrix) corresponding to the provided 3D vector.
unitize
Returns the unit vector of the moved input vector