Orbit { public double getPeriapsis() { return _a * (1 - _e); } Orbit(Body body, double a, double e, double i, double lan, double aop); Body getBody(); double getSemiMajorAxis(); double getSMA(); double getEccentricity(); double getApoapsis(); double getPeriapsis(); double getInclination(); double getLongitudeOfAscendingNode(); double getLAN(); double getArgumentOfPeriapsis(); double getAOP(); double getPeriod(); double getMeanAngularMotion(); Orbit withApoapsis(double apo); Orbit withPeriapsis(double per); Orbit withSMA(double a); Orbit withEccentricity(double e); Orbit withInclination(double i); Orbit withLAN(double lan); Orbit withAOP(double aop); OrbitAtTime withTrueAnomaly(double ta);  }
@Test public void periapsis() { Body b = new Body("A", 1); double a = 3; double e = 0.5; Orbit o = new Orbit(b, a, e, 0, 0, 0); TestUtils.assertRelativelyEquals(1.5, o.getPeriapsis(), 1e-9); }