/**
 * This function calculates the orbital velocity of the astronomer based on the distance
 * from the celestial object and the mass of that object.
 *
 * @param distance The distance from the celestial object in meters.
 * @param mass The mass of the celestial object in kilograms.
 * @return The orbital velocity in meters per second.
 */
fun calculateOrbitVelocity(distance: Double, mass: Double): Double {

    val gravitationalConstant = 6.67430e-11
    val gravitationalForce = gravitationalConstant * mass

    // Given the astronomer's initial velocity is 0, the loop will iterate until reaching
    // the target velocity based on the gravitational force experienced.
    var targetVelocity = 0.0  // Replace the value with the desired target velocity

    var velocity = 0.0
    while (velocity < targetVelocity) {
        // Update the velocity by adding the change in velocity based on gravitational force
        velocity += gravitationalForce  // Update the change in velocity
    }

    return velocity
}
/**
 * This function calculates the orbital velocity of the astronomer based on the distance
 * from the celestial object and the mass of that object.
 *
 * @param distance The distance from the celestial object in meters.
 * @param mass The mass of the celestial object in kilograms.
 * @return The orbital velocity in meters per second.
 */
fun calculateOrbitVelocity(distance: Double, mass: Double): Double {
/**
 * This function calculates the orbital velocity of the astronomer based on the distance
 * from the celestial object and the mass of that object.
 *
 * @param distance The distance from the celestial object in meters.
 * @param mass The mass of the celestial object in kilograms.
 * @return The orbital velocity in meters per second.
 */
fun calculateOrbitVelocity(distance: Double, mass: Double): Double {

    val gravitationalConstant = 6.67430e-11
    val gravitationalForce = gravitationalConstant * mass

    // Given the astronomer's initial velocity is 0, the loop will iterate until reaching
    // the target velocity based on the gravitational force experienced.
    var targetVelocity = 0.0  // Replace the value with the desired target velocity

    var velocity = 0.0
    while (velocity < targetVelocity) {
        // Update the velocity by adding the change in velocity based on gravitational force
        velocity += gravitationalForce  // Update the change in velocity
    }

    return velocity
}