import math


def double_cylindric_magnet(
    radius=0.00075, length=0.01, center_distance=0.0015, density=7500
):
    """
    Function to get the masse, volume and inertial moment of a double
    cylindre magnet, like for GEONAUTE R900 compass. International system units
    """
    V = 2 * math.pow(radius, 2) * math.pi * length
    m = V * density
    mom_z = m * (
        math.pow(radius, 2) / 4
        + math.pow(length, 2) / 12
        + math.pow(center_distance, 2)
    )
    return {"V": V, "m": m, "mom_z": mom_z}