/**
 * This function calculates the corresponding Mach number for a given altitude and speed.
 *
 * @param altitudes a set of altitudes (in feet)
 * @param speeds a set of speeds (in knots)
 * @return a list of tuples containing the altitude, speed, and Mach number
 */
fun calculateMachNumber(altitudes: Set<Double>, speeds: Set<Double>): List<Triple<Double, Double, Double>> {

    val machNumbers = mutableListOf<Triple<Double, Double, Double>>()

    for (altitude in altitudes) {
        for (speed in speeds) {
            val machNumber = speed / (Math.sqrt(1.4 * 1716.5 * altitude))
            machNumbers.add(Triple(altitude, speed, machNumber))
        }
    }

    return machNumbers
}
/**
 * This function calculates the corresponding Mach number for a given altitude and speed.
 *
 * @param altitudes a set of altitudes (in feet)
 * @param speeds a set of speeds (in knots)
 * @return a list of tuples containing the altitude, speed, and Mach number
 */
fun calculateMachNumber(altitudes: Set<Double>, speeds: Set<Double>): List<Triple<Double, Double, Double>> {
/**
 * This function calculates the corresponding Mach number for a given altitude and speed.
 *
 * @param altitudes a set of altitudes (in feet)
 * @param speeds a set of speeds (in knots)
 * @return a list of tuples containing the altitude, speed, and Mach number
 */
fun calculateMachNumber(altitudes: Set<Double>, speeds: Set<Double>): List<Triple<Double, Double, Double>> {

    val machNumbers = mutableListOf<Triple<Double, Double, Double>>()

    for (altitude in altitudes) {
        for (speed in speeds) {
            val machNumber = speed / (Math.sqrt(1.4 * 1716.5 * altitude))
            machNumbers.add(Triple(altitude, speed, machNumber))
        }
    }

    return machNumbers
}