Program Listing for File gnss_attitude.h¶
↰ Return to documentation for file (agents/gnss_attitude.h)
#pragma once
#include "lupnt/core/definitions.h"
namespace lupnt {
class GnssAttitude {
public:
GnssAttitude() = default;
GnssAttitude(const Vec3& r_sat_eci, const Vec3& r_sun_eci);
static void Compute(const Vec3& r_sat_eci, const Vec3& r_sun_eci, Vec3& ex, Vec3& ey, Vec3& ez);
static void Compute(const Vec3& r_sat_eci, const Vec3& v_sat_eci, const Vec3& r_sun_eci,
Vec3& ex, Vec3& ey, Vec3& ez);
static void ComputeFromYawAngle(const Vec3& r_sat_eci, const Vec3& v_sat_eci, Real yaw_angle,
Vec3& ex, Vec3& ey, Vec3& ez);
void Update(const Vec3& r_sat_eci, const Vec3& r_sun_eci);
void Update(const Vec3& r_sat_eci, const Vec3& v_sat_eci, const Vec3& r_sun_eci);
const Vec3& GetEx() const { return ex_; }
const Vec3& GetEy() const { return ey_; }
const Vec3& GetEz() const { return ez_; }
Mat3 GetRotationMatrix() const;
void GetAngles(const Vec3& u, Real& theta, Real& phi) const;
private:
Vec3 ex_ = Vec3::UnitX();
Vec3 ey_ = Vec3::UnitY();
Vec3 ez_ = Vec3::UnitZ();
};
} // namespace lupnt