Dustinsfl
- 2,217
- 5
I used mathematica to solve a restricted 3 body problem and was able to export my position data at different time intervals. How can I find my velocity at that final location?
Ackbach said:What mechanism did you employ in Mathematica to get your position object? NDSolve? If so, you should be able to differentiate it numerically by using the usual D[] function.
XYdata = Flatten[
Table[Evaluate[{x1[t], x2[t], x3[t]} /. s], {t, 0, 122400, 3}], 1];
SetDirectory[NotebookDirectory[]];
Export["OrbitData.txt", XYdata, "CSV"];
Earth = {N[x1], 0};
L4 = {N[xL4], N[yL4]};
Export["Earth.txt", Earth, "CSV"];