callistos 0.0.2

Callisto celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[test]
fn orbit_new_defaults() {
    let o = callistos::physics::orbit::CallistoOrbit::new();
    assert!(o.semi_major_axis_m > 1.0e9);
    assert!(o.eccentricity < 0.01);
}

#[test]
fn orbital_period_positive() {
    let o = callistos::physics::orbit::CallistoOrbit::new();
    assert!(o.orbital_period_s() > 1.0e6);
}

#[test]
fn periapsis_less_than_apoapsis() {
    let o = callistos::physics::orbit::CallistoOrbit::new();
    assert!(o.periapsis_m() < o.apoapsis_m());
}

#[test]
fn orbital_speed_positive() {
    let o = callistos::physics::orbit::CallistoOrbit::new();
    let v = o.orbital_speed_m_s(o.semi_major_axis_m);
    assert!(v > 0.0 && v < 20_000.0);
}

#[test]
fn rotation_synchronous() {
    let r = callistos::physics::rotation::CallistoRotation::new();
    assert!(r.synchronous);
    assert!(r.equatorial_speed_m_s() > 0.0);
}

#[test]
fn tidal_response_current() {
    let t = callistos::physics::tides::TidalResponse::current();
    assert!(t.love_number > 0.0);
    assert!(t.mean_displacement_m > 0.0);
}

#[test]
fn jupiter_tidal_acceleration_nonzero() {
    let a = callistos::physics::tides::jupiter_tidal_acceleration(0.0);
    assert!(a.abs() > 0.0);
}

#[test]
fn dissipation_power_positive() {
    let t = callistos::physics::tides::TidalResponse::current();
    assert!(callistos::physics::tides::dissipation_power_w(t) > 0.0);
}

#[test]
fn micrometeorite_mass_tiny() {
    let m = callistos::physics::collisions::micrometeorite();
    assert!(m.mass_kg() < 1.0);
    assert!(m.kinetic_energy_j() > 0.0);
}

#[test]
fn basin_forming_creates_large_crater() {
    let b = callistos::physics::collisions::basin_forming_impactor();
    assert!(b.transient_crater_diameter_m() > 1_000.0);
}