MATLAB Answers

0

Planet path using netwon's law with forward method

BabyMilo 님이 질문을 제출함. 18 Feb 2012
최근 활동 Michael 님이 편집함. 16 Oct 2013
Given the initial position (ie x1,y1) and the velocity (ie vx,vy) of the planet.
How to plot a graph of the path of the planet around the center point (0,0) assuming the center is Earth, using time step of 10s for 500000s?
formula for forward method:
x(t+dt)=x(t)+v(t)*dt
v(t+dt)=v(t)+a(t)*dt
a=GM/r^2
G = 6.67e-11, M = 5.97e24
Many thanks.

  댓글 수: 3

What code do you have so far?
Where is "r" defined?
If I recall correctly, this kind of forward prediction is unable to handle the orbit of Mercury, which has notable influence from drag of the rotational gravitational frame.
@Walter: Well, OP has Euler's method listed which isn't going to do all that great with *any* orbit.

로그인 to comment.

답변 수: 1


You should look into velocity verlet methods.

  댓글 수: 0

로그인 to comment.



Translated by