How to determine net impulse in 2D space? I am trying to calculate impulse exerted on an individual from a collision in a 2D space using tracking data (working in R on this, I have several thousand observations). I have done a lot already, but my final calculations do not make sense. For each observation, I have the individual’s mass, speed at t, speed at $t + 1$, as well as direction of movement. The direction of movement (as given) is out of $360^{\circ}$, increasing in a clockwise direction like below.

So since I have the direction of movement and speed (just a magnitude) before and after the collision, I calculated the $x$ and $y$ velocity of the individual at $t – 1$ and $t + 1$. To get the difference in angle(because angle can’t be more than $180$), I modified the direction variable as follows: If direction is less $90$, subtract direction from $90$. If direction is greater than $180$ but less than 270, subtract direction from $270$. If the angle is between $90$ and $180$ or above $270$, leave it as is. Now, subtracting direction of movement at t from direction at $t + 1$ can never be above $180$ (if you take the absolute value of course). I hope that makes sense.
Since I now have the difference in angle, I use the following equations to calculate x and y velocities:
$$ Cos(\Delta direction)v= v_{x} $$
$$ Sin(\Delta direction)v= v_{y} $$
I then of course multiply each of those velocities by the individual’s mass to get momentum in the $x$ and $y$.
My thought from here was to generate $x$ impulse and y impulse, then use Pythagorean theorem to net the total magnitude. I calculate $x$ impulse as by subtracting xfvelocity by xivelocity, and the same for y. Before doing this, however, to account for an individual’s direction of movement changing I multiply xfvelocity by $*-1$ if the individual changed directions in the x axis. So if the individual’s direction was $20$ at $t$ and $300$ at $t + 1$, I multiply his xf velocity by $-1$ because his direction of movement has flipped over the $y$ axis. I hope that makes sense.
So now that I have x impulse and y impulse, I simply calculate total impulse by using Pythagorean theorem (Ximpulse^2 + YImpulse^2 = Net Impulse^2). Does this process make sense? Unfortunately the results do not match what I anticipated. Additionally, it’s difficult to interpret/figure out what is wrong because impulse can be negative in the $x$ and $y$ axis, yet the total impulse magnitude is always positive (at least how I’m calculating it). For the sake of the analysis that I’m doing, a negative value in $x$ or $y$ impulse is very different from a positive value (as it indicates if the individual has been “knocked back”). Is there a better way of going about this?
 A: Correct, mathematically you have impulse equals the change in momentum. So the problem is not in the theory, but either in the data, the processing or you have other effects that in play that alter speeds.
$$ \boldsymbol{J} = m \, \Delta \boldsymbol{v} $$
which is true along any axis of choosing
$$\begin{aligned}
 J_x & = m \Delta v_x \\
 J_y & = m \Delta v_y \\
\end{aligned}$$
and of course the total impulse (magnitude) being $J = \sqrt{J_x^2+J_y^2}$
So your question is, are you calculating the change in velocity components correctly?
It is difficult to answer this unless you show us some actual data, that represents a known situation you can use to tune your algorithm.
If you have good data then the above shows good results. At the moment of impulse, the direction changes drastically, and the speed less drastically. Here I am just using finite differences, where change is just the difference in speed component between 2 time frames.

It becomes increasingly hard to figure out what is going on if you have noisy data and multiple impulses near each other

If I was doing this I would focus on the data and what processing/filtering I would do to make what I was looking for clearer.
A: Alot of what you've done is right, but it doesn't seem necessary to change the direction variable as much as you're doing.
If $\theta$ is the direction variable, as in your diagram, just find the impulse in the $x$ direction by doing mass times
$$v_2sin \theta_2 - v_1sin \theta_1$$
and for the $y$ direction
$$v_2cos \theta_2 - v_1cos \theta_1$$
where the $2$ subscripts are for final and the $1$ subscripts are for initial  (best to work with $\theta_1$ and $\theta_2$ instead of $\Delta direction$).
To decide whether it's speeded up or 'knocked back' you could consider total speed before and after the collision.  It might also be possible for an individual to be speeded up in the $x$ direction (use the first expression for that) but knocked back in the $y$ direction (the second), you can find the $x$ components of velocity from $vsin\theta$ and the $y$ components from $vcos\theta$, then use those values to calculate other quantities.
