I am attempting to design a obstacle avoidance system with the Arduino. My position (for now) is going to be stationary. I will be detecting an incoming object and I want to use the below known variables to predict if it will hit me or not. Unfortunately this requires physics and I am weak.

I plan on doing the following calculations:

Object detected at point 1 = Known Distance and azimuth.

Object detected at point 2 = Known Distance and azimuth and speed.

Object detected at point 3 = Known Distance and azimuth and speed and acceleration.

Now that I have the above values I think I can plot a trajectory but I will need to account for gravity. I can't account for gravity until I know my objects mass.

So, given that I have Velocity and acceleration, is there anyway to calculate, taking into account for gravity, a graph of its trajectory in a 2D and 3D space. (Please use 2D for the example, I'll figure 3D out later.)

  • 2
    $\begingroup$ I don't understand your equations. Could you explain them? $\endgroup$ – Brian Moths Sep 21 '13 at 15:10
  • $\begingroup$ @NowIGetToLearnWhatAHeadIs those aren't equations they are just facts. At point 1 I will have a known distance and azimuth to the object. At point 2 I will have a Known Distance and Azimuth to the object and will also be able to calculate speed. ect $\endgroup$ – Anthony Russell Sep 21 '13 at 15:11
  • $\begingroup$ If you already have velocity and acceleration, why do you need to also know mass in order to plot its trajectory? It seems like you already have all the kinematic information. $\endgroup$ – Brian Moths Sep 21 '13 at 15:15
  • $\begingroup$ @NowIGetToLearnWhatAHeadIs haha that's why I am here. I am weak in physics (and rusty in math) Could you point me in the right direction? (pun intended) $\endgroup$ – Anthony Russell Sep 21 '13 at 15:17
  • $\begingroup$ Ok so you are detecting the object's position at three points in time. Then you estimate its velocity and acceleration based off of that. Then you want to make an estimate of what the trajectory is for all time before during and after? Is this object just flying throough the air? Which part do you need help with: 1) estimating the velocity and acceleration from sampled positions or 2) estimating the position at other times from these velocities and accelerations, or both? $\endgroup$ – Brian Moths Sep 21 '13 at 15:20

You have sampled the objects positions at times $t_i$, $i=1,2,3$ and you found the positions were $\vec{r}_i$. If you know that gravity is the only force acting on the object (no air resistance or self-propulsion), then the position at any time is given by $\vec{r}(t) = \vec{r}_1 + \vec{v}*(t-t_1) + \frac{1}{2}\vec{a}*(t-t_1)^2$, where $\vec{v}$ is the object's velocity and $\vec{a}$ is its acceleration.

If there are other forces acting on the object, then things become a lot more complicated. Also it is probably worthwhile to sample the position more than three times. If more samples are taken, choosing the best method to estimate the velocity and acceleration becomes trickier. You may want to ask a separate question about that.

| cite | improve this answer | |
  • $\begingroup$ Shouldn't that be subscript i for Position and time? $\endgroup$ – Anthony Russell Sep 21 '13 at 15:42
  • $\begingroup$ Because wont time of 1 always be 0 $\endgroup$ – Anthony Russell Sep 21 '13 at 15:45
  • $\begingroup$ If I put in the subscript $i$, I would need to say what value $i$ has. And you raise a good point, The formula should $\vec{r}(t) = \vec{r}_i + \vec{v}*(t-t_i) + \frac{1}{2}\vec{a}*(t-t_i)^2$ should be valid for any $i=1,2,3$, not just $i=1$ as I put in my answer. As to whether $t_1=0$, this is up to how you implement things. Maybe $t=0$ is when your object first started moving, but you only first measured the position 10 seconds after that. Then $t_1$ would be 10 seconds. $\endgroup$ – Brian Moths Sep 21 '13 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.