use arika::epoch::Epoch;
use arika::frame::{Body, Vec3};
use nalgebra::Vector4;
use crate::SpacecraftState;
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct MagneticFieldBody(Vec3<Body>);
impl MagneticFieldBody {
pub fn new(v: Vec3<Body>) -> Self {
Self(v)
}
pub fn inner(&self) -> &Vec3<Body> {
&self.0
}
pub fn into_inner(self) -> Vec3<Body> {
self.0
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct AngularVelocityBody(Vec3<Body>);
impl AngularVelocityBody {
pub fn new(v: Vec3<Body>) -> Self {
Self(v)
}
pub fn inner(&self) -> &Vec3<Body> {
&self.0
}
pub fn into_inner(self) -> Vec3<Body> {
self.0
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct AttitudeBodyToInertial(Vector4<f64>);
impl AttitudeBodyToInertial {
pub fn new(v: Vector4<f64>) -> Self {
Self(v)
}
pub fn inner(&self) -> &Vector4<f64> {
&self.0
}
pub fn into_inner(self) -> Vector4<f64> {
self.0
}
}
#[derive(Debug, Clone, Default)]
pub struct Sensors {
pub magnetometer: Option<MagneticFieldBody>,
pub gyroscope: Option<AngularVelocityBody>,
pub star_tracker: Option<AttitudeBodyToInertial>,
}
impl Sensors {
pub fn empty() -> Self {
Self::default()
}
}
#[derive(Debug, Clone, Default)]
pub struct ActuatorState {
pub rw_momentum: Option<Vec<f64>>,
}
#[derive(Debug, Clone)]
pub struct TickInput<'a> {
pub t: f64,
pub epoch: Option<&'a Epoch>,
pub sensors: &'a Sensors,
pub actuators: &'a ActuatorState,
pub spacecraft: &'a SpacecraftState,
}