import math


def chute_velocity(mass, diameter, drag=0.75, gravity=9.8, air_density=1.22):
    """
        Determine the velocity of the rocket when it hits the earth given the mass of the rocket and the diameter of the chute.
            mass: mass of rocket in kg
            diameter: diameter of the chute in meters
            drag: drag coefficient for chute
    """
    return math.sqrt((8 * mass * gravity) / (math.pi * air_density * drag * diameter ** 2))