Skip to content

Instantly share code, notes, and snippets.

@Sgeo
Created January 28, 2020 03:43
Show Gist options
  • Save Sgeo/94ab959609ec1280fbd30933f57f7574 to your computer and use it in GitHub Desktop.
Save Sgeo/94ab959609ec1280fbd30933f57f7574 to your computer and use it in GitHub Desktop.
let x(t) = distance from dest on x
let y(t) = distance from dest on y
let z(t) = distance from dest on z
let r(t)^2 = x(t)^2 + y(t)^2 + z(t)^2
let f(t) = force
x(0) initial condition
y(0) initial condition
z(0) initial condition
f(t)
let h -> 0
x(t+h) = h * x(t) * f(t) / r(t)^2
x(t+h) - x(t) = h * x(t) * f(t) * [1 / r(t)^2]
dx =
Simplying assumption: y(t) and z(t) = 0, one-dimension case considered only
r(t) = x(t)
x(t+h) = x(t) - h * x(t) * f(t) / x(t)^2
x(t+h) = x(t) - h * f(t) / x(t)
x(t+h) - x(t) = -h * f(t) / x(t)
dx/dt = -f(t)/x(t)
@Sgeo
Copy link
Author

Sgeo commented Jan 30, 2020

dx(t)/dt = -f(t)/x(t)

f(t) = bt+c
x(t) = dt+e

d = -(bt+c)/(dt+e)
d(dt+e) = -bt - c
d^2 * t + de = -bt - c

b = -d^2
c = -de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment