/*
 * Copyright (c) 2024. Helge Eichhorn and the LOX contributors
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
 */

// Auto-generated by `lox-gen`. Do not edit!

use crate::{Barycenter, Body, NaifId, PointMass};
use std::fmt::{Display, Formatter};
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct SolarSystemBarycenter;
impl Barycenter for SolarSystemBarycenter {}
impl Body for SolarSystemBarycenter {
    fn id(&self) -> NaifId {
        NaifId(0i32)
    }
    fn name(&self) -> &'static str {
        "Solar System Barycenter"
    }
}
impl Display for SolarSystemBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct MercuryBarycenter;
impl Barycenter for MercuryBarycenter {}
impl Body for MercuryBarycenter {
    fn id(&self) -> NaifId {
        NaifId(1i32)
    }
    fn name(&self) -> &'static str {
        "Mercury Barycenter"
    }
}
impl Display for MercuryBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for MercuryBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        22031.868551400003f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct VenusBarycenter;
impl Barycenter for VenusBarycenter {}
impl Body for VenusBarycenter {
    fn id(&self) -> NaifId {
        NaifId(2i32)
    }
    fn name(&self) -> &'static str {
        "Venus Barycenter"
    }
}
impl Display for VenusBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for VenusBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        324858.592f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct EarthBarycenter;
impl Barycenter for EarthBarycenter {}
impl Body for EarthBarycenter {
    fn id(&self) -> NaifId {
        NaifId(3i32)
    }
    fn name(&self) -> &'static str {
        "Earth Barycenter"
    }
}
impl Display for EarthBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for EarthBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        403503.2356254802f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct MarsBarycenter;
impl Barycenter for MarsBarycenter {}
impl Body for MarsBarycenter {
    fn id(&self) -> NaifId {
        NaifId(4i32)
    }
    fn name(&self) -> &'static str {
        "Mars Barycenter"
    }
}
impl Display for MarsBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for MarsBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        42828.3758157561f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct JupiterBarycenter;
impl Barycenter for JupiterBarycenter {}
impl Body for JupiterBarycenter {
    fn id(&self) -> NaifId {
        NaifId(5i32)
    }
    fn name(&self) -> &'static str {
        "Jupiter Barycenter"
    }
}
impl Display for JupiterBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for JupiterBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        126712764.09999998f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct SaturnBarycenter;
impl Barycenter for SaturnBarycenter {}
impl Body for SaturnBarycenter {
    fn id(&self) -> NaifId {
        NaifId(6i32)
    }
    fn name(&self) -> &'static str {
        "Saturn Barycenter"
    }
}
impl Display for SaturnBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for SaturnBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        37940584.8418f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct UranusBarycenter;
impl Barycenter for UranusBarycenter {}
impl Body for UranusBarycenter {
    fn id(&self) -> NaifId {
        NaifId(7i32)
    }
    fn name(&self) -> &'static str {
        "Uranus Barycenter"
    }
}
impl Display for UranusBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for UranusBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        5794556.3999999985f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct NeptuneBarycenter;
impl Barycenter for NeptuneBarycenter {}
impl Body for NeptuneBarycenter {
    fn id(&self) -> NaifId {
        NaifId(8i32)
    }
    fn name(&self) -> &'static str {
        "Neptune Barycenter"
    }
}
impl Display for NeptuneBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for NeptuneBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        6836527.100580399f64
    }
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct PlutoBarycenter;
impl Barycenter for PlutoBarycenter {}
impl Body for PlutoBarycenter {
    fn id(&self) -> NaifId {
        NaifId(9i32)
    }
    fn name(&self) -> &'static str {
        "Pluto Barycenter"
    }
}
impl Display for PlutoBarycenter {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.name())
    }
}
impl PointMass for PlutoBarycenter {
    fn gravitational_parameter(&self) -> f64 {
        975.5f64
    }
}
#[cfg(test)]
#[allow(clippy::approx_constant)]
mod tests {
    use super::*;
    #[test]
    fn test_body_0() {
        assert_eq!(SolarSystemBarycenter.id(), NaifId(0i32));
        assert_eq!(SolarSystemBarycenter.name(), "Solar System Barycenter");
        assert_eq!(
            format!("{}", SolarSystemBarycenter),
            "Solar System Barycenter"
        );
    }
    #[test]
    fn test_body_1() {
        assert_eq!(MercuryBarycenter.id(), NaifId(1i32));
        assert_eq!(MercuryBarycenter.name(), "Mercury Barycenter");
        assert_eq!(format!("{}", MercuryBarycenter), "Mercury Barycenter");
    }
    #[test]
    fn test_point_mass_1() {
        assert_eq!(
            MercuryBarycenter.gravitational_parameter(),
            22031.868551400003f64
        );
    }
    #[test]
    fn test_body_2() {
        assert_eq!(VenusBarycenter.id(), NaifId(2i32));
        assert_eq!(VenusBarycenter.name(), "Venus Barycenter");
        assert_eq!(format!("{}", VenusBarycenter), "Venus Barycenter");
    }
    #[test]
    fn test_point_mass_2() {
        assert_eq!(VenusBarycenter.gravitational_parameter(), 324858.592f64);
    }
    #[test]
    fn test_body_3() {
        assert_eq!(EarthBarycenter.id(), NaifId(3i32));
        assert_eq!(EarthBarycenter.name(), "Earth Barycenter");
        assert_eq!(format!("{}", EarthBarycenter), "Earth Barycenter");
    }
    #[test]
    fn test_point_mass_3() {
        assert_eq!(
            EarthBarycenter.gravitational_parameter(),
            403503.2356254802f64
        );
    }
    #[test]
    fn test_body_4() {
        assert_eq!(MarsBarycenter.id(), NaifId(4i32));
        assert_eq!(MarsBarycenter.name(), "Mars Barycenter");
        assert_eq!(format!("{}", MarsBarycenter), "Mars Barycenter");
    }
    #[test]
    fn test_point_mass_4() {
        assert_eq!(
            MarsBarycenter.gravitational_parameter(),
            42828.3758157561f64
        );
    }
    #[test]
    fn test_body_5() {
        assert_eq!(JupiterBarycenter.id(), NaifId(5i32));
        assert_eq!(JupiterBarycenter.name(), "Jupiter Barycenter");
        assert_eq!(format!("{}", JupiterBarycenter), "Jupiter Barycenter");
    }
    #[test]
    fn test_point_mass_5() {
        assert_eq!(
            JupiterBarycenter.gravitational_parameter(),
            126712764.09999998f64
        );
    }
    #[test]
    fn test_body_6() {
        assert_eq!(SaturnBarycenter.id(), NaifId(6i32));
        assert_eq!(SaturnBarycenter.name(), "Saturn Barycenter");
        assert_eq!(format!("{}", SaturnBarycenter), "Saturn Barycenter");
    }
    #[test]
    fn test_point_mass_6() {
        assert_eq!(SaturnBarycenter.gravitational_parameter(), 37940584.8418f64);
    }
    #[test]
    fn test_body_7() {
        assert_eq!(UranusBarycenter.id(), NaifId(7i32));
        assert_eq!(UranusBarycenter.name(), "Uranus Barycenter");
        assert_eq!(format!("{}", UranusBarycenter), "Uranus Barycenter");
    }
    #[test]
    fn test_point_mass_7() {
        assert_eq!(
            UranusBarycenter.gravitational_parameter(),
            5794556.3999999985f64
        );
    }
    #[test]
    fn test_body_8() {
        assert_eq!(NeptuneBarycenter.id(), NaifId(8i32));
        assert_eq!(NeptuneBarycenter.name(), "Neptune Barycenter");
        assert_eq!(format!("{}", NeptuneBarycenter), "Neptune Barycenter");
    }
    #[test]
    fn test_point_mass_8() {
        assert_eq!(
            NeptuneBarycenter.gravitational_parameter(),
            6836527.100580399f64
        );
    }
    #[test]
    fn test_body_9() {
        assert_eq!(PlutoBarycenter.id(), NaifId(9i32));
        assert_eq!(PlutoBarycenter.name(), "Pluto Barycenter");
        assert_eq!(format!("{}", PlutoBarycenter), "Pluto Barycenter");
    }
    #[test]
    fn test_point_mass_9() {
        assert_eq!(PlutoBarycenter.gravitational_parameter(), 975.5f64);
    }
}
