Skip to content

Commit

Permalink
Update to reflect more accurate ephemeris
Browse files Browse the repository at this point in the history
  • Loading branch information
akoumjian committed Sep 12, 2024
1 parent 62dc539 commit 871da37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions assist/test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def test_ephem(self):
ephem = assist.Ephem("data/de440.bsp", "data/sb441-n16.bsp")
self.assertEqual(ephem.jd_ref, 2451545.0)
p = ephem.get_particle(0,0) # Sun
self.assertEqual(p.x, -0.0071371791616045835)
self.assertEqual(p.x, -0.0071371791616079054)
p = ephem.get_particle(1,100) # planet
self.assertEqual(p.x, 0.12906301685043747)
self.assertEqual(p.x, 0.12906301685045435)
p = ephem.get_particle(20,200) #asteroid
self.assertEqual(p.x, -2.629563810751188)
self.assertEqual(p.x, -2.62956381075119)
del ephem

def test_ephem_names(self):
Expand Down
2 changes: 1 addition & 1 deletion assist/test/test_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_interpolate(self):
d = sim.particles[0] - sim2.particles[0]
au2meter = 149597870700

self.assertLess(math.fabs(d.x*au2meter), 0.01) # 1cm accurary
self.assertLess(math.fabs(d.x*au2meter), 0.02) # 1cm accurary
self.assertLess(math.fabs(d.y*au2meter), 0.01) # 1cm accurary
self.assertLess(math.fabs(d.z*au2meter), 0.01) # 1cm accurary

Expand Down
4 changes: 0 additions & 4 deletions src/assist.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,6 @@ void assist_integrate_or_interpolate(struct assist_extras* ax, double t){

}

fprintf(stderr, "sim->t: %.17e\n", sim->t);
fprintf(stderr, "dt: %.17e\n", sim->dt);
fprintf(stderr, "dt_last_done: %.17e\n", sim->dt_last_done);
fprintf(stderr, "t: %.17e\n", t);
double h = 1.0-(sim->t -t) / sim->dt_last_done;
if (sim->t - t==0.){
memcpy(ax->current_state, sim->particles, sizeof(struct reb_particle)*sim->N);
Expand Down

0 comments on commit 871da37

Please sign in to comment.