def test_gravitational_center(freebody): assert (freebody.gravitational_center == Vector2(-0.2, 0.02))
def test_get_total_weight(freebody): freebody.angle = math.radians(15) weight, weight_point = freebody.get_total_weight() npt.assert_almost_equal(weight.r, 229.47, decimal=2) npt.assert_almost_equal(weight.theta, math.radians(-105), decimal=2) assert weight_point == Vector2(-0.2, 0.02)
def force_and_moment_at_cg_mock(): return Vector2(50, 10), 1.5