Application of position sensors in unloading carts