I am trying to model an object travelling through an atmosphere of uniform density with a uniform gravitational acceleration.
I have the two equations that will describe the forces, $F_g = mg$ and $F_d = kv^2$. Combining these together with $F = ma$ will yield $mg + kv^2 = ma$.
This equation has its issues, since the force of drag will always be positive, and it needs to be either positive or negative depending on which direction the object it travelling in. My only idea on how to fix this is by multiplying the drag force by a factor of $-\frac{v}{|v|}$, however this seems hacky and annoying to work with.
Are there any better ways of getting around this problem?