The physics
Mass is inertia: how hard it is to change an object's motion. Weight is the pull of gravity on it. In orbit, weight goes away but mass does not.
m = F / a
So push with a known force and measure the acceleration. That gives the mass, even where nothing has weight.
From rest under a steady force, s = ½ a t². A strobe flashes every T. Then the gaps between the dots grow by a T² each flash.
A spring pushes two carts apart with equal and opposite forces. This is the third law. So mA aA = mB aB.
Two forces at right angles add like the sides of a right triangle. The box speeds up along the diagonal.
F = √(F₁² + F₂²) tan θ = F₂ / F₁ a = F / m