Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
708515ee4f
|
||
|
|
a951b5c14a
|
||
|
|
150eb7aa49
|
||
|
|
ac40ada302
|
||
|
|
cfba0106a9
|
||
|
|
8f6320e069 | ||
|
|
d718ba90e3 | ||
|
|
eab0db8e40 | ||
|
|
406c9b02f7 | ||
|
|
05c52cd3f5 | ||
|
|
088fa3cdeb
|
||
|
|
f801a331c2
|
||
|
|
b89fc15602
|
||
|
|
2e14e45bb0 | ||
|
|
e311ef3c6b | ||
|
|
a62ef91a8a |
No files matched your search
@@ -0,0 +1,75 @@
|
|||||||
|
# Aufgabenblatt 6
|
||||||
|
|
||||||
|
## Allgemeine Anmerkungen
|
||||||
|
|
||||||
|
Ihre Lösung für dieses Aufgabenblatt ist bis Montag, 23.5. 11h durch `git commit` und `git push`
|
||||||
|
abzugeben. Mit der Angabe werden die Dateien `MassiveIterable.java`, `MassiveIterator.java`,
|
||||||
|
`MassiveSet.java`, `MassiveForceTreeMap.java`, `Simulation6.java` und `Aufgabe6Test.java`
|
||||||
|
mitgeliefert.
|
||||||
|
|
||||||
|
Wenn Sie zusätzlich zu den gefragten Klassen weitere Klassen definieren, achten Sie darauf, dass
|
||||||
|
die Klassennamen mit `My` beginnen, um Konflikte mit späteren Aufgabenblättern zu vermeiden.
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
Ziel der Aufgabe ist die Anwendung der Konzepte: Iterator, Kopie vs. Sichtweise, Sortieren
|
||||||
|
(siehe Skriptum Seite 91-109).
|
||||||
|
|
||||||
|
## Beschreibung der gegebenen Dateien
|
||||||
|
|
||||||
|
- [MassiveIterable](../src/MassiveIterable.java) ist ein Interface, das iterierbare Objekte mit
|
||||||
|
Elementen vom Typ `Massive` spezifiziert. Verändern Sie diese Datei bitte nicht.
|
||||||
|
- [MassiveIterator](../src/MassiveIterator.java) ist ein Interface, das einen Iterator über
|
||||||
|
Elemente vom Typ `Massive` spezifiziert. Verändern Sie diese Datei bitte nicht.
|
||||||
|
- [MassiveSet](../src/MassiveSet.java) ist ein Interface, das iterierbare Mengen mit
|
||||||
|
`Massive`-Elementen spezifiziert. Verändern Sie diese Datei bitte nicht.
|
||||||
|
- [MassiveForceTreeMap](../src/MassiveForceTreeMap.java) ist das Gerüst für eine Implementierung
|
||||||
|
einer assoziativen Datenstruktur, die ein `Massive`-Objekt mit der auf das Objekt wirkenden Kraft
|
||||||
|
assoziiert.
|
||||||
|
- [Simulation6](../src/Simulation6.java) ist ein Gerüst für eine ausführbare Klasse. Hier soll
|
||||||
|
die Simulation analog zur Klasse `Simulation` implementiert werden (damit Sie Ihre [ursprüngliche
|
||||||
|
Datei](../src/Simulation.java) nicht überschreiben müssen).
|
||||||
|
- [Aufgabe6Test](../src/Aufgabe6Test.java) ist eine vorgegebene Klasse, die Sie zum Testen Ihrer
|
||||||
|
Implementierung verwenden sollten. Bei einer fehlerfreien Implementierung sollten bei der
|
||||||
|
Ausführung dieser Klasse keine Exceptions geworfen werden und alle Tests als erfolgreich ("successful")
|
||||||
|
ausgegeben werden. Entfernen Sie die Kommentarzeichen, um diese Klasse verwenden zu können. Sie
|
||||||
|
müssen diese Klasse nicht weiter verändern, können aber eigene Testfälle hinzufügen.
|
||||||
|
|
||||||
|
## Aufgaben
|
||||||
|
|
||||||
|
Ihre Aufgaben sind folgende:
|
||||||
|
|
||||||
|
**1. Implementieren Sie die Klasse `MassiveForceTreeMap`.**
|
||||||
|
|
||||||
|
Implementieren Sie die Klasse `MassiveForceTreeMap`. `MassiveForceTreeMap` ist wie
|
||||||
|
`BodyForceTreeMap` aufgebaut, mit dem Unterschied, dass der Typ des Schlüssels statt `Body` nun
|
||||||
|
der Typ `Massive` ist. Weiters soll die Klasse Methode `getKeys()` zur Verfügung stellen,
|
||||||
|
die eine `MassiveSet`-Sichtweise auf die Menge der Schlüssel liefert. Änderungen an dem
|
||||||
|
zurückgelieferten `MassiveSet`-Objekt wirken sich auf das zugrunde
|
||||||
|
liegende `MassiveForceTreeMap`-Objekt aus. Die Methode `toList()` liefert dagegen eine
|
||||||
|
unabhängige Liste (Kopie) mit allen Schlüsseln der Map. Für die Implementierung von
|
||||||
|
`MassiveSet` können Sie einen eigenen Klassennamen beginnend mit `My` wählen. Die Definition kann
|
||||||
|
in einer eigenen Datei oder in der Datei `MassiveForceTreeMap.java` erfolgen.
|
||||||
|
|
||||||
|
**2. Adaptieren Sie die Klasse `HierarchicalSystem`:**
|
||||||
|
|
||||||
|
Die Klasse `HierarchicalSystem` soll so geändert werden, dass sie das gegebene
|
||||||
|
Interface `MassiveIterable` implementiert. Die Reihenfolge der vom Iterator gelieferten
|
||||||
|
Elemente ist nicht festgelegt. Sie dürfen für die Implementierung bei Bedarf Ihren Klassen
|
||||||
|
`NamedBodyForcePair` und `HierarchicalSystem` neue, nicht angegebene Methoden hinzufügen.
|
||||||
|
Die Verwendung von Klassen des Java-Collection-Frameworks (z.B. java.util.Stack) ist erlaubt
|
||||||
|
(aber nicht notwendig).
|
||||||
|
|
||||||
|
**3. Implementierung von `Simulation6`:**
|
||||||
|
|
||||||
|
Implementieren Sie die Simulationsschleife unter Verwendung eines Objekts vom Typ
|
||||||
|
`MassiveForceTreeMap`. Die Methode `getKeys()` hilft beim Iterieren der gespeicherten Schlüssel.
|
||||||
|
Kollisionen von Himmelskörpern müssen in dieser Simulation nicht berücksichtigt werden.
|
||||||
|
|
||||||
|
#### _Punkteaufteilung_
|
||||||
|
|
||||||
|
- Implementierung von `MassiveForceTreeMap`: 3 Punkte
|
||||||
|
- Implementierung von `MassiveIterable` in `HierarchicalSystem`: 1.5 Punkte
|
||||||
|
- Implementierung von `Simulation6`: 0.5 Punkte
|
||||||
|
|
||||||
|
- Gesamt: 5 Punkte
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
# Aufgabenblatt 8
|
||||||
|
|
||||||
|
## Allgemeine Anmerkungen
|
||||||
|
Ihre Lösung für dieses Aufgabenblatt ist bis Montag, 13.6., 11h durch `git commit` und `git push`
|
||||||
|
abzugeben.
|
||||||
|
Wenn Sie zusätzlich zu den gefragten Klassen und Interfaces weitere Klassen oder
|
||||||
|
Interfaces definieren, achten Sie darauf, dass die Klassennamen mit `My` beginnen, um Konflikte
|
||||||
|
mit späteren Aufgabenblättern zu vermeiden.
|
||||||
|
|
||||||
|
Weiters werden die Dateien `StateFileNotFoundException.java`,
|
||||||
|
`StateFileFormatException.java`, `ReadDataUtil.java`, `Simulation8.java`, `Simulation9.java`,
|
||||||
|
`Aufgabe8Test.java` und das Verzeichnis `states` mit `txt`-Dateien mitgeliefert.
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
Ziel der Aufgabe ist das Verständnis und die Anwendung der Konzepte: Java-Collections, Eingabe mit
|
||||||
|
Validierung, Exceptions (S. 110-123).
|
||||||
|
|
||||||
|
## Beschreibung der gegebenen Dateien
|
||||||
|
|
||||||
|
- [states](../states) ist ein Verzeichnis, in dem mehrere Dateien mit der Endung `.txt`
|
||||||
|
mitgeliefert werden. Diese enthalten Daten von je einem Himmelskörper sowie dessen Positionen und
|
||||||
|
Geschwindigkeitsvektoren für alle Tage der Jahre 2019-2021. Die Angaben sind wie gewohnt in
|
||||||
|
kartesischen Koordinaten, wobei die Sonne den Ursprung des Koordinatensystems bildet und die
|
||||||
|
Ekliptik die x-y-Ebene darstellt. Die Daten stammen von [https://ssd.jpl.nasa.gov/horizons.cgi#top](https://ssd.jpl.nasa.gov/horizons.cgi#top).
|
||||||
|
|
||||||
|
**ACHTUNG**: Die Werte sind in km bzw. km/sec angegeben!
|
||||||
|
|
||||||
|
- [StateFileNotFoundException](../src/StateFileNotFoundException.java) enthält die Definition
|
||||||
|
der Klasse `StateFileNotFoundException`. Diese sollen Sie vervollständigen.
|
||||||
|
- [StateFileFormatException](../src/StateFileFormatException.java) enthält die Definition
|
||||||
|
der Klasse `StateFileFormatException`. Diese sollen Sie vervollständigen.
|
||||||
|
- [ReadDataUtil](../src/ReadDataUtil.java) ist eine Klasse mit einer statischen Methode zum
|
||||||
|
Einlesen von Position- und Bewegungsvektoren von Himmelskörpern aus Dateien.
|
||||||
|
Diese sollen Sie vervollständigen.
|
||||||
|
- [Simulation8](../src/Simulation8.java) ist ein Gerüst für eine ausführbare Klasse. Hier soll
|
||||||
|
die Simulation analog zur Klasse `Simulation` implementiert werden (damit Sie Ihre [ursprüngliche
|
||||||
|
Datei](../src/Simulation.java) nicht überschreiben müssen).
|
||||||
|
- [Simulation9](../src/Simulation9.java) ist eine leere Datei. Hier soll eine weitere Simulation
|
||||||
|
implementiert werden, die so wie `Simulation8` funktioniert, mit dem Unterschied, dass anstelle
|
||||||
|
der selbst implementierten Datenstrukturen nur vorgefertigte Klassen aus dem
|
||||||
|
Java-Collection-Framework benutzt werden sollen.
|
||||||
|
- [Aufgabe8Test](../src/Aufgabe8Test.java) ist eine vorgegebene Klasse, die Sie zum Testen Ihrer
|
||||||
|
Implementierung verwenden sollten. Bei einer fehlerfreien Implementierung sollten bei der
|
||||||
|
Ausführung dieser Klasse keine Exceptions geworfen werden und alle Tests als erfolgreich ("successful")
|
||||||
|
ausgegeben werden. Entfernen Sie die Kommentarzeichen, um diese Klasse verwenden zu können. Sie
|
||||||
|
müssen diese Klasse nicht weiter verändern, können aber eigene Testfälle hinzufügen.
|
||||||
|
|
||||||
|
|
||||||
|
## Aufgaben
|
||||||
|
|
||||||
|
1. Ändern Sie Ihre Implementierung, sodass ein `MassiveIterator` eine Exception
|
||||||
|
vom Typ `java.util.NoSuchElementException` wirft, falls `next()` aufgerufen wird,
|
||||||
|
jedoch der Iterator keine weitere Iteration hat (`hasNext()` liefert `false`).
|
||||||
|
|
||||||
|
2. Ändern Sie den Iterator von der von `getKeys()` zurückgelieferten
|
||||||
|
Sichtweise auf `MassiveForceTreeMap` so, dass `remove()` überschrieben wird
|
||||||
|
([siehe API Dokumentation](https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html#remove--)),
|
||||||
|
sodass der Iterator Einträge in Objekten von `MassiveForceTreeMap` löschen kann. Achten Sie
|
||||||
|
darauf, dass hier in bestimmten Fällen eine `java.lang.IllegalStateException` geworfen werden
|
||||||
|
soll. Der Iterator von `HierarchicalSystem` muss nicht geändert werden.
|
||||||
|
|
||||||
|
3. Validierung von Eingabedaten:
|
||||||
|
- Implementieren Sie in der Klasse `ReadDataUtil.java` die Methode `readConfiguration`.
|
||||||
|
Es soll ein gepufferter Stream zum Einlesen genutzt werden (siehe Skriptum Seite 128).
|
||||||
|
Erstellen Sie zum Testen auch Varianten der txt-Dateien mit Formatfehlern.
|
||||||
|
- Fügen Sie der Klasse `NamedBody` bei Bedarf
|
||||||
|
eine Methode `setState(Vector3 position, Vector3 velocity)` zum Setzen der Position
|
||||||
|
und des Geschwindigkeitsvektors des Himmelskörpers hinzu.
|
||||||
|
- Definieren Sie die beiden angegebenen Exceptionklassen in den entsprechenden
|
||||||
|
mitgelieferten Dateien.
|
||||||
|
|
||||||
|
4. Ausnahmebehandlung:
|
||||||
|
In der Klasse `Simulation8` sollen nun die Himmelskörper mit Daten aus den gegebenen
|
||||||
|
txt-Dateien initialisiert werden. Dabei sollen zumindest die Sonne sowie die
|
||||||
|
inneren Planeten
|
||||||
|
Merkur, Venus, Erde und Mars vorkommen. Sie können weitere Himmelskörper (siehe txt-Dateien)
|
||||||
|
hinzufügen. Nutzen Sie die Klasse `MassiveForceTreeMap` und ihre Iteratoren, um die
|
||||||
|
Himmelskörper der Simulation zu verwalten. (Kollisionen von Himmelskörpern müssen nicht
|
||||||
|
berücksichtigt werden.)
|
||||||
|
Ändern Sie die Klasse `Simulation8` so, dass sie zwei Kommandozeilenargumente verarbeitet.
|
||||||
|
Das erste Argument ist ein String mit der Angabe des Pfades zum Verzeichnis, wo die
|
||||||
|
entsprechenden txt-Dateien (z.B. `Venus.txt`,`Mercury.txt`,`Earth.txt`) mit den Konfigurationen
|
||||||
|
der Himmelskörper zu finden sind. Die Dateien haben die Namen der Himmelskörper mit Endung `
|
||||||
|
.txt`. Für die Sonne gibt es keine txt-Datei (es wird die Position (0,0,0) angenommen).
|
||||||
|
Das zweite Argument ist ein String mit einer Datumsangabe der Form YYYY-MMM-DD, also z.B.
|
||||||
|
2020-Dec-04, die den Tag der auszulesenden Position und Bewegungsvektor bestimmt. Die Klasse
|
||||||
|
soll beim Auftreten von Problemen bei der Ausführung entsprechende Fehlermeldungen ausgeben und
|
||||||
|
die Ausführung in bestimmten Fällen beenden. Beispiele für Aufrufe im Kommandozeileninterpreter
|
||||||
|
mit entsprechenden Fehlermeldungen (Sie können zum Ausführen das Terminal in IntelliJ nutzen
|
||||||
|
oder die Programmargumente unter `Edit Configurations` angeben):
|
||||||
|
```
|
||||||
|
$ javac Simulation8.java
|
||||||
|
$ java Simulation8 ../states 2021-May-28
|
||||||
|
Running simulation ...
|
||||||
|
$ java Simulation8 ../states
|
||||||
|
Error: wrong number of arguments.
|
||||||
|
$ java Simulation8 ../states 2025-Dec-12
|
||||||
|
Warning: State not available for Earth.
|
||||||
|
Running simulation without Earth.
|
||||||
|
Warning: State not available for Venus.
|
||||||
|
Running simulation without Venus.
|
||||||
|
...
|
||||||
|
$ java Simulation8 ../states-altered 2021-May-28
|
||||||
|
Warning: File ../states-altered/Venus.txt does not have required format.
|
||||||
|
Running simulation without Venus.
|
||||||
|
Warning: File ../states-altered/Mars.txt not found.
|
||||||
|
Running simulation without Mars.
|
||||||
|
Running simulation ...
|
||||||
|
$ java Simulation8 ../states -17
|
||||||
|
Error: State has wrong format (requires YYYY-MM-DD), aborting.
|
||||||
|
$ java Simulation8 blah 2021-May-28
|
||||||
|
Warning: File blah/Earth.txt not found.
|
||||||
|
Running simulation without Earth.
|
||||||
|
Warning: File blah/Venus.txt not found.
|
||||||
|
Running simulation without Venus.
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Kopieren Sie den Inhalt der Datei `Simulation8.java` in die Datei `Simulation9.java` und bauen
|
||||||
|
Sie `Simulation9` so um, dass anstelle der selbst implementierten Datenstrukturen nur
|
||||||
|
vorgefertigte Klassen aus dem Java-Collection-Framework benutzt werden.
|
||||||
|
|
||||||
|
6. Freiwillige Zusatzaufgabe (ohne Bewertung):
|
||||||
|
Ändern Sie die Klasse `Simulation8` so um, dass ein drittes optionales Kommandozeilenargument
|
||||||
|
verarbeitet werden kann. Dieses gibt an, wie viele Tage simuliert werden sollen. Beispielsweise
|
||||||
|
kann eine zweite Datumsangabe möglich sein, oder die Anzahl an Tagen.
|
||||||
|
Sobald dieser Zeitpunkt in der Simulation erreicht wurde, können die aktuellen Positionen der
|
||||||
|
Himmelskörper mit den in den txt-Dateien angegebenen Positionen verglichen werden (z.B.
|
||||||
|
durch erneutem Aufruf von `readConfiguration` und `draw`). Wie groß sind die Abweichungen
|
||||||
|
der von NASA errechneten Positionen zu den Positionen, die Ihre Simulation liefert?
|
||||||
|
|
||||||
|
### Denkanstöße (ohne Bewertung)
|
||||||
|
|
||||||
|
1. Haben Sie die remove-Methode des Iterators so implementiert, dass der Aufruf keine
|
||||||
|
zusätzliche Suche nach dem zu löschenden Eintrag benötigt?
|
||||||
|
2. Wie verhalten sich die von der Methode `toList()` der Klasse `MassiveForceTreeMap`
|
||||||
|
zurückgelieferten Listen, wenn deren enthaltene Himmelskörper durch `setState` verändert werden?
|
||||||
|
Werden dadurch die Himmelskörper der ursprünglichen `MassiveForceTreeMap`-Objekte auch geändert?
|
||||||
|
(Anmerkung: diesbezüglich gibt es im Aufgabenblatt 6 keine Vorgaben).
|
||||||
|
3. Wie verhalten sich Ihre Iteratoren, wenn Objekte geändert werden?
|
||||||
|
4. Wie kann man durch Einfügen von Zeichen `,` und newlines (`\n`) aus den `txt`-Dateien eine
|
||||||
|
"fehlerhafte" Datei machen, die trotzdem von der Methode akzeptiert wird? Kann man solche Probleme
|
||||||
|
verhindern?
|
||||||
|
|
||||||
|
#### _Punkteaufteilung_
|
||||||
|
|
||||||
|
- Änderung von `next()` von `MassiveIterator`: 0.5 Punkte
|
||||||
|
- Implementierung der Methode `remove()` im Iterator der `MassiveSet`-Sichtweise
|
||||||
|
von `MassiveForceTreeMap`: 2 Punkte
|
||||||
|
- Implementierung der Exceptionklassen und Implementierung von `readConfiguration`
|
||||||
|
in `ReadDataUtil`: 1.5 Punkte
|
||||||
|
- Implementierung von `Simulation8` und `Simulation9`: 1 Punkt
|
||||||
@@ -78,4 +78,19 @@ public class Aufgabe5Test {
|
|||||||
assertEquals(hashCode2, map.hashCode());
|
assertEquals(hashCode2, map.hashCode());
|
||||||
assertNotEquals(hashCode1, hashCode2);
|
assertNotEquals(hashCode1, hashCode2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDelKey() {
|
||||||
|
MassiveForceHashMap map = new MassiveForceHashMap();
|
||||||
|
NamedBody sun1 = new NamedBody(SolSystem4.SUN_NAMED);
|
||||||
|
NamedBody earth1 = new NamedBody(SolSystem4.EARTH_NAMED);
|
||||||
|
NamedBody moon1 = new NamedBody(SolSystem4.MOON_NAMED);
|
||||||
|
map.put(sun1, new Vector3());
|
||||||
|
map.put(earth1, new Vector3());
|
||||||
|
map.put(moon1, new Vector3());
|
||||||
|
assertNotNull(map.get(sun1));
|
||||||
|
assertNotNull(map.delete(sun1));
|
||||||
|
assertNull(map.get(sun1));
|
||||||
|
assertNull(map.delete(sun1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
public class Aufgabe6Test {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEP2() {
|
||||||
|
NamedBody sun1, mercury1, venus1, earth1, moon1, mars1, deimos1, phobos1, vesta1, pallas1, hygiea1, ceres1;
|
||||||
|
|
||||||
|
// create the same 12 named body-force pairs
|
||||||
|
sun1 = new NamedBody(SolSystem4.SUN_NAMED);
|
||||||
|
earth1 = new NamedBody(SolSystem4.EARTH_NAMED);
|
||||||
|
moon1 = new NamedBody(SolSystem4.MOON_NAMED);
|
||||||
|
mars1 = new NamedBody(SolSystem4.MARS_NAMED);
|
||||||
|
deimos1 = new NamedBody(SolSystem4.DEIMOS_NAMED);
|
||||||
|
phobos1 = new NamedBody(SolSystem4.PHOBOS_NAMED);
|
||||||
|
mercury1 = new NamedBody(SolSystem4.MERCURY_NAMED);
|
||||||
|
venus1 = new NamedBody(SolSystem4.VENUS_NAMED);
|
||||||
|
vesta1 = new NamedBody(SolSystem4.VESTA_NAMED);
|
||||||
|
pallas1 = new NamedBody(SolSystem4.PALLAS_NAMED);
|
||||||
|
hygiea1 = new NamedBody(SolSystem4.HYGIEA_NAMED);
|
||||||
|
ceres1 = new NamedBody(SolSystem4.CERES_NAMED);
|
||||||
|
|
||||||
|
// check basic functions of 'MassiveForceHashMap'
|
||||||
|
MassiveForceTreeMap map = new MassiveForceTreeMap();
|
||||||
|
map.put(sun1, new Vector3(0, 0, 0));
|
||||||
|
map.put(mercury1, new Vector3(0, 0, 0));
|
||||||
|
map.put(venus1, new Vector3(0, 0, 0));
|
||||||
|
map.put(earth1, new Vector3(0, 0, 0));
|
||||||
|
map.put(moon1, new Vector3(0, 0, 0));
|
||||||
|
map.put(mars1, new Vector3(0, 0, 0));
|
||||||
|
map.put(deimos1, new Vector3(0, 0, 0));
|
||||||
|
map.put(phobos1, new Vector3(0, 0, 0));
|
||||||
|
map.put(vesta1, new Vector3(0, 0, 0));
|
||||||
|
map.put(pallas1, new Vector3(0, 0, 0));
|
||||||
|
map.put(hygiea1, new Vector3(0, 0, 0));
|
||||||
|
map.put(ceres1, new Vector3(0, 0, 0));
|
||||||
|
map.put(mars1, new Vector3(0, 0, 0)); // inserted twice
|
||||||
|
|
||||||
|
HashSet<Massive> set1 = new HashSet<>();
|
||||||
|
set1.add(sun1);
|
||||||
|
set1.add(mercury1);
|
||||||
|
set1.add(venus1);
|
||||||
|
set1.add(earth1);
|
||||||
|
set1.add(moon1);
|
||||||
|
set1.add(mars1);
|
||||||
|
set1.add(deimos1);
|
||||||
|
set1.add(phobos1);
|
||||||
|
set1.add(vesta1);
|
||||||
|
set1.add(pallas1);
|
||||||
|
set1.add(hygiea1);
|
||||||
|
set1.add(ceres1);
|
||||||
|
|
||||||
|
assertTrue(map.toString().contains("Mars"));
|
||||||
|
assertTrue(map.toString().contains("Deimos"));
|
||||||
|
assertTrue(map.toString().contains("Moon"));
|
||||||
|
assertTrue(map.toString().contains("Earth"));
|
||||||
|
|
||||||
|
assertEquals(12, map.getKeys().size());
|
||||||
|
|
||||||
|
assertTrue(map.getKeys().contains(mars1));
|
||||||
|
assertTrue(map.getKeys().contains(new NamedBody("Mars", 6.41712E23, new Vector3(0, 0, 0), new Vector3(0, 0, 0))));
|
||||||
|
assertFalse(map.getKeys().contains(new Body(6.41712E23, new Vector3(0, 0, 0), new Vector3(0, 0, 0))));
|
||||||
|
|
||||||
|
HashSet<Massive> set2 = new HashSet<>();
|
||||||
|
for (Massive m : map.getKeys()) {
|
||||||
|
set2.add(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
assertEquals(set1, set2);
|
||||||
|
|
||||||
|
MassiveLinkedList list = map.getKeys().toList();
|
||||||
|
while (list.size() > 0) {
|
||||||
|
set1.remove(list.pollLast());
|
||||||
|
}
|
||||||
|
assertTrue(set1.isEmpty());
|
||||||
|
|
||||||
|
map.getKeys().remove(mars1);
|
||||||
|
assertFalse(map.containsKey(mars1));
|
||||||
|
assertEquals(11, map.getKeys().size());
|
||||||
|
map.getKeys().clear();
|
||||||
|
assertEquals(0, map.getKeys().size());
|
||||||
|
|
||||||
|
NamedBodyForcePair sun2, mercury2, venus2, earth2, moon2, mars2, deimos2, phobos2, vesta2, pallas2, hygiea2, ceres2;
|
||||||
|
|
||||||
|
//test classes NamedBody and MassiveForceHashMap
|
||||||
|
|
||||||
|
// create 12 named bodies
|
||||||
|
// create the same 12 named body-force pairs
|
||||||
|
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);
|
||||||
|
|
||||||
|
CosmicSystem earthSystem = new HierarchicalSystem(earth2, moon2);
|
||||||
|
CosmicSystem marsSystem = new HierarchicalSystem(mars2, deimos2, phobos2);
|
||||||
|
HierarchicalSystem solarSystem = new HierarchicalSystem(sun2, mercury2, venus2, earthSystem, marsSystem, vesta2, pallas2, hygiea2, ceres2);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (Massive b : solarSystem) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
assertEquals(12, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIterator() {
|
||||||
|
NamedBody sun1, mercury1, venus1;
|
||||||
|
sun1 = new NamedBody(SolSystem4.SUN_NAMED);
|
||||||
|
mercury1 = new NamedBody(SolSystem4.MERCURY_NAMED);
|
||||||
|
venus1 = new NamedBody(SolSystem4.VENUS_NAMED);
|
||||||
|
|
||||||
|
MassiveForceTreeMap map = new MassiveForceTreeMap();
|
||||||
|
|
||||||
|
map.put(sun1, new Vector3());
|
||||||
|
map.put(mercury1, new Vector3());
|
||||||
|
map.put(venus1, new Vector3());
|
||||||
|
for (Massive m : map.getKeys().toList()) {
|
||||||
|
System.out.println(m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
public class Aufgabe8Test {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEP2() {
|
||||||
|
MassiveForceTreeMap map = new MassiveForceTreeMap();
|
||||||
|
NamedBody mars;
|
||||||
|
|
||||||
|
map.put(new NamedBody("Oumuamua", 8e6, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Earth", 5.972E24, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Moon", 7.349E22, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(mars = new NamedBody("Mars", 6.41712E23, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Deimos", 1.8E20, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Phobos", 1.08E20, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Mercury", 3.301E23, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Venus", 4.86747E24, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Vesta", 2.5908E20, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Pallas", 2.14E20, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Hygiea", 8.32E19, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
map.put(new NamedBody("Ceres", 9.394E20, new Vector3(), new Vector3()), new Vector3());
|
||||||
|
|
||||||
|
assertEquals(12, map.size());
|
||||||
|
|
||||||
|
MassiveIterator iterator = map.getKeys().iterator();
|
||||||
|
int count;
|
||||||
|
for (count = 0; iterator.hasNext(); count++) {
|
||||||
|
if (iterator.next().equals(mars)) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assertEquals(12, count);
|
||||||
|
assertEquals(11, map.getKeys().size());
|
||||||
|
assertEquals(11, map.size());
|
||||||
|
assertFalse(map.getKeys().contains(mars));
|
||||||
|
|
||||||
|
assertThrows(NoSuchElementException.class, iterator::next);
|
||||||
|
|
||||||
|
iterator = map.getKeys().iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
iterator.next();
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
assertEquals(0, map.getKeys().size());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,19 @@ public class Body implements Massive {
|
|||||||
this.currentMovement = new Vector3(other.currentMovement);
|
this.currentMovement = new Vector3(other.currentMovement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Body(double mass) {
|
||||||
|
this(mass, new Vector3(), new Vector3());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Body() {
|
||||||
|
this(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(Vector3 position, Vector3 velocity) {
|
||||||
|
this.massCenter = new Vector3(position);
|
||||||
|
this.currentMovement = new Vector3(velocity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the distance between the mass centers of this body and the specified body 'b'.
|
* Returns the distance between the mass centers of this body and the specified body 'b'.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -87,14 +87,14 @@ public class BodyForceTreeMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String toString(Item item) {
|
private String toString(Item item) {
|
||||||
String s = "";
|
StringBuilder s = new StringBuilder();
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return s;
|
return s.toString();
|
||||||
}
|
}
|
||||||
s += this.toString(item.right);
|
s.append(this.toString(item.right));
|
||||||
s += String.format("{%s: %s}\n", item.key, item.value);
|
s.append(String.format("{%s: %s}\n", item.key, item.value));
|
||||||
s += this.toString(item.left);
|
s.append(this.toString(item.left));
|
||||||
return s;
|
return s.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,10 +103,10 @@ public class BodyForceTreeMap {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return toString(root);
|
return (root != null) ? toString(root) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Item {
|
private static class Item {
|
||||||
private final Body key;
|
private final Body key;
|
||||||
private Vector3 value;
|
private Vector3 value;
|
||||||
private Item parent;
|
private Item parent;
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public class BodyLinkedList implements Iterable<Body> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Item {
|
private static class Item {
|
||||||
private final Body body;
|
private final Body body;
|
||||||
private Item prev;
|
private Item prev;
|
||||||
private Item next;
|
private Item next;
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
import codedraw.CodeDraw;
|
import codedraw.CodeDraw;
|
||||||
|
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A cosmic system that is composed of a central named body (of type 'NamedBodyForcePair')
|
* A cosmic system that is composed of a central named body (of type 'NamedBodyForcePair')
|
||||||
* and an arbitrary number of subsystems (of type 'CosmicSystem') in its orbit.
|
* and an arbitrary number of subsystems (of type 'CosmicSystem') in its orbit.
|
||||||
* This class implements 'CosmicSystem'.
|
* This class implements 'CosmicSystem'.
|
||||||
*/
|
*/
|
||||||
public class HierarchicalSystem implements CosmicSystem {
|
public class HierarchicalSystem implements CosmicSystem, MassiveIterable {
|
||||||
|
|
||||||
private final NamedBodyForcePair central;
|
private final NamedBodyForcePair central;
|
||||||
private final CosmicSystem[] orbit;
|
private CosmicSystem[] orbit;
|
||||||
private final CosmicSystem[] all;
|
private CosmicSystem[] all;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes this system with a name and a central body.
|
* Initializes this system with a name and a central body.
|
||||||
@@ -110,4 +112,69 @@ public class HierarchicalSystem implements CosmicSystem {
|
|||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Puts the system 'cs' at the first place in the orbit of this system.
|
||||||
|
* Precondition: cs != null
|
||||||
|
*/
|
||||||
|
public boolean putFirst(CosmicSystem cs) {
|
||||||
|
CosmicSystem[] old = orbit;
|
||||||
|
orbit = new CosmicSystem[old.length + 1];
|
||||||
|
all = new CosmicSystem[old.length + 2];
|
||||||
|
|
||||||
|
orbit[0] = cs;
|
||||||
|
System.arraycopy(old, 0, orbit, 1, old.length);
|
||||||
|
all[0] = central;
|
||||||
|
System.arraycopy(orbit, 0, all, 1, orbit.length);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MassiveIterator iterator() {
|
||||||
|
return new MassiveIterator() {
|
||||||
|
private int i = 0;
|
||||||
|
private MassiveIterator cur = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Massive next() {
|
||||||
|
if (!hasNext()) throw new NoSuchElementException();
|
||||||
|
if (cur != null && cur.hasNext()) return cur.next();
|
||||||
|
|
||||||
|
while (i < all.length) {
|
||||||
|
CosmicSystem sys = all[i++];
|
||||||
|
if (sys instanceof NamedBodyForcePair m) {
|
||||||
|
return m.getBody();
|
||||||
|
} else if (sys instanceof HierarchicalSystem hs) {
|
||||||
|
cur = hs.iterator();
|
||||||
|
if (cur.hasNext()) {
|
||||||
|
return cur.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext() {
|
||||||
|
if (cur != null && cur.hasNext()) return true;
|
||||||
|
|
||||||
|
while (i < all.length) {
|
||||||
|
CosmicSystem sys = all[i];
|
||||||
|
if (sys instanceof NamedBodyForcePair) return true;
|
||||||
|
i++;
|
||||||
|
|
||||||
|
if (sys instanceof HierarchicalSystem hs) {
|
||||||
|
cur = hs.iterator();
|
||||||
|
if (cur.hasNext()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -65,16 +65,36 @@ public class MassiveForceHashMap {
|
|||||||
* Precondition: key != null.
|
* Precondition: key != null.
|
||||||
*/
|
*/
|
||||||
public Vector3 get(Massive key) {
|
public Vector3 get(Massive key) {
|
||||||
|
int pos = find(key);
|
||||||
|
return (pos == -1) ? null : values[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
private int find(Massive key) {
|
||||||
int idx = ((key.hashCode() % keys.length) + keys.length) % keys.length;
|
int idx = ((key.hashCode() % keys.length) + keys.length) % keys.length;
|
||||||
for (int i = 0; i < keys.length; i++) {
|
for (int i = 0; i < keys.length; i++) {
|
||||||
int pos = (idx + i) % keys.length;
|
int pos = (idx + i) % keys.length;
|
||||||
if (keys[pos] == null) {
|
if (keys[pos] == null) {
|
||||||
break;
|
break;
|
||||||
} else if (keys[pos].equals(key)) {
|
} else if (keys[pos].equals(key)) {
|
||||||
return values[pos];
|
return pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes the mapping for the specified key from this map if present.
|
||||||
|
* Returns the previous value associated with key, or null if there was
|
||||||
|
* no mapping for key.
|
||||||
|
* Precondition: key != null
|
||||||
|
*/
|
||||||
|
public Vector3 delete(Massive key) {
|
||||||
|
int pos = find(key);
|
||||||
|
if (pos == -1) return null;
|
||||||
|
|
||||||
|
Vector3 val = values[pos];
|
||||||
|
values[pos] = null;
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,270 @@
|
|||||||
|
import codedraw.CodeDraw;
|
||||||
|
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A map that associates an object of 'Massive' with a Vector3. The number of key-value pairs
|
||||||
|
* is not limited.
|
||||||
|
*/
|
||||||
|
public class MassiveForceTreeMap implements MassiveSet {
|
||||||
|
private int size = 0;
|
||||||
|
private Item root;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a new key-value association to this map. If the key already exists in this map,
|
||||||
|
* the value is replaced and the old value is returned. Otherwise 'null' is returned.
|
||||||
|
* Precondition: key != null.
|
||||||
|
*/
|
||||||
|
public Vector3 put(Massive key, Vector3 value) {
|
||||||
|
if (root == null) {
|
||||||
|
root = new Item(key, value);
|
||||||
|
size++;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Item item = root;
|
||||||
|
while (item != null) {
|
||||||
|
if (item.key.equals(key)) {
|
||||||
|
Vector3 old = item.value;
|
||||||
|
item.value = value;
|
||||||
|
return old;
|
||||||
|
} else if (item.key.mass() > key.mass()) {
|
||||||
|
if (item.left != null) {
|
||||||
|
item = item.left;
|
||||||
|
} else {
|
||||||
|
item.setLeft(new Item(key, value));
|
||||||
|
size++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (item.right != null) {
|
||||||
|
item = item.right;
|
||||||
|
} else{
|
||||||
|
item.setRight(new Item(key, value));
|
||||||
|
size++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the value associated with the specified key, i.e. the method returns the force vector
|
||||||
|
* associated with the specified key. Returns 'null' if the key is not contained in this map.
|
||||||
|
* Precondition: key != null.
|
||||||
|
*/
|
||||||
|
public Vector3 get(Massive key) {
|
||||||
|
Item item = root;
|
||||||
|
while (item != null) {
|
||||||
|
if (item.key.equals(key)) {
|
||||||
|
return item.value;
|
||||||
|
} else if (item.key.mass() > key.mass()) {
|
||||||
|
item = item.left;
|
||||||
|
} else {
|
||||||
|
item = item.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if this map contains a mapping for the specified key.
|
||||||
|
* Precondition: key != null
|
||||||
|
*/
|
||||||
|
public boolean containsKey(Massive key) {
|
||||||
|
Item item = root;
|
||||||
|
while (item != null) {
|
||||||
|
if (item.key.equals(key)) {
|
||||||
|
return true;
|
||||||
|
} else if (item.key.mass() > key.mass()) {
|
||||||
|
item = item.left;
|
||||||
|
} else {
|
||||||
|
item = item.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String toString(Item item) {
|
||||||
|
StringBuilder s = new StringBuilder();
|
||||||
|
if (item == null) {
|
||||||
|
return s.toString();
|
||||||
|
}
|
||||||
|
s.append(this.toString(item.right));
|
||||||
|
s.append(String.format("{%s: %s}\n", item.key, item.value));
|
||||||
|
s.append(this.toString(item.left));
|
||||||
|
return s.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a readable representation of this map, in which key-value pairs are ordered
|
||||||
|
* descending according to 'key.getMass()'.
|
||||||
|
*/
|
||||||
|
public String toString() {
|
||||||
|
return (root != null) ? toString(root) : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a `MassiveSet` view of the keys contained in this tree map. Changing the
|
||||||
|
* elements of the returned `MassiveSet` object also affects the keys in this tree map.
|
||||||
|
*/
|
||||||
|
public MassiveSet getKeys() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(CodeDraw cd) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MassiveIterator iterator() {
|
||||||
|
return new MassiveIterator() {
|
||||||
|
private Item last = null;
|
||||||
|
private Item next = root.getLeftLeaf();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Massive next() {
|
||||||
|
if (!hasNext()) throw new NoSuchElementException();
|
||||||
|
|
||||||
|
last = next;
|
||||||
|
Item newNext = (next.right != null) ? next.right.getLeftLeaf() : next.parent;
|
||||||
|
|
||||||
|
while (newNext != null && newNext.right == next) {
|
||||||
|
next = newNext;
|
||||||
|
newNext = newNext.parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
next = newNext;
|
||||||
|
return last.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext() {
|
||||||
|
return next != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
if (last == null) throw new IllegalStateException();
|
||||||
|
removeItem(last);
|
||||||
|
last = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean contains(Massive element) {
|
||||||
|
return containsKey(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(Massive element) {
|
||||||
|
Item item = root;
|
||||||
|
while (item != null) {
|
||||||
|
if (item.key.equals(element)) {
|
||||||
|
removeItem(item);
|
||||||
|
return;
|
||||||
|
} else if (item.key.mass() > element.mass()) {
|
||||||
|
item = item.left;
|
||||||
|
} else {
|
||||||
|
item = item.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new NoSuchElementException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removeItem(Item item) {
|
||||||
|
size--;
|
||||||
|
Item newP = null;
|
||||||
|
|
||||||
|
if (item.left != null) {
|
||||||
|
newP = item.left.getRightLeaf();
|
||||||
|
if (newP != item.left) {
|
||||||
|
newP.parent.setRight(newP.left);
|
||||||
|
newP.setLeft(item.left);
|
||||||
|
}
|
||||||
|
newP.setRight(item.right);
|
||||||
|
} else if (item.right != null) {
|
||||||
|
newP = item.right.getLeftLeaf();
|
||||||
|
if (newP != item.right) {
|
||||||
|
newP.parent.setLeft(newP.right);
|
||||||
|
newP.setRight(item.right);
|
||||||
|
}
|
||||||
|
newP.setLeft(item.left);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newP == null) {
|
||||||
|
root = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.parent != null) {
|
||||||
|
if (item.parent.left == item) {
|
||||||
|
item.parent.setLeft(newP);
|
||||||
|
} else {
|
||||||
|
item.parent.setRight(newP);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
root = newP;
|
||||||
|
newP.parent = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clear() {
|
||||||
|
size = 0;
|
||||||
|
root = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int size() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MassiveLinkedList toList() {
|
||||||
|
MassiveLinkedList list = new MassiveLinkedList();
|
||||||
|
for (Massive m : this) {
|
||||||
|
list.addLast(m);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Item {
|
||||||
|
private final Massive key;
|
||||||
|
private Vector3 value;
|
||||||
|
private Item parent;
|
||||||
|
private Item left;
|
||||||
|
private Item right;
|
||||||
|
|
||||||
|
public Item(Massive key, Vector3 value) {
|
||||||
|
this.key = key;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeft(Item left) {
|
||||||
|
this.left = left;
|
||||||
|
if (left != null) left.parent = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRight(Item right) {
|
||||||
|
this.right = right;
|
||||||
|
if (right != null) right.parent = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Item getLeftLeaf() {
|
||||||
|
Item cur = this;
|
||||||
|
while (cur.left != null) cur = cur.left;
|
||||||
|
return cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Item getRightLeaf() {
|
||||||
|
Item cur = this;
|
||||||
|
while (cur.right != null) cur = cur.right;
|
||||||
|
return cur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Iterable objects with 'Massive' elements.
|
||||||
|
*/
|
||||||
|
public interface MassiveIterable extends Iterable<Massive> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an iterator over elements of 'Massive'.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
MassiveIterator iterator();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An iterator over elements of 'Massive'.
|
||||||
|
*/
|
||||||
|
public interface MassiveIterator extends Iterator<Massive> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next element in the iteration.
|
||||||
|
* (Returns 'null' if the iteration has no more elements.)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
Massive next();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if the iteration has more elements.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
boolean hasNext();
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of massive objects implemented as a linked list.
|
* A list of massive objects implemented as a linked list.
|
||||||
* The number of elements of the list is not limited.
|
* The number of elements of the list is not limited.
|
||||||
*/
|
*/
|
||||||
public class MassiveLinkedList implements Iterable<Massive> {
|
public class MassiveLinkedList implements MassiveIterable {
|
||||||
private int size = 0;
|
private int size = 0;
|
||||||
private Item first;
|
private Item first;
|
||||||
private Item last;
|
private Item last;
|
||||||
@@ -98,7 +99,7 @@ public class MassiveLinkedList implements Iterable<Massive> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Massive m = last.body;
|
Massive m = last.body;
|
||||||
last = last.next;
|
last = last.prev;
|
||||||
if (last != null) last.setNext(null);
|
if (last != null) last.setNext(null);
|
||||||
size--;
|
size--;
|
||||||
return m;
|
return m;
|
||||||
@@ -172,8 +173,8 @@ public class MassiveLinkedList implements Iterable<Massive> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterator<Massive> iterator() {
|
public MassiveIterator iterator() {
|
||||||
return new Iterator<>() {
|
return new MassiveIterator() {
|
||||||
Item ptr = first;
|
Item ptr = first;
|
||||||
boolean yieldedFirst = false;
|
boolean yieldedFirst = false;
|
||||||
|
|
||||||
@@ -184,6 +185,7 @@ public class MassiveLinkedList implements Iterable<Massive> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Massive next() {
|
public Massive next() {
|
||||||
|
if (!hasNext()) throw new NoSuchElementException();
|
||||||
if (!yieldedFirst) {
|
if (!yieldedFirst) {
|
||||||
yieldedFirst = true;
|
yieldedFirst = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -194,7 +196,7 @@ public class MassiveLinkedList implements Iterable<Massive> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Item {
|
private static class Item {
|
||||||
private final Massive body;
|
private final Massive body;
|
||||||
private Item prev;
|
private Item prev;
|
||||||
private Item next;
|
private Item next;
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* A collection of 'Massive' objects in which there are no duplicates.
|
||||||
|
*/
|
||||||
|
public interface MassiveSet extends MassiveIterable, Drawable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns 'true' if the set has the specified element (i.e., has an element equal to the
|
||||||
|
* specified element).
|
||||||
|
*/
|
||||||
|
boolean contains(Massive element);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified element from the set.
|
||||||
|
*/
|
||||||
|
void remove(Massive element);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all elements from the set.
|
||||||
|
*/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of elements in the set.
|
||||||
|
*/
|
||||||
|
int size();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an object of 'MassiveLinkedList' with all elements of 'this'.
|
||||||
|
*/
|
||||||
|
MassiveLinkedList toList();
|
||||||
|
}
|
||||||
+17
-29
@@ -1,43 +1,41 @@
|
|||||||
import codedraw.CodeDraw;
|
|
||||||
|
|
||||||
public class NamedBody implements Massive {
|
public class NamedBody extends Body {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Body body;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes this with name, mass, current position and movement.
|
* Initializes this with name, mass, current position and movement.
|
||||||
*/
|
*/
|
||||||
public NamedBody(String name, double mass, Vector3 massCenter, Vector3 currentMovement) {
|
public NamedBody(String name, double mass, Vector3 massCenter, Vector3 currentMovement) {
|
||||||
this(name, new Body(mass, massCenter, currentMovement));
|
super(mass, massCenter, currentMovement);
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NamedBody(String name, double mass) {
|
||||||
|
super(mass);
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NamedBody(String name) {
|
||||||
|
super();
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NamedBody(String name, Body body) {
|
public NamedBody(String name, Body body) {
|
||||||
|
super(body);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.body = body;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NamedBody(NamedBody other) {
|
public NamedBody(NamedBody other) {
|
||||||
this(other.name, new Body(other.body));
|
super(other);
|
||||||
|
this.name = other.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the body.
|
* Returns the name of the body.
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return this.name;
|
||||||
}
|
|
||||||
|
|
||||||
public Body getBody() {
|
|
||||||
return body;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector3 getMassCenter() {
|
|
||||||
return body.getMassCenter();
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getMass() {
|
|
||||||
return body.getMass();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,14 +64,4 @@ public class NamedBody implements Massive {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return this.getName();
|
return this.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void move(Vector3 force) {
|
|
||||||
body.move(force);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(CodeDraw cd) {
|
|
||||||
body.draw(cd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ public class NamedBodyForcePair implements CosmicSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Body getBody() {
|
public Body getBody() {
|
||||||
return body.getBody();
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,13 +72,13 @@ public class NamedBodyForcePair implements CosmicSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addForceTo(CosmicSystem cs) {
|
public void addForceTo(CosmicSystem cs) {
|
||||||
cs.addForceFrom(body.getBody());
|
cs.addForceFrom(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BodyLinkedList getBodies() {
|
public BodyLinkedList getBodies() {
|
||||||
BodyLinkedList list = new BodyLinkedList();
|
BodyLinkedList list = new BodyLinkedList();
|
||||||
list.addFirst(body.getBody());
|
list.addFirst(body);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
import java.io.*;
|
||||||
|
import java.util.Scanner;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class ReadDataUtil {
|
||||||
|
|
||||||
|
private static final Pattern LINE_FORMAT = Pattern.compile("^\\d+(\\.\\d+)?, *[A-Za-z \\d:.-]+(, *[-+]?\\d+(\\.\\d+)?([eE][+-]?\\d+)?){6}, *$");
|
||||||
|
private static final Pattern DATE_COLUMN_FORMAT = Pattern.compile("^A\\.D\\. (?<year>\\d{4})-(?<month>[A-Z][a-z]{2})-(?<day>[0-3]\\d) \\d{2}:\\d{2}:\\d{2}(\\.\\d+)?$");
|
||||||
|
private static final Pattern DATE_FORMAT_YYYY_MMM_DD = Pattern.compile("^(?<year>\\d{4})-(?<month>[A-Z][a-z]{2})-(?<day>[0-3]\\d)$");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the position and velocity vector on the specified 'day' from the file with the
|
||||||
|
* specified 'path', and sets position and current velocity of 'b' accordingly. If
|
||||||
|
* successful the method returns 'true'. If the specified 'day' was not found in the file,
|
||||||
|
* 'b' is unchanged and the method returns 'false'.
|
||||||
|
* The file format is validated before reading the state.
|
||||||
|
* Lines before the line "$$SOE" and after the line "$$EOE" the are ignored. Each line of the
|
||||||
|
* file between the line "$$SOE" and the line "$$EOE" is required to have the following format:
|
||||||
|
* JDTDB, TIME, X, Y, Z, VX, VY, VZ
|
||||||
|
* where JDTDB is interpretable as a 'double' value, TIME is a string and X, Y, Z, VX, VY and
|
||||||
|
* VZ are interpretable as 'double' values. JDTDB can be ignored. The character ',' must only
|
||||||
|
* be used as field separator. If the file is not found, an exception of the class
|
||||||
|
* 'StateFileNotFoundException' is thrown. If it does not comply with the format described
|
||||||
|
* above, the method throws an exception of the class 'StateFileFormatException'. Both
|
||||||
|
* exceptions are subtypes of 'IOException'.
|
||||||
|
* Precondition: b != null, path != null, day != null and has the format YYYY-MM-DD.
|
||||||
|
*/
|
||||||
|
public static boolean readConfiguration(NamedBody b, String path, String day) throws IOException {
|
||||||
|
State state = State.Pre;
|
||||||
|
try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(path))) {
|
||||||
|
Scanner lines = new Scanner(in);
|
||||||
|
long lineNum = 0;
|
||||||
|
while (lines.hasNextLine() && state != State.Post) {
|
||||||
|
lineNum++;
|
||||||
|
String line = lines.nextLine();
|
||||||
|
State nextState = state.next(line);
|
||||||
|
|
||||||
|
if (state == State.In && nextState == State.In) {
|
||||||
|
Matcher m = LINE_FORMAT.matcher(line);
|
||||||
|
if (!m.matches()) {
|
||||||
|
throw new StateFileFormatException(path, lineNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] rows = line.split(", *");
|
||||||
|
String date;
|
||||||
|
try {
|
||||||
|
date = convertDateColumn(rows[1]);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
throw new StateFileFormatException(path, lineNum);
|
||||||
|
}
|
||||||
|
if (date.equals(day)) {
|
||||||
|
try {
|
||||||
|
double x = Double.parseDouble(rows[2]); // [km]
|
||||||
|
double y = Double.parseDouble(rows[3]); // [km]
|
||||||
|
double z = Double.parseDouble(rows[4]); // [km]
|
||||||
|
double vx = Double.parseDouble(rows[5]); // [km/s]
|
||||||
|
double vy = Double.parseDouble(rows[6]); // [km/s]
|
||||||
|
double vz = Double.parseDouble(rows[7]); // [km/s]
|
||||||
|
b.setState(new Vector3(x * 1000, y * 1000, z * 1000), new Vector3(vx * 1000, vy * 1000, vz * 1000));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
throw new StateFileFormatException(path, lineNum);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
state = nextState;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
if (e instanceof FileNotFoundException) {
|
||||||
|
throw new StateFileNotFoundException(path);
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String convertDateColumn(String column) {
|
||||||
|
Matcher m = DATE_COLUMN_FORMAT.matcher(column);
|
||||||
|
if (!m.matches()) {
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return m.group("year") + "-" + convertMonth(m.group("month")) + "-" + m.group("day");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String convertDate(String date) {
|
||||||
|
Matcher m = DATE_FORMAT_YYYY_MMM_DD.matcher(date);
|
||||||
|
if (!m.matches()) {
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
}
|
||||||
|
return m.group("year") + "-" + convertMonth(m.group("month")) + "-" + m.group("day");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String convertMonth(String month) {
|
||||||
|
return switch (month) {
|
||||||
|
case "Jan" -> "01";
|
||||||
|
case "Feb" -> "02";
|
||||||
|
case "Mar" -> "03";
|
||||||
|
case "Apr" -> "04";
|
||||||
|
case "May" -> "05";
|
||||||
|
case "Jun" -> "06";
|
||||||
|
case "Jul" -> "07";
|
||||||
|
case "Aug" -> "08";
|
||||||
|
case "Sep" -> "09";
|
||||||
|
case "Oct" -> "10";
|
||||||
|
case "Nov" -> "11";
|
||||||
|
case "Dec" -> "12";
|
||||||
|
default -> throw new IllegalArgumentException();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum State {
|
||||||
|
Pre, In, Post;
|
||||||
|
|
||||||
|
public State next(String line) {
|
||||||
|
switch (this) {
|
||||||
|
case Pre: if (line.equals("$$SOE")) return In; break;
|
||||||
|
case In: if (line.equals("$$EOE")) return Post; break;
|
||||||
|
case Post: break;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,7 +35,6 @@ public class Simulation5 {
|
|||||||
* The main simulation method using instances of other classes.
|
* The main simulation method using instances of other classes.
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
// simulation
|
// simulation
|
||||||
CodeDraw cd = new CodeDraw();
|
CodeDraw cd = new CodeDraw();
|
||||||
|
|
||||||
@@ -52,6 +51,7 @@ public class Simulation5 {
|
|||||||
NamedBody pallas = new NamedBody(SolSystem4.PALLAS_NAMED);
|
NamedBody pallas = new NamedBody(SolSystem4.PALLAS_NAMED);
|
||||||
NamedBody hygiea = new NamedBody(SolSystem4.HYGIEA_NAMED);
|
NamedBody hygiea = new NamedBody(SolSystem4.HYGIEA_NAMED);
|
||||||
NamedBody ceres = new NamedBody(SolSystem4.CERES_NAMED);
|
NamedBody ceres = new NamedBody(SolSystem4.CERES_NAMED);
|
||||||
|
|
||||||
// create some additional bodies
|
// create some additional bodies
|
||||||
Body[] bodies = new Body[NUMBER_OF_BODIES];
|
Body[] bodies = new Body[NUMBER_OF_BODIES];
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
import codedraw.CodeDraw;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simulates the formation of a massive solar system.
|
||||||
|
*/
|
||||||
|
public class Simulation6 {
|
||||||
|
|
||||||
|
// gravitational constant
|
||||||
|
public static final double G = 6.6743e-11;
|
||||||
|
|
||||||
|
// one astronomical unit (AU) is the average distance of earth to the sun.
|
||||||
|
public static final double AU = 150e9; // meters
|
||||||
|
|
||||||
|
// one light year
|
||||||
|
public static final double LY = 9.461e15; // meters
|
||||||
|
|
||||||
|
// some further constants needed in the simulation
|
||||||
|
public static final double SUN_MASS = 1.989e30; // kilograms
|
||||||
|
public static final double SUN_RADIUS = 696340e3; // meters
|
||||||
|
public static final double EARTH_MASS = 5.972e24; // kilograms
|
||||||
|
public static final double EARTH_RADIUS = 6371e3; // meters
|
||||||
|
|
||||||
|
// set some system parameters
|
||||||
|
public static final double SECTION_SIZE = 10 * AU; // the size of the square region in space
|
||||||
|
|
||||||
|
public static final int NUMBER_OF_BODIES = 22;
|
||||||
|
public static final double OVERALL_SYSTEM_MASS = 20 * SUN_MASS; // kilograms
|
||||||
|
|
||||||
|
// all quantities are based on units of kilogram respectively second and meter.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main simulation method using instances of other classes.
|
||||||
|
*/
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// simulation
|
||||||
|
CodeDraw cd = new CodeDraw();
|
||||||
|
|
||||||
|
// create solar system with 12 bodies
|
||||||
|
NamedBody sun = new NamedBody(SolSystem4.SUN_NAMED);
|
||||||
|
NamedBody earth = new NamedBody(SolSystem4.EARTH_NAMED);
|
||||||
|
NamedBody moon = new NamedBody(SolSystem4.MOON_NAMED);
|
||||||
|
NamedBody mars = new NamedBody(SolSystem4.MARS_NAMED);
|
||||||
|
NamedBody deimos = new NamedBody(SolSystem4.DEIMOS_NAMED);
|
||||||
|
NamedBody phobos = new NamedBody(SolSystem4.PHOBOS_NAMED);
|
||||||
|
NamedBody mercury = new NamedBody(SolSystem4.MERCURY_NAMED);
|
||||||
|
NamedBody venus = new NamedBody(SolSystem4.VENUS_NAMED);
|
||||||
|
NamedBody vesta = new NamedBody(SolSystem4.VESTA_NAMED);
|
||||||
|
NamedBody pallas = new NamedBody(SolSystem4.PALLAS_NAMED);
|
||||||
|
NamedBody hygiea = new NamedBody(SolSystem4.HYGIEA_NAMED);
|
||||||
|
NamedBody ceres = new NamedBody(SolSystem4.CERES_NAMED);
|
||||||
|
|
||||||
|
// create some additional bodies
|
||||||
|
Body[] bodies = new Body[NUMBER_OF_BODIES];
|
||||||
|
|
||||||
|
Random random = new Random(2022);
|
||||||
|
|
||||||
|
for (int i = 0; i < bodies.length; i++) {
|
||||||
|
bodies[i] = new Body(
|
||||||
|
Math.abs(random.nextGaussian()) * OVERALL_SYSTEM_MASS / bodies.length,
|
||||||
|
new Vector3(0.2 * random.nextGaussian() * AU, 0.2 * random.nextGaussian() * AU, 0.2 * random.nextGaussian() * AU),
|
||||||
|
new Vector3(0 + random.nextGaussian() * 5e3, 0 + random.nextGaussian() * 5e3, 0 + random.nextGaussian() * 5e3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MassiveForceTreeMap forceOnBody = new MassiveForceTreeMap();
|
||||||
|
forceOnBody.put(sun, new Vector3());
|
||||||
|
forceOnBody.put(earth, new Vector3());
|
||||||
|
forceOnBody.put(moon, new Vector3());
|
||||||
|
forceOnBody.put(mars, new Vector3());
|
||||||
|
forceOnBody.put(deimos, new Vector3());
|
||||||
|
forceOnBody.put(phobos, new Vector3());
|
||||||
|
forceOnBody.put(mercury, new Vector3());
|
||||||
|
forceOnBody.put(venus, new Vector3());
|
||||||
|
forceOnBody.put(vesta, new Vector3());
|
||||||
|
forceOnBody.put(pallas, new Vector3());
|
||||||
|
forceOnBody.put(hygiea, new Vector3());
|
||||||
|
forceOnBody.put(ceres, new Vector3());
|
||||||
|
|
||||||
|
for (Body b : bodies) {
|
||||||
|
forceOnBody.put(b, new Vector3());
|
||||||
|
}
|
||||||
|
|
||||||
|
long seconds = 0;
|
||||||
|
while (true) {
|
||||||
|
seconds++;
|
||||||
|
|
||||||
|
for (Massive b1 : forceOnBody.getKeys()) {
|
||||||
|
Vector3 force = new Vector3();
|
||||||
|
for (Massive b2 : forceOnBody.getKeys()) {
|
||||||
|
if (b1 != b2) {
|
||||||
|
force = force.plus(b1.gravitationalForce(b2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forceOnBody.put(b1, force);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Massive body : forceOnBody.getKeys()) {
|
||||||
|
body.move(forceOnBody.get(body));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((seconds % 3600) == 0) {
|
||||||
|
cd.clear(Color.BLACK);
|
||||||
|
for (Massive body : forceOnBody.getKeys()) {
|
||||||
|
body.draw(cd);
|
||||||
|
}
|
||||||
|
cd.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
import codedraw.CodeDraw;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simulates the solar system.
|
||||||
|
*/
|
||||||
|
public class Simulation8 {
|
||||||
|
|
||||||
|
// gravitational constant
|
||||||
|
public static final double G = 6.6743e-11;
|
||||||
|
|
||||||
|
// one astronomical unit (AU) is the average distance of earth to the sun.
|
||||||
|
public static final double AU = 150e9; // meters
|
||||||
|
|
||||||
|
// set some system parameters
|
||||||
|
public static final double SECTION_SIZE = 10 * AU; // the size of the square region in space
|
||||||
|
|
||||||
|
// all quantities are based on units of kilogram respectively second and meter.
|
||||||
|
|
||||||
|
// The main simulation method using instances of other classes.
|
||||||
|
public static void main(String[] args) {
|
||||||
|
if (args.length != 2) {
|
||||||
|
System.err.println("Error: wrong number of arguments.");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
String statePath = args[0];
|
||||||
|
String date;
|
||||||
|
try {
|
||||||
|
date = ReadDataUtil.convertDate(args[1]);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
System.err.println("Error: State has wrong format (requires YYYY-MMM-DD), aborting.");
|
||||||
|
System.exit(2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// simulation
|
||||||
|
CodeDraw cd = new CodeDraw();
|
||||||
|
|
||||||
|
// create solar system with 13 bodies
|
||||||
|
MassiveForceTreeMap forceOnBody = new MassiveForceTreeMap();
|
||||||
|
|
||||||
|
forceOnBody.put(new NamedBody("Oumuamua", 8e6), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Earth", 5.972E24), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Moon", 7.349E22), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Mars", 6.41712E23), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Deimos", 1.8E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Phobos", 1.08E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Mercury", 3.301E23), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Venus", 4.86747E24), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Vesta", 2.5908E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Pallas", 2.14E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Hygiea", 8.32E19), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Ceres", 9.394E20), new Vector3());
|
||||||
|
|
||||||
|
MassiveIterator iter = forceOnBody.getKeys().iterator();
|
||||||
|
while (iter.hasNext()) {
|
||||||
|
Massive a = iter.next();
|
||||||
|
if (a instanceof NamedBody b) {
|
||||||
|
boolean remove = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
boolean found = ReadDataUtil.readConfiguration(b, statePath + "/" + b.getName() + ".txt", date);
|
||||||
|
if (!found) {
|
||||||
|
System.err.println("Warning: State not available for " + b.getName() + ".");
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
if (e instanceof StateFileNotFoundException notFound) {
|
||||||
|
System.err.println("Warning: " + notFound.getMessage());
|
||||||
|
} else if (e instanceof StateFileFormatException format) {
|
||||||
|
System.err.println("Warning: " + format.getMessage());
|
||||||
|
} else {
|
||||||
|
System.err.println("Error: " + e.getMessage());
|
||||||
|
System.exit(3);
|
||||||
|
}
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remove) {
|
||||||
|
System.err.println("Running simulation without " + b.getName());
|
||||||
|
iter.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add sun after states have been read from files.
|
||||||
|
forceOnBody.put(new NamedBody("Sun", 1.989E30), new Vector3());
|
||||||
|
|
||||||
|
System.out.println("Starting simulation");
|
||||||
|
long seconds = 0;
|
||||||
|
while (true) {
|
||||||
|
seconds++;
|
||||||
|
|
||||||
|
for (Massive b1 : forceOnBody.getKeys()) {
|
||||||
|
Vector3 force = new Vector3();
|
||||||
|
for (Massive b2 : forceOnBody.getKeys()) {
|
||||||
|
if (b1 != b2) {
|
||||||
|
force = force.plus(b1.gravitationalForce(b2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forceOnBody.put(b1, force);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Massive body : forceOnBody.getKeys()) {
|
||||||
|
body.move(forceOnBody.get(body));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((seconds % 3600) == 0) {
|
||||||
|
cd.clear(Color.BLACK);
|
||||||
|
for (Massive body : forceOnBody.getKeys()) {
|
||||||
|
body.draw(cd);
|
||||||
|
}
|
||||||
|
cd.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
import codedraw.CodeDraw;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simulates the solar system.
|
||||||
|
*/
|
||||||
|
public class Simulation9 {
|
||||||
|
|
||||||
|
// gravitational constant
|
||||||
|
public static final double G = 6.6743e-11;
|
||||||
|
|
||||||
|
// one astronomical unit (AU) is the average distance of earth to the sun.
|
||||||
|
public static final double AU = 150e9; // meters
|
||||||
|
|
||||||
|
// set some system parameters
|
||||||
|
public static final double SECTION_SIZE = 10 * AU; // the size of the square region in space
|
||||||
|
|
||||||
|
// all quantities are based on units of kilogram respectively second and meter.
|
||||||
|
|
||||||
|
// The main simulation method using instances of other classes.
|
||||||
|
public static void main(String[] args) {
|
||||||
|
if (args.length != 2) {
|
||||||
|
System.err.println("Error: wrong number of arguments.");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
String statePath = args[0];
|
||||||
|
String date;
|
||||||
|
try {
|
||||||
|
date = ReadDataUtil.convertDate(args[1]);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
System.err.println("Error: State has wrong format (requires YYYY-MMM-DD), aborting.");
|
||||||
|
System.exit(2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// simulation
|
||||||
|
CodeDraw cd = new CodeDraw();
|
||||||
|
|
||||||
|
// create solar system with 13 bodies
|
||||||
|
HashMap<Massive, Vector3> forceOnBody = new HashMap<>();
|
||||||
|
|
||||||
|
forceOnBody.put(new NamedBody("Oumuamua", 8e6), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Earth", 5.972E24), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Moon", 7.349E22), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Mars", 6.41712E23), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Deimos", 1.8E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Phobos", 1.08E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Mercury", 3.301E23), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Venus", 4.86747E24), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Vesta", 2.5908E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Pallas", 2.14E20), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Hygiea", 8.32E19), new Vector3());
|
||||||
|
forceOnBody.put(new NamedBody("Ceres", 9.394E20), new Vector3());
|
||||||
|
|
||||||
|
Iterator<Massive> iter = forceOnBody.keySet().iterator();
|
||||||
|
while (iter.hasNext()) {
|
||||||
|
Massive a = iter.next();
|
||||||
|
if (a instanceof NamedBody b) {
|
||||||
|
boolean remove = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
boolean found = ReadDataUtil.readConfiguration(b, statePath + "/" + b.getName() + ".txt", date);
|
||||||
|
if (!found) {
|
||||||
|
System.err.println("Warning: State not available for " + b.getName() + ".");
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
if (e instanceof StateFileNotFoundException notFound) {
|
||||||
|
System.err.println("Warning: " + notFound.getMessage());
|
||||||
|
} else if (e instanceof StateFileFormatException format) {
|
||||||
|
System.err.println("Warning: " + format.getMessage());
|
||||||
|
} else {
|
||||||
|
System.err.println("Error: " + e.getMessage());
|
||||||
|
System.exit(3);
|
||||||
|
}
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remove) {
|
||||||
|
System.err.println("Running simulation without " + b.getName());
|
||||||
|
iter.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add sun after states have been read from files.
|
||||||
|
forceOnBody.put(new NamedBody("Sun", 1.989E30), new Vector3());
|
||||||
|
|
||||||
|
System.out.println("Starting simulation");
|
||||||
|
long seconds = 0;
|
||||||
|
while (true) {
|
||||||
|
seconds++;
|
||||||
|
|
||||||
|
for (Massive b1 : forceOnBody.keySet()) {
|
||||||
|
Vector3 force = new Vector3();
|
||||||
|
for (Massive b2 : forceOnBody.keySet()) {
|
||||||
|
if (b1 != b2) {
|
||||||
|
force = force.plus(b1.gravitationalForce(b2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
forceOnBody.put(b1, force);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Massive body : forceOnBody.keySet()) {
|
||||||
|
body.move(forceOnBody.get(body));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((seconds % 3600) == 0) {
|
||||||
|
cd.clear(Color.BLACK);
|
||||||
|
for (Massive body : forceOnBody.keySet()) {
|
||||||
|
body.draw(cd);
|
||||||
|
}
|
||||||
|
cd.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class StateFileFormatException extends IOException {
|
||||||
|
private final String fileName;
|
||||||
|
private final long lineNum;
|
||||||
|
|
||||||
|
public StateFileFormatException(String fileName, long lineNum) {
|
||||||
|
super("File " + fileName + " has illegal format (line " + lineNum + ")");
|
||||||
|
this.fileName = fileName;
|
||||||
|
this.lineNum = lineNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return this.fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getLineNum() {
|
||||||
|
return this.lineNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class StateFileNotFoundException extends IOException {
|
||||||
|
private final String fileName;
|
||||||
|
|
||||||
|
public StateFileNotFoundException(String fileName) {
|
||||||
|
super("File " + fileName + " not found.");
|
||||||
|
this.fileName = fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return this.fileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
JPL/HORIZONS 1 Ceres (A801 AA) 2021-May-29 11:14:24
Rec #: 1 (+COV) Soln.date: 2021-Apr-13_11:04:44 # obs: 1075 (1995-2021)
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
EPOCH= 2458849.5 ! 2020-Jan-01.00 (TDB) Residual RMS= .24563
EC= .07687465013145245 QR= 2.556401146697176 TP= 2458240.1791309435
OM= 80.3011901917491 W= 73.80896808746482 IN= 10.59127767086216
A= 2.769289292143484 MA= 130.3159688200986 ADIST= 2.982177437589792
PER= 4.60851 N= .213870839 ANGMOM= .028541613
DAN= 2.69515 DDN= 2.81323 L= 153.8445988
B= 10.1666388 MOID= 1.59231997 TP= 2018-May-01.6791309435
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 62.6284 RAD= 469.7 ROTPER= 9.07417
H= 3.53 G= .120 B-V= .713
ALBEDO= .090 STYP= C
ASTEROID comments:
1: soln ref.= JPL#48, OCC=0 radar(60 delay, 0 Dop.)
2: source=ORB
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 11:14:24 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: 1 Ceres (A801 AA) {source: JPL#48}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Small perturbers: Yes {source: SB441-N16}
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
Initial IAU76/J2000 heliocentric ecliptic osculating elements (au, days, deg.):
EPOCH= 2458849.5 ! 2020-Jan-01.00 (TDB) Residual RMS= .24563
EC= .07687465013145245 QR= 2.556401146697176 TP= 2458240.1791309435
OM= 80.3011901917491 W= 73.80896808746482 IN= 10.59127767086216
Equivalent ICRF heliocentric cartesian coordinates (au, au/d):
X= 1.007608869613381E+00 Y=-2.390064275223502E+00 Z=-1.332124522752402E+00
VX= 9.201724467227128E-03 VY= 3.370381135398406E-03 VZ=-2.850337057661093E-04
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 62.6284 RAD= 469.7 ROTPER= 9.07417
H= 3.53 G= .120 B-V= .713
ALBEDO= .090 STYP= C
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -3.250173761375654E+08, -2.203419016964185E+08, 5.291759744142130E+07, 9.165639992762751E+00, -1.610304458359491E+01, -2.199191038589312E+00,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -3.242228904176531E+08, -2.217314468071813E+08, 5.272716798630814E+07, 9.225201159592405E+00, -1.606231425347662E+01, -2.208891128305465E+00,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -3.234232669168970E+08, -2.231174631789901E+08, 5.253590227803711E+07, 9.284569975630303E+00, -1.602136099186057E+01, -2.218548732405131E+00,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -3.226185222878132E+08, -2.244999315973394E+08, 5.234380399205689E+07, 9.343745668666449E+00, -1.598018588186176E+01, -2.228163742508103E+00,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -3.218086732493464E+08, -2.258788329413921E+08, 5.215087681312392E+07, 9.402727473215403E+00, -1.593879000860668E+01, -2.237736051536023E+00,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -3.209937365862889E+08, -2.272541481841512E+08, 5.195712443519008E+07, 9.461514630511177E+00, -1.589717445918542E+01, -Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: Sep 28, 2012 Deimos / (Mars) 402
SATELLITE PHYSICAL PROPERTIES:
Radius (km) = 7.8 x 6.0 x 5.1 Density (g cm^-3) = 1.76 +- 0.30
Mass (10^20 kg ) = 1.80 (10^-5) Geometric Albedo = 0.06
(+- 0.15) V(1,0) = +12.89
SATELLITE ORBITAL DATA:
Semi-major axis, a (km) = 23.4632(10^3) Orbital period = 1.263 d
Eccentricity, e = 0.00033 Rotational period = Synchronous
Inclination, i (deg) = 1.791
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:45:06 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Deimos (402) {source: mar097}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 1.629770068419321E+08, 1.448938565178654E+08, -9.976786424947232E+05, -1.390775070821403E+01, 2.006702271722930E+01, 2.206267009848659E-01,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, 1.616454083339736E+08, 1.466561241183909E+08, -9.189826430664584E+05, -1.518254290575987E+01, 1.874885297378025E+01, 6.211439556607115E-01,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, 1.603295987661050E+08, 1.484089715526735E+08, -8.542450205237195E+05, -1.662730791933799E+01, 1.940010929352612E+01, 1.280299042692367E+00,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, 1.590094571248652E+08, 1.501158464981909E+08, -7.974257696473002E+05, -1.637194171931468E+01, 2.081930278826077E+01, 1.225740388531875E+00,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, 1.576485442130992E+08, 1.517872503711629E+08, -7.306718326271325E+05, -1.505526712863220E+01, 2.066705403270559E+01, 5.393610853589710E-01,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, 1.562481509963061E+08, 1.534650346788671E+08, -6.506882054592073E+05, -1.488131085212162E+01, 1.892415224960050E+01, 2.364929723547409E-01,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, 1.548456532213624E+08, 1.551603609939339E+08, -5.736244909284711E+05, -1.636149865752989E+01, 1.791745726465136E+01, 7.648830913660243E-01,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, 1.534595493466119E+08, 1.568371088582374E+08, -5.112212451166362E+05, -1.756417196682084E+01, 1.888482010057535E+01, 1.345794862689913E+00,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, 1.520623962542237E+08, 1.584649504312741E+08, -4.534915764811859E+05, -1.696179849424676E+01, 2.014711729542566E+01, 1.121564085760665E+00,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, 1.506215858316507E+08, 1.600640521714851E+08, -3.834709960333332E+05, -1.569221856072902E+01, 1.958616404749911E+01, 4.245318881830809E-01,
2458494.500000000, A.D. 2019-Jan-11 00:00:00.0000, 1.491477540622245E+08, 1.616750507489093E+08, -3.022875910980776E+05, -1.587454907026639E+01, 1.777621024315604E+01, 2.848018926377289E-01,
2458495.500000000, A.D. 2019-Jan-12 00:00:00.0000, 1.476793352244079E+08, 1.632988907726929E+08, -2.275076390290037E+05, -1.748033234696750E+01, 1.713263148594174E+01, 9.089681033409676E-01,
2458496.500000000, A.D. 2019-Jan-13 00:00:00.0000, 1.462260353296198E+08, 1.648952801077152E+08, -1.671918434069678E+05, -1.837744691188085E+01, 1.834715983828853E+01, 1.376113760911172E+00,
2458497.500000000, A.D. 2019-Jan-14 00:00:00.0000, 1.447547757778870E+08, 1.664419752374789E+08, -1.080164558948129E+05, -1.747478325889392E+01, 1.936553174620019E+01, 9.959151162581Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: April 12, 2021 Earth 399
GEOPHYSICAL PROPERTIES (revised Aug 15, 2018):
Vol. Mean Radius (km) = 6371.01+-0.02 Mass x10^24 (kg)= 5.97219+-0.0006
Equ. radius, km = 6378.137 Mass layers:
Polar axis, km = 6356.752 Atmos = 5.1 x 10^18 kg
Flattening = 1/298.257223563 oceans = 1.4 x 10^21 kg
Density, g/cm^3 = 5.51 crust = 2.6 x 10^22 kg
J2 (IERS 2010) = 0.00108262545 mantle = 4.043 x 10^24 kg
g_p, m/s^2 (polar) = 9.8321863685 outer core = 1.835 x 10^24 kg
g_e, m/s^2 (equatorial) = 9.7803267715 inner core = 9.675 x 10^22 kg
g_o, m/s^2 = 9.82022 Fluid core rad = 3480 km
GM, km^3/s^2 = 398600.435436 Inner core rad = 1215 km
GM 1-sigma, km^3/s^2 = 0.0014 Escape velocity = 11.186 km/s
Rot. Rate (rad/s) = 0.00007292115 Surface area:
Mean sidereal day, hr = 23.9344695944 land = 1.48 x 10^8 km
Mean solar day 2000.0, s = 86400.002 sea = 3.62 x 10^8 km
Mean solar day 1820.0, s = 86400.0 Love no., k2 = 0.299
Moment of inertia = 0.3308 Atm. pressure = 1.0 bar
Mean temperature, K = 270 Volume, km^3 = 1.08321 x 10^12
Mean effect. IR temp, K = 255 Magnetic moment = 0.61 gauss Rp^3
Geometric albedo = 0.367 Vis. mag. V(1,0)= -3.86
Solar Constant (W/m^2) = 1367.6 (mean), 1414 (perihelion), 1322 (aphelion)
HELIOCENTRIC ORBIT CHARACTERISTICS:
Obliquity to orbit, deg = 23.4392911 Sidereal orb period = 1.0000174 y
Orbital speed, km/s = 29.79 Sidereal orb period = 365.25636 d
Mean daily motion, deg/d = 0.9856474 Hill's sphere radius = 234.9
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:40:56 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Earth (399) {source: DE441}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -2.565786669256473E+07, 1.459776345868732E+08, -1.548952074754238E+04, -2.984330713107311E+01, -5.272844521387671E+00, 9.256858421500258E-04,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -2.823230306715931E+07, 1.454994529806256E+08, -1.539797420976311E+04, -2.974849808661338E+01, -5.795951202541079E+00, 1.189057422698703E-03,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -3.079812529513879E+07, 1.449761369768790E+08, -1.528494889068604E+04, -2.964390303251469E+01, -6.317573192078425E+00, 1.421347092815495E-03,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -3.335448763868447E+07, 1.444078275668288E+08, -1.515349592279643E+04, -2.952952169701604E+01, -6.837416330766245E+00, 1.614456923548779E-03,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -3.590054559349991E+07, 1.437946910589049E+08, -1.500727118092030E+04, -2.940538252957142E+01, -7.355189425480081E+00, 1.762484838532252E-03,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -3.843545826881640E+07, 1.431369186478721E+08, -1.485034648505598E+04, -2.927154029096869E+01, -7.870608226542243E+00, 1.861695334308244E-03,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, -4.095839053895415E+07, 1.424347256597345E+08, -1.468702586828172E+04, -2.912807313230036E+01, -8.383398913379908E+00, 1.910426228024509E-03,
2458491.500000000,Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
JPL/HORIZONS 10 Hygiea (A849 GA) 2021-May-29 11:16:49
Rec #: 10 (+COV) Soln.date: 2021-May-03_17:43:21 # obs: 3663 (1849-2021)
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
EPOCH= 2451659.5 ! 2000-Apr-25.00 (TDB) Residual RMS= .21441
EC= .1194380603574853 QR= 2.76353045482564 TP= 2451662.1100178338
OM= 283.6579501838269 W= 314.3412537644239 IN= 3.842864474453038
A= 3.138371453968998 MA= 359.5373090218986 ADIST= 3.513212453112356
PER= 5.55987 N= .177275021 ANGMOM= .030256146
DAN= 2.85525 DDN= 3.37537 L= 238.0636827
B= -2.7473692 MOID= 1.75311995 TP= 2000-Apr-27.6100178338
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 7. RAD= 203.56 ROTPER= 13.828
H= 5.55 G= .150 B-V= .696
ALBEDO= .0717 STYP= C
ASTEROID comments:
1: soln ref.= JPL#102, OCC=0
2: source=ORB
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 11:16:49 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: 10 Hygiea (A849 GA) {source: JPL#102}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Small perturbers: Yes {source: SB441-N16}
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
Initial IAU76/J2000 heliocentric ecliptic osculating elements (au, days, deg.):
EPOCH= 2451659.5 ! 2000-Apr-25.00 (TDB) Residual RMS= .21441
EC= .1194380603574853 QR= 2.76353045482564 TP= 2451662.1100178338
OM= 283.6579501838269 W= 314.3412537644239 IN= 3.842864474453038
Equivalent ICRF heliocentric cartesian coordinates (au, au/d):
X=-1.484281795031938E+00 Y=-2.082009786619123E+00 Z=-1.048489626801920E+00
VX= 9.214067619681732E-03 VY=-5.607303490974008E-03 VZ=-1.877398380211751E-03
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 7. RAD= 203.56 ROTPER= 13.828
H= 5.55 G= .150 B-V= .696
ALBEDO= .0717 STYP= C
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 4.873124883219800E+08, 1.403841894154261E+08, 3.390302039027818E+07, -3.091538853677393E+00, 1.518656207823583E+01, 3.198275266803741E-02,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, 4.870435388221376E+08, 1.416957805017916E+08, 3.390565563008341E+07, -3.134135730347184E+00, 1.517432485329112E+01, 2.901843559971784E-02,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, 4.867709111017210E+08, 1.430063096693100E+08, 3.390803482228220E+07, -3.176682817287593E+00, 1.516198065733805E+01, 2.605572729273575E-02,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, 4.864946094706300E+08, 1.443157676844693E+08, 3.391015810653216E+07, -3.219179927873935E+00, 1.514952969366037E+01, 2.309464303133790E-02,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, 4.862146382548585E+08, 1.456241453313133E+08, 3.391202562380935E+07, -3.261626876187203E+00, 1.513697216535112E+01, 2.013519805090080E-02,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, 4.859310017964332E+08, 1.469314334114242E+08, 3.391363751640403E+07, -3.304023477009827E+00, 1.512430827531151E+01, 1.717740753818653E-02,
2458490.50Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: June 21, 2016 Mars 499 / 4
PHYSICAL DATA (updated 2019-Oct-29):
Vol. mean radius (km) = 3389.92+-0.04 Density (g/cm^3) = 3.933(5+-4)
Mass x10^23 (kg) = 6.4171 Flattening, f = 1/169.779
Volume (x10^10 km^3) = 16.318 Equatorial radius (km)= 3396.19
Sidereal rot. period = 24.622962 hr Sid. rot. rate, rad/s = 0.0000708822
Mean solar day (sol) = 88775.24415 s Polar gravity m/s^2 = 3.758
Core radius (km) = ~1700 Equ. gravity m/s^2 = 3.71
Geometric Albedo = 0.150
GM (km^3/s^2) = 42828.375214 Mass ratio (Sun/Mars) = 3098703.59
GM 1-sigma (km^3/s^2) = +- 0.00028 Mass of atmosphere, kg= ~ 2.5 x 10^16
Mean temperature (K) = 210 Atmos. pressure (bar) = 0.0056
Obliquity to orbit = 25.19 deg Max. angular diam. = 17.9"
Mean sidereal orb per = 1.88081578 y Visual mag. V(1,0) = -1.52
Mean sidereal orb per = 686.98 d Orbital speed, km/s = 24.13
Hill's sphere rad. Rp = 319.8 Escape speed, km/s = 5.027
Perihelion Aphelion Mean
Solar Constant (W/m^2) 717 493 589
Maximum Planetary IR (W/m^2) 470 315 390
Minimum Planetary IR (W/m^2) 30 30 30
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:42:12 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Mars (499) {source: mar097}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 1.629806212726895E+08, 1.449170333840721E+08, -9.972368219362050E+05, -1.511758798465740E+01, 2.024466077262084E+01, 7.950950455491554E-01,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, 1.616666306318552E+08, 1.466592204222224E+08, -9.284941105299219E+05, -1.529854435317747E+01, 2.008348535512331E+01, 7.961582545504307E-01,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, 1.603370878697700E+08, 1.483874155285474E+08, -8.596629525371343E+05, -1.547758897796352E+01, 1.992077769195369E+01, 7.971424419158213E-01,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, 1.589921586133672E+08, 1.501014874191028E+08, -7.907501629922390E+05, -1.565471145149662E+01, 1.975656332519256E+01, 7.980478977679955E-01,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, 1.576320093740007E+08, 1.518013070158002E+08, -7.217625324030295E+05, -1.582990173978651E+01, 1.959086777497644E+01, 7.988749163606697E-01,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, 1.562568075144522E+08, 1.534867474451801E+08, -6.527068259266689E+05, -1.600315017388914E+01, 1.942371653144429E+01, 7.996237927294008E-01,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, 1.548667212163704E+08, 1.551576840368080E+08, -5.835897826206610E+05, -1.617444745028182E+01, 1.925513506002808E+01, 8.002948247990496E-01,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, 1.534619194481221E+08, 1.568139943211130E+08, -5.144181147708669E+05, -1.634378463559922E+01, 1.908514881632767E+01, 8.008883189872105E-01,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, 1.520425719328370E+08, 1.584555580266072E+08, -4.451985071971491E+05, -1.651115317232192E+01, 1.891378324494117E+01, 8.014045955915563E-01,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, 1.506088491165577E+08, 1.600822570Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: April 12, 2021 Mercury 199 / 1
PHYSICAL DATA (updated 2021-Apr-12):
Vol. Mean Radius (km) = 2440+-1 Density (g cm^-3) = 5.427
Mass x10^23 (kg) = 3.302 Volume (x10^10 km^3) = 6.085
Sidereal rot. period = 58.6463 d Sid. rot. rate (rad/s)= 0.00000124001
Mean solar day = 175.9421 d Core radius (km) = ~1600
Geometric Albedo = 0.106 Surface emissivity = 0.77+-0.06
GM (km^3/s^2) = 22031.86855 Equatorial radius, Re = 2440 km
GM 1-sigma (km^3/s^2) = Mass ratio (Sun/plnt) = 6023682
Mom. of Inertia = 0.33 Equ. gravity m/s^2 = 3.701
Atmos. pressure (bar) = < 5x10^-15 Max. angular diam. = 11.0"
Mean Temperature (K) = 440 Visual mag. V(1,0) = -0.42
Obliquity to orbit[1] = 2.11' +/- 0.1' Hill's sphere rad. Rp = 94.4
Sidereal orb. per. = 0.2408467 y Mean Orbit vel. km/s = 47.362
Sidereal orb. per. = 87.969257 d Escape vel. km/s = 4.435
Perihelion Aphelion Mean
Solar Constant (W/m^2) 14462 6278 9126
Maximum Planetary IR (W/m^2) 12700 5500 8000
Minimum Planetary IR (W/m^2) 6 6 6
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:44:15 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Mercury Barycenter (199) {source: DE441}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -4.726172010176350E+07, -4.671443491995941E+07, 4.087355549094304E+05, 2.476489737911525E+01, -3.197373466563876E+01, -4.885743869363329E+00,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -4.504662628045791E+07, -4.939781389662974E+07, -1.384256303950027E+04, 2.649090922567385E+01, -3.013080867029864E+01, -4.893491681532311E+00,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -4.268744093530888E+07, -5.191926900769829E+07, -4.364078858033977E+05, 2.810060075715364E+01, -2.822641779858932E+01, -4.885545989948044E+00,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -4.019415029511578E+07, -5.427372055955493E+07, -8.576292172248587E+05, 2.959543332284336E+01, -2.626581826341684E+01, -4.862470361474793E+00,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -3.757661912555066E+07, -5.645652107258561E+07, -1.276221821827557E+06, 3.097675164780530E+01, -2.425376903877616E+01, -4.824777032999984E+00,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -3.484460215971279E+07, -5.846341490909117E+07, -1.690943077258494E+06, 3.224575348305964E+01, -2.219459107995216E+01, -4.772928966296266E+00,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, -3.200775791049036E+07, -6.029050283693682E+07, -2.100588311544280E+06, 3.340346461749693E+01, -2.009222242113644E+01, -4.707342057886178E+00,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, -2.907566445107453E+07, -6.193421119043718E+07, -2.503986835449349E+06, 3.445071813865603E+01, -1.795026956967477E+01, -4.628387436073188E+00,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, -2.605783683745320E+07, -6.339126532835345E+07, -2.899998175334480E+06, 3.538813702492201E+01, -1.577205566239713E+01, -4.536393799008507E+00,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, -2.296374591860145E+07, -6.465866713043597E+07, -3.287508508714639E+06, 3.621611931804928E+01, -1.356066587824763E+01, -4.4316497652739Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: July 31, 2013 Moon / (Earth) 301
GEOPHYSICAL DATA (updated 2018-Aug-15):
Vol. mean radius, km = 1737.53+-0.03 Mass, x10^22 kg = 7.349
Radius (gravity), km = 1738.0 Surface emissivity = 0.92
Radius (IAU), km = 1737.4 GM, km^3/s^2 = 4902.800066
Density, g/cm^3 = 3.3437 GM 1-sigma, km^3/s^2 = +-0.0001
V(1,0) = +0.21 Surface accel., m/s^2 = 1.62
Earth/Moon mass ratio = 81.3005690769 Farside crust. thick. = ~80 - 90 km
Mean crustal density = 2.97+-.07 g/cm^3 Nearside crust. thick.= 58+-8 km
Heat flow, Apollo 15 = 3.1+-.6 mW/m^2 Mean angular diameter = 31'05.2"
Heat flow, Apollo 17 = 2.2+-.5 mW/m^2 Sid. rot. rate, rad/s = 0.0000026617
Geometric Albedo = 0.12 Mean solar day = 29.5306 d
Obliquity to orbit = 6.67 deg Orbit period = 27.321582 d
Semi-major axis, a = 384400 km Eccentricity = 0.05490
Mean motion, rad/s = 2.6616995x10^-6 Inclination = 5.145 deg
Apsidal period = 3231.50 d Nodal period = 6798.38 d
Perihelion Aphelion Mean
Solar Constant (W/m^2) 1414+-7 1323+-7 1368+-7
Maximum Planetary IR (W/m^2) 1314 1226 1268
Minimum Planetary IR (W/m^2) 5.2 5.2 5.2
********************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:37:33 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Moon (301) {source: DE441}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -2.594394676171621E+07, 1.457191537925642E+08, 1.879243548780680E+04, -2.920041610016305E+01, -6.056705035428428E+00, -1.966945528910324E-02,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -2.845592611394830E+07, 1.451803785812578E+08, 1.623692531195283E+04, -2.895255066097593E+01, -6.409660276312301E+00, -3.913050853114974E-02,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -3.094792578110056E+07, 1.446123349695342E+08, 1.210336327194422E+04, -2.873857798558501E+01, -6.735868388841888E+00, -5.607390920661848E-02,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -3.342301224542837E+07, 1.440169043922708E+08, 6.638979418374598E+03, -2.856133703400771E+01, -7.045269234648544E+00, -6.984182488488688E-02,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -3.588440683780140E+07, 1.433951150574999E+08, 1.401237256228924E+02, -2.842160365794606E+01, -7.347618075593773E+00, -7.995494653159207E-02,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -3.833531567854504E+07, 1.427471718373300E+08, -7.063083834618330E+03, -2.831828513313826E+01, -7.652168141780209E+00, -8.611012284631547E-02,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, -4.077877806521063E+07, 1.420725120030732E+08, -1.462169253620505E+04, -2.824865612457545E+01, -7.967393190450194E+00, -8.817278973292941E-02,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, -4.321753736156642E+07, 1.413698821931921E+08, -2.218191225136817E+04, -2.820864186216586E+01, -8.300779167236234E+00, -8.616250353755506E-02,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, -4.565393756762660E+07, 1.406374292618203E+08, -2.939757816486806E+04, -2.819312280044993E+01, -8.658715043800495E+00, -8.023246092884984E-02,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, -4.8089845Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
JPL/HORIZONS 1I/'Oumuamua (A/2017 U1) 2021-Jun-01 05:20:33
Rec #:50452719 (+COV) Soln.date: 2018-Jun-26_12:17:57 # obs: 207 (2017-2018)
NOTE:
This orbit solution includes non-gravitational perturbations as described in
Micheli et al. (2018): http://dx.doi.org/10.1038/s41586-018-0254-4
The behavior of these accelerations outside the observed data arc from
2017 October 14 to 2018 January 2 can only be assumed. Predictions outside
this time interval, especially prior to October 2017, could be much more
uncertain than reported here.
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
EPOCH= 2458080.5 ! 2017-Nov-23.00 (TDB) Residual RMS= .063527
EC= 1.201133796102373 QR= .2559115812959116 TP= 2458006.0073213754
OM= 24.59690955523242 W= 241.8105360304898 IN= 122.7417062847286
A= -1.27234500742808 MA= 51.15761979369358 ADIST= 9.999999E99
PER= 9.999999E99 N= .68674693 ANGMOM= .012910695
DAN= 1.30212 DDN= .35938 L= 159.3364847
B= -47.8467702 MOID= .0958212 TP= 2017-Sep-09.5073213754
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= n.a. RAD= n.a. ROTPER= 7.937
H= 22.08 G= .150 B-V= n.a.
ALBEDO= n.a. STYP= n.a.
Asteroid non-gravitational force model (AMRAT= m^2/kg;A1,A2,A3=au/d^2;R0=au):
AMRAT= 0.
A1= 2.790193367004E-7 A2= 1.441264152527E-8 A3= 1.573922634125E-8
Non-standard or simulated/proxy model:
ALN= .04083733261 NK= 2.6 NM= 2. NN= 3. R0= 5.
ASTEROID comments:
1: soln ref.= JPL#16
2: source=ORB; Sol. 7c, Micheli et al. 2018
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Tue Jun 1 05:20:34 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: 1I/'Oumuamua (A/2017 U1) {source: JPL#16}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Small perturbers: Yes {source: SB441-N16}
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
Initial IAU76/J2000 heliocentric ecliptic osculating elements (au, days, deg.):
EPOCH= 2458080.5 ! 2017-Nov-23.00 (TDB) Residual RMS= .063527
EC= 1.201133796102373 QR= .2559115812959116 TP= 2458006.0073213754
OM= 24.59690955523242 W= 241.8105360304898 IN= 122.7417062847286
Equivalent ICRF heliocentric cartesian coordinates (au, au/d):
X= 1.889136186533479E+00 Y= 5.222899434623107E-01 Z= 5.088057830311858E-01
VX= 2.106502285864550E-02 VY= 3.535022471254454E-04 VZ= 8.998631872968255E-03
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= n.a. RAD= n.a. ROTPER= 7.937
H= 22.08 G= .150 B-V= n.a.
ALBEDO= n.a. STYP= n.a.
Asteroid non-gravitational force model (AMRAT= m^2/kg;A1,A2,A3=au/d^2;R0=au):
AMRAT= 0.
A1= 2.790193367004E-7 A2= 1.441264152527E-8 A3= 1.573922634125E-8
Non-standard or simulated/proxy model:
ALN= .04083733261 NK= 2.6 NM= 2. NN= 3. R0= 5.
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 1.312288663591239E+09, 2.6Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
JPL/HORIZONS 2 Pallas (A802 FA) 2021-May-29 11:15:53
Rec #: 2 (+COV) Soln.date: 2021-May-03_17:43:21 # obs: 8933 (1804-2020)
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
EPOCH= 2449820.5 ! 1995-Apr-13.00 (TDB) Residual RMS= .37013
EC= .2338923901398553 QR= 2.123199358589515 TP= 2449888.2401978029
OM= 173.3007005773634 W= 309.6979504659889 IN= 34.80656077842534
A= 2.771411393468747 MA= 345.5289835475172 ADIST= 3.41962342834798
PER= 4.61381 N= .213625241 ANGMOM= .027842964
DAN= 2.27928 DDN= 3.07993 L= 128.6154841
B= -26.0523449 MOID= 1.22409999 TP= 1995-Jun-19.7401978029
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 14.3 RAD= 272.5 ROTPER= 7.8132
H= 4.21 G= .110 B-V= .635
ALBEDO= .101 STYP= B
ASTEROID comments:
1: soln ref.= JPL#42, OCC=0
2: source=ORB
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 11:15:53 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: 2 Pallas (A802 FA) {source: JPL#42}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Small perturbers: Yes {source: SB441-N16}
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
Initial IAU76/J2000 heliocentric ecliptic osculating elements (au, days, deg.):
EPOCH= 2449820.5 ! 1995-Apr-13.00 (TDB) Residual RMS= .37013
EC= .2338923901398553 QR= 2.123199358589515 TP= 2449888.2401978029
OM= 173.3007005773634 W= 309.6979504659889 IN= 34.80656077842534
Equivalent ICRF heliocentric cartesian coordinates (au, au/d):
X=-3.914331834006519E-01 Y= 2.086547556539849E+00 Z=-3.858944255506239E-01
VX=-1.247921525244788E-02 VY=-3.104370043226314E-03 VZ= 1.462708693235823E-03
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 14.3 RAD= 272.5 ROTPER= 7.8132
H= 4.21 G= .110 B-V= .635
ALBEDO= .101 STYP= B
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -3.453585004297552E+08, 2.151464493938778E+07, 1.484082838948810E+07, -3.944259837966826E+00, -1.692743937506040E+01, 1.202778577972903E+01,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -3.456951638863605E+08, 2.005187568649421E+07, 1.587984777317063E+07, -3.848901261556055E+00, -1.693289035516663E+01, 1.202354285563258E+01,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -3.460235950197951E+08, 1.858865349208418E+07, 1.691848867122066E+07, -3.753697268809341E+00, -1.693792445828556E+01, 1.201902480253225E+01,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -3.463438073066825E+08, 1.712501428967858E+07, 1.795672738107823E+07, -3.658650645445643E+00, -1.694254364596886E+01, 1.201423320898760E+01,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -3.466558144628218E+08, 1.566099384279655E+07, 1.899454033766988E+07, -3.563764142227468E+00, -1.694674989182626E+01, 1.200916966895306E+01,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -3.469596304401702E+08, 1.419662774393039E+07, 2.003190411386344E+07, -3.469040475028256E+00, -1.695054518113680E+01, 1.200383578151577E+01,
2458490.50000Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: Sep 28, 2012 Phobos / (Mars) 401
SATELLITE PHYSICAL PROPERTIES:
Radius (km) = 13.1 x11.1 x9.3 Density (g cm^-3) = 1.90 +- 0.08
Mass (10^20 kg ) = 1.08 (10^-4) Geometric Albedo = 0.06
(+- 0.1) V(1,0) = +11.8
SATELLITE ORBITAL DATA:
Semi-major axis, a (km) = 9.3772(10^3) Orbital period = 0.319 d
Eccentricity, e = 0.0151 Rotational period = Synchronous
Inclination, i (deg) = 1.082
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:42:43 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Phobos (401) {source: mar097}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 1.629815469459798E+08, 1.449078262404279E+08, -9.983748377748802E+05, -1.321954683184625E+01, 2.052462587429605E+01, -1.744932928934002E-01,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, 1.616735070963576E+08, 1.466541000389653E+08, -9.324437475351617E+05, -1.420250003553856E+01, 2.184633030243700E+01, 3.505949021617258E-01,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, 1.603453133760684E+08, 1.483898444933466E+08, -8.637763171340525E+05, -1.588886150652570E+01, 2.195539407823319E+01, 1.156924375162896E+00,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, 1.589963203868488E+08, 1.501098760173905E+08, -7.923181186252534E+05, -1.729058793712412E+01, 2.072091398352851E+01, 1.719619509083024E+00,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, 1.576293690746227E+08, 1.518101004375398E+08, -7.197556495422348E+05, -1.761559164024376E+01, 1.882089747799705E+01, 1.674065535210163E+00,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, 1.562491866939842E+08, 1.534899834000229E+08, -6.485038052894101E+05, -1.671025527427437E+01, 1.739668835039943E+01, 1.022211683575713E+00,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, 1.548594736165679E+08, 1.551531185370942E+08, -5.801435848044157E+05, -1.527542732636680E+01, 1.737416290432804E+01, 1.964283104845430E-01,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, 1.534602039265565E+08, 1.568048786592960E+08, -5.141828407533616E+05, -1.447374325382064E+01, 1.868284796861607E+01, -2.021117742077783E-01,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, 1.520476168717376E+08, 1.584482933658796E+08, -4.483511435208395E+05, -1.498652197492919E+01, 2.023409466264165E+01, 1.029737217303914E-01,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, 1.506172439040140E+08, 1.600818118911068E+08, -3.803407664359212E+05, -1.650935825658196E+01, 2.084523889823814E+01, 8.673361088921618E-01,
2458494.500000000, A.D. 2019-Jan-11 00:00:00.0000, 1.491671109136406E+08, 1.617006636088864E+08, -3.093780068372786E+05, -1.811585327651534E+01, 2.005435037339918E+01, 1.574488841944787E+00,
2458495.500000000, A.D. 2019-Jan-12 00:00:00.0000, 1.476988804873439E+08, 1.633000182378080E+08, -2.365900902837664E+05, -1.888367793193226E+01, 1.827233163967256E+01, 1.773559447645338E+00,
2458496.500000000, A.D. 2019-Jan-13 00:00:00.0000, 1.462168698589457E+08, 1.648778573100380E+08, -1.642827164929807E+05, -1.838437827752159E+01, 1.652621299537533E+01, 1.316329386611214E+00,
2458497.500000000, A.D. 2019-Jan-14 00:00:00.0000, 1.447255342797189E+08, 1.664363644925710E+08, -9.452541922541708E+04, -1.700405054310853E+01, 1.591601042035790E+01, 4.84418544335017Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
Revised: April 12, 2021 Venus 299 / 2
PHYSICAL DATA (updated 2020-Oct-19):
Vol. Mean Radius (km) = 6051.84+-0.01 Density (g/cm^3) = 5.204
Mass x10^23 (kg) = 48.685 Volume (x10^10 km^3) = 92.843
Sidereal rot. period = 243.018484 d Sid. Rot. Rate (rad/s)= -0.00000029924
Mean solar day = 116.7490 d Equ. gravity m/s^2 = 8.870
Mom. of Inertia = 0.33 Core radius (km) = ~3200
Geometric Albedo = 0.65 Potential Love # k2 = ~0.25
GM (km^3/s^2) = 324858.592 Equatorial Radius, Re = 6051.893 km
GM 1-sigma (km^3/s^2) = +-0.006 Mass ratio (Sun/Venus)= 408523.72
Atmos. pressure (bar) = 90 Max. angular diam. = 60.2"
Mean Temperature (K) = 735 Visual mag. V(1,0) = -4.40
Obliquity to orbit = 177.3 deg Hill's sphere rad.,Rp = 167.1
Sidereal orb. per., y = 0.61519726 Orbit speed, km/s = 35.021
Sidereal orb. per., d = 224.70079922 Escape speed, km/s = 10.361
Perihelion Aphelion Mean
Solar Constant (W/m^2) 2759 2614 2650
Maximum Planetary IR (W/m^2) 153 153 153
Minimum Planetary IR (W/m^2) 153 153 153
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 10:41:39 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: Venus Barycenter (299) {source: DE441}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, -8.238126961879626E+07, 7.005400357447663E+07, 5.684910758346014E+06, -2.263904820538244E+01, -2.701728799104976E+01, 9.352522537487609E-01,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, -8.430421210851002E+07, 6.769252287428245E+07, 5.763435044511393E+06, -2.187056411397726E+01, -2.764297308639734E+01, 8.823195889301818E-01,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, -8.616000326168314E+07, 6.527793470247705E+07, 5.837355477688540E+06, -2.108472508611304E+01, -2.824654501526468E+01, 8.286888312335829E-01,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, -8.794717128355025E+07, 6.281217077175058E+07, 5.906613629538920E+06, -2.028217402444955E+01, -2.882751772321507E+01, 7.744037506720485E-01,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, -8.966430052740383E+07, 6.029720395853411E+07, 5.971154876742747E+06, -1.946356764952629E+01, -2.938542446947505E+01, 7.195086496297805E-01,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, -9.131003266225842E+07, 5.773504661667021E+07, 6.030928445242047E+06, -1.862957589113161E+01, -2.991981823154502E+01, 6.640483221889149E-01,
2458490.500000000, A.D. 2019-Jan-07 00:00:00.0000, -9.288306778738710E+07, 5.512774885702962E+07, 6.085887450950667E+06, -1.778088126726145E+01, -3.043027208880648E+01, 6.080680130282587E-01,
2458491.500000000, A.D. 2019-Jan-08 00:00:00.0000, -9.438216549269339E+07, 5.247739679490615E+07, 6.135988936896548E+06, -1.691817825148213E+01, -3.091637958471852E+01, 5.516133759465482E-01,
2458492.500000000, A.D. 2019-Jan-09 00:00:00.0000, -9.580614586395182E+07, 4.978611076705655E+07, 6.181193906766072E+06, -1.604217262952625E+01, -3.137775506723322E+01, 4.947304320630508E-01,
2458493.500000000, A.D. 2019-Jan-10 00:00:00.0000, -9.715389043202378E+07, 4.705604352028117E+07, 6.221467354824975E+06, -1.515358084596507E+01, -3.181403400709587E+01, 4.374655277489836E-01,
Line truncated
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*******************************************************************************
JPL/HORIZONS 4 Vesta (A807 FA) 2021-May-29 11:46:53
Rec #: 4 (+COV) Soln.date: 2021-Apr-13_11:15:57 # obs: 9451 (1950-2021)
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
EPOCH= 2458849.5 ! 2020-Jan-01.00 (TDB) Residual RMS= .47385
EC= .08857261385730482 QR= 2.15270823108896 TP= 2458247.8038331456
OM= 103.8092892453337 W= 150.8357762126256 IN= 7.14181494423702
A= 2.361908654291772 MA= 163.3754032354997 ADIST= 2.571109077494583
PER= 3.62997 N= .271524746 ANGMOM= .026333145
DAN= 2.53982 DDN= 2.17514 L= 254.8345779
B= 3.4734313 MOID= 1.13987994 TP= 2018-May-09.3038331456
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 17.8 RAD= 262.7 ROTPER= 5.342128
H= 3.31 G= .320 B-V= .782
ALBEDO= .4228 STYP= V
ASTEROID comments:
1: soln ref.= JPL#36, OCC=0 radar(2977 delay, 0 Dop
2: source=ORB
*******************************************************************************
*******************************************************************************
Ephemeris / WWW_USER Sat May 29 11:46:53 2021 Pasadena, USA / Horizons
*******************************************************************************
Target body name: 4 Vesta (A807 FA) {source: JPL#36}
Center body name: Solar System Barycenter (0) {source: DE441}
Center-site name: BODY CENTER
*******************************************************************************
Start time : A.D. 2019-Jan-01 00:00:00.0000 TDB
Stop time : A.D. 2021-Dec-31 00:00:00.0000 TDB
Step-size : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii : (undefined)
Small perturbers: Yes {source: SB441-N16}
Output units : KM-S
Output type : GEOMETRIC cartesian states
Output format : 2 (position and velocity)
Reference frame : Ecliptic of J2000.0
*******************************************************************************
Initial IAU76/J2000 heliocentric ecliptic osculating elements (au, days, deg.):
EPOCH= 2458849.5 ! 2020-Jan-01.00 (TDB) Residual RMS= .47385
EC= .08857261385730482 QR= 2.15270823108896 TP= 2458247.8038331456
OM= 103.8092892453337 W= 150.8357762126256 IN= 7.14181494423702
Equivalent ICRF heliocentric cartesian coordinates (au, au/d):
X= 1.243605461680222E+00 Y= 2.133870405923554E+00 Z= 6.874866847781977E-01
VX=-8.779290950353064E-03 VY= 4.462599423343603E-03 VZ= 2.927653651039283E-03
Asteroid physical parameters (km, seconds, rotational period in hours):
GM= 17.8 RAD= 262.7 ROTPER= 5.342128
H= 3.31 G= .320 B-V= .782
ALBEDO= .4228 STYP= V
*******************************************************************************
JDTDB, Calendar Date (TDB), X, Y, Z, VX, VY, VZ,
**************************************************************************************************************************************************************************************************
$$SOE
2458484.500000000, A.D. 2019-Jan-01 00:00:00.0000, 2.896729116971705E+08, -1.781911555651397E+08, -2.990483159764896E+07, 1.170943386515238E+01, 1.610135702679393E+01, -1.907600473100395E+00,
2458485.500000000, A.D. 2019-Jan-02 00:00:00.0000, 2.906810176722590E+08, -1.767977867679520E+08, -3.006927776908569E+07, 1.162632187843875E+01, 1.615247313008015E+01, -1.899017818371286E+00,
2458486.500000000, A.D. 2019-Jan-03 00:00:00.0000, 2.916819348495660E+08, -1.754000215493568E+08, -3.023298083640625E+07, 1.154302696793227E+01, 1.620312600149254E+01, -1.890399043588770E+00,
2458487.500000000, A.D. 2019-Jan-04 00:00:00.0000, 2.926756475433087E+08, -1.739978999425360E+08, -3.039593769300150E+07, 1.145955188327699E+01, 1.625331541370235E+01, -1.881744476562807E+00,
2458488.500000000, A.D. 2019-Jan-05 00:00:00.0000, 2.936621403049815E+08, -1.725914619995510E+08, -3.055814526057230E+07, 1.137589936732655E+01, 1.630304115698279E+01, -1.873054444803577E+00,
2458489.500000000, A.D. 2019-Jan-06 00:00:00.0000, 2.946413979227638E+08, -1.711807477898281E+08, -3.071960048910274E+07, 1.129207215603937E+01, 1.635230303907983E+01, -Line truncated
|
||||||
Reference in new issue
Block a user