Finish AB4
This commit is contained in:
@ -8,41 +8,36 @@ public class Aufgabe4Test {
|
||||
private NamedBodyForcePair sun2, mercury2, venus2, earth2, moon2, mars2, deimos2, phobos2, vesta2, pallas2, hygiea2, ceres2;
|
||||
|
||||
public void resetBodies() {
|
||||
sun2 = new NamedBodyForcePair(SolSystem4.SUN);
|
||||
earth2 = new NamedBodyForcePair(SolSystem4.EARTH);
|
||||
moon2 = new NamedBodyForcePair(SolSystem4.MOON);
|
||||
mars2 = new NamedBodyForcePair(SolSystem4.MARS);
|
||||
deimos2 = new NamedBodyForcePair(SolSystem4.DEIMOS);
|
||||
phobos2 = new NamedBodyForcePair(SolSystem4.PHOBOS);
|
||||
mercury2 = new NamedBodyForcePair(SolSystem4.MERCURY);
|
||||
venus2 = new NamedBodyForcePair(SolSystem4.VENUS);
|
||||
vesta2 = new NamedBodyForcePair(SolSystem4.VESTA);
|
||||
pallas2 = new NamedBodyForcePair(SolSystem4.PALLAS);
|
||||
hygiea2 = new NamedBodyForcePair(SolSystem4.HYGIEA);
|
||||
ceres2 = new NamedBodyForcePair(SolSystem4.CERES);
|
||||
sun2 = new NamedBodyForcePair(SolSystem4.SUN_NAMED);
|
||||
earth2 = new NamedBodyForcePair(SolSystem4.EARTH_NAMED);
|
||||
moon2 = new NamedBodyForcePair(SolSystem4.MOON_NAMED);
|
||||
mars2 = new NamedBodyForcePair(SolSystem4.MARS_NAMED);
|
||||
deimos2 = new NamedBodyForcePair(SolSystem4.DEIMOS_NAMED);
|
||||
phobos2 = new NamedBodyForcePair(SolSystem4.PHOBOS_NAMED);
|
||||
mercury2 = new NamedBodyForcePair(SolSystem4.MERCURY_NAMED);
|
||||
venus2 = new NamedBodyForcePair(SolSystem4.VENUS_NAMED);
|
||||
vesta2 = new NamedBodyForcePair(SolSystem4.VESTA_NAMED);
|
||||
pallas2 = new NamedBodyForcePair(SolSystem4.PALLAS_NAMED);
|
||||
hygiea2 = new NamedBodyForcePair(SolSystem4.HYGIEA_NAMED);
|
||||
ceres2 = new NamedBodyForcePair(SolSystem4.CERES_NAMED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEP2() {
|
||||
assertEquals(2, 3);
|
||||
//TODO: uncomment for testing
|
||||
/*
|
||||
//test classes HierarchicalSystem and NamedBodyForcePair
|
||||
|
||||
// create 12 bodies
|
||||
Body sun1, earth1, moon1, mars1, deimos1, phobos1, mercury1, venus1, vesta1, pallas1, hygiea1, ceres1;
|
||||
sun1 = new Body(1.989E30, new Vector3(0.0, 0.0, 0.0), new Vector3(0.0, 0.0, 0.0));
|
||||
earth1 = new Body(5.972E24, new Vector3(-6.13135922534815E10, -1.383789852227691E11, 2.719682263474911E7), new Vector3(26832.720535473603, -11948.23168764519, 1.9948243075997851));
|
||||
moon1 = new Body(7.349E22, new Vector3(-6.132484773775896E10, -1.387394951280871E11, 1.701046736294776E7), new Vector3(27916.62329282941, -12020.39526008238, -94.89703264508708));
|
||||
mars1 = new Body(6.41712E23, new Vector3(-1.7923193702925848E11, 1.726665823982123E11, 7.991673845249474E9), new Vector3(-15925.78496403673, -15381.16179928219, 68.67560910598857));
|
||||
deimos1 = new Body(1.8E20, new Vector3(-1.792255010450533E11, 1.726891122683271E11, 7.990659337380297E9), new Vector3(-17100.476719804457, -15020.348656808, 631.2927851249581));
|
||||
phobos1 = new Body(1.08E20, new Vector3(-1.792253482539647E11, 1.72661109673625E11, 7.987848354800322E9), new Vector3(-14738.203714241401, -13671.17675223948, -411.0012490555253));
|
||||
mercury1 = new Body(3.301E23, new Vector3(-5.167375560011926E10, -4.217574885682655E10, 1.14808913958168E9), new Vector3(21580.25398577148, -34951.03632847389, -4835.225596525241));
|
||||
venus1 = new Body(4.86747E24, new Vector3(-3.123150865740532E10, 1.0395568504115701E11, 3.173401325838074E9), new Vector3(-33748.180519629335, -10014.25141045021, 1809.94488874165));
|
||||
vesta1 = new Body(2.5908E20, new Vector3(-3.337493557929893E11, -4.7147908276077385E10, 4.1923010146878105E10), new Vector3(4440.54247538484, -19718.49074006637, 48.06573124543601));
|
||||
pallas1 = new Body(2.14E20, new Vector3(4.3452066613895575E11, -2.057319365171432E11, 1.0549957423213101E11), new Vector3(5058.947582097117, 11184.45711782372, -8183.524138259704));
|
||||
hygiea1 = new Body(8.32E19, new Vector3(-3.983943433707043E11, 2.325833000024021E11, -2.233667695713672E10), new Vector3(-6931.864585548552, -15686.8108598699, -690.5791992347208));
|
||||
ceres1 = new Body(9.394E20, new Vector3(3.781372641419032E11, 1.96718960466285E11, -6.366459168068592E10), new Vector3(-8555.324226752316, 14718.33755980907, 2040.230135060142));
|
||||
Body sun1 = new Body(SolSystem4.SUN);
|
||||
Body earth1 = new Body(SolSystem4.EARTH);
|
||||
Body moon1 = new Body(SolSystem4.MOON);
|
||||
Body mars1 = new Body(SolSystem4.MARS);
|
||||
Body deimos1 = new Body(SolSystem4.DEIMOS);
|
||||
Body phobos1 = new Body(SolSystem4.PHOBOS);
|
||||
Body mercury1 = new Body(SolSystem4.MERCURY);
|
||||
Body venus1 = new Body(SolSystem4.VENUS);
|
||||
Body vesta1 = new Body(SolSystem4.VESTA);
|
||||
Body pallas1 = new Body(SolSystem4.PALLAS);
|
||||
Body hygiea1 = new Body(SolSystem4.HYGIEA);
|
||||
Body ceres1 = new Body(SolSystem4.CERES);
|
||||
|
||||
Body[] bodies = new Body[]{sun1, mercury1, venus1, earth1, moon1, mars1, deimos1, phobos1, vesta1, pallas1, hygiea1, ceres1};
|
||||
Vector3[] forceOnBody = new Vector3[bodies.length];
|
||||
@ -57,6 +52,7 @@ public class Aufgabe4Test {
|
||||
assertEquals(2, earthSystem.numberOfBodies());
|
||||
assertEquals(12, solarSystem.numberOfBodies());
|
||||
|
||||
System.out.println(solarSystem);
|
||||
assertTrue(solarSystem.toString().contains("Mars"));
|
||||
assertTrue(solarSystem.toString().contains("Deimos"));
|
||||
assertTrue(solarSystem.toString().contains("Moon"));
|
||||
@ -110,6 +106,5 @@ public class Aufgabe4Test {
|
||||
for (int i = 0; i < bodies.length; i++) {
|
||||
assertEquals(0, bodies[i].massCenter().distanceTo(pairs[i].getMassCenter()));
|
||||
}
|
||||
*/ //TODO: uncomment
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user