Skip to content

File StateTransitionMatrix.hpp

File List > astrea > astro > astro > propagation > equations_of_motion > state_transition_matrix > StateTransitionMatrix.hpp

Go to the documentation of this file

#pragma once

#include <variant>

#include <mp-units/concepts.h>

#include <units/units.hpp>

#include <astro/astro.fwd.hpp>

namespace astrea {
namespace astro {

class StateTransitionMatrix {
  public:
    StateTransitionMatrix() = default;

    ~StateTransitionMatrix() = default;

    StateTransitionMatrix(const EquationsOfMotion& eom, const State& state, const Vehicle& vehicle);

    template <std::size_t ii, std::size_t jj, mp_units::Quantity Value_T>
    void set(const Value_T& value)
    {
        _stm[ii][jj] = value.numerical_value_in(value.unit) * mp_units::one;
    }

    std::vector<Unitless> force_to_vector() const;

  private:
    std::array<std::array<Unitless, 6>, 6> _stm; //, KeplerianStm, EquinoctialStm> _stm;
};

} // namespace astro
} // namespace astrea