" \"\"\"Returns acceleration for the i-th body in a two-body system. You can find the overall acceleration for a body by summing the acceleration from all bodies in a n-body system. \n",
" \n",
" Parameters\n",
" ----------\n",
" r_i : array\n",
" Position vector of body that we are finding acceleration for (i-th body)\n",
" r_j : array\n",
" Position vector of other body that is affecting the main body (j-th body)\n",
" m_j : float_like\n",
" Mass of other j-th body\n",
" \n",
" Returns\n",
" -------\n",
" a : array\n",
" Acceleration vector of output dynamics for i-th body\n",
" \n",
" \"\"\"\n",
" G = 6.6743e-11\n",
" a = G*m_j*(r_j-r_i)/(np.linalg.norm(r_j-r_i))**3\n",
"""Returns acceleration for the i-th body in a two-body system. You can find the overall acceleration for a body by summing the acceleration from all bodies in a n-body system.
Parameters
----------
r_i : array
Position vector of body that we are finding acceleration for (i-th body)
r_j : array
Position vector of other body that is affecting the main body (j-th body)
m_j : float_like
Mass of other j-th body
Returns
-------
a : array
Acceleration vector of output dynamics for i-th body