Template Function lupnt::Unpack

Function Documentation

template<typename T, int Size>
auto lupnt::Unpack(const Eigen::Matrix<T, Size, 1> &vec)

Unpack a fixed-size Eigen vector into a std::tuple of its scalar elements, for convenient structured-binding access (e.g. auto [a, e, i, Om, om, M] = / Unpack(Vec6(coe))).

  Used across `conversions/state_conversions.cc` and example scripts to destructure
  orbital-element / state vectors into named scalars.

  @param vec  Fixed-size Eigen column vector (`Size` > 0)
  @return     `std::tuple` of `Size` scalars, one per element of `vec`