/**
 * This function takes a list of coordinates in degrees, minutes, and seconds format,
 * and converts them to decimal degrees format.
 * The coordinates are given in the format (degrees, minutes, seconds).
 *
 * Example:
 * convertCoordinates(listOf(Pair(45, 30, 0), Pair(50, 15, 30), Pair(60, 40, 10)))
 *
 * Expected Output:
 * [45.5, 50.25833333333333, 60.669444444444444]
 */
fun convertCoordinates(coordinateList: List<Triple<Int, Int, Int>>): List<Double> {

    val decimalDegreesList = mutableListOf<Double>()

    for (coordinate in coordinateList) {
        val degrees = coordinate.first
        val minutes = coordinate.second
        val seconds = coordinate.third

        val decimalDegrees = degrees + (minutes / 60.0) + (seconds / 3600.0)
        decimalDegreesList.add(decimalDegrees)
    }

    return decimalDegreesList
}
/**
 * This function takes a list of coordinates in degrees, minutes, and seconds format,
 * and converts them to decimal degrees format.
 * The coordinates are given in the format (degrees, minutes, seconds).
 *
 * Example:
 * convertCoordinates(listOf(Pair(45, 30, 0), Pair(50, 15, 30), Pair(60, 40, 10)))
 *
 * Expected Output:
 * [45.5, 50.25833333333333, 60.669444444444444]
 */
fun convertCoordinates(coordinateList: List<Triple<Int, Int, Int>>): List<Double> {
/**
 * This function takes a list of coordinates in degrees, minutes, and seconds format,
 * and converts them to decimal degrees format.
 * The coordinates are given in the format (degrees, minutes, seconds).
 *
 * Example:
 * convertCoordinates(listOf(Pair(45, 30, 0), Pair(50, 15, 30), Pair(60, 40, 10)))
 *
 * Expected Output:
 * [45.5, 50.25833333333333, 60.669444444444444]
 */
fun convertCoordinates(coordinateList: List<Triple<Int, Int, Int>>): List<Double> {

    val decimalDegreesList = mutableListOf<Double>()

    for (coordinate in coordinateList) {
        val degrees = coordinate.first
        val minutes = coordinate.second
        val seconds = coordinate.third

        val decimalDegrees = degrees + (minutes / 60.0) + (seconds / 3600.0)
        decimalDegreesList.add(decimalDegrees)
    }

    return decimalDegreesList
}