Created
May 25, 2020 17:14
-
-
Save mmuszynski/f0ed6de6966f173c9258082707fb0ae6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testTrivialPlanetPositions() { | |
let sun = CelestialBody(gravitationalParameter: 1, radius: 1000) | |
let orbit = Orbit(semiMajorAxis: 2000, eccentricity: 0, meanAnomaly: 0, inclination: 0, LAN: 0, argumentOfPeriapsis: 0, centralBody: sun) | |
let initialPosition = Vector3D(x: 2000, y: 0, z: 0) | |
XCTAssertEqual(initialPosition, orbit.cartesianPosition(atTimeFromEpoch: 0)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment