/**
 * Given the distance of the Earth from the sun and the angle between the Earth-Sun line and the vernal equinox,
 * calculate the heliocentric rectangular coordinates of an astronomical object.
 *
 * @param earthDistance Distance of the Earth from the sun in astronomical units.
 * @param earthAngle Angle between the Earth-Sun line and the vernal equinox in degrees.
 * @return Triple<Float, Float, Float> Heliocentric rectangular coordinates (x, y, z).
 */
fun calculateHeliocentricCoordinates(earthDistance: Float, earthAngle: Float): Triple<Float, Float, Float> {

    // Convert earthAngle from degrees to radians
    val earthAngleRad = earthAngle * (Math.PI / 180)

    // Calculate heliocentric rectangular coordinates
    val x = earthDistance * Math.cos(earthAngleRad).toFloat()
    val y = earthDistance * Math.sin(earthAngleRad).toFloat()
    val z = 0.0f  // Astronomical objects are considered to lay in the ecliptic plane (z = 0)

    return Triple(x, y, z)
}
/**
 * Given the distance of the Earth from the sun and the angle between the Earth-Sun line and the vernal equinox,
 * calculate the heliocentric rectangular coordinates of an astronomical object.
 *
 * @param earthDistance Distance of the Earth from the sun in astronomical units.
 * @param earthAngle Angle between the Earth-Sun line and the vernal equinox in degrees.
 * @return Triple<Float, Float, Float> Heliocentric rectangular coordinates (x, y, z).
 */
fun calculateHeliocentricCoordinates(earthDistance: Float, earthAngle: Float): Triple<Float, Float, Float> {
/**
 * Given the distance of the Earth from the sun and the angle between the Earth-Sun line and the vernal equinox,
 * calculate the heliocentric rectangular coordinates of an astronomical object.
 *
 * @param earthDistance Distance of the Earth from the sun in astronomical units.
 * @param earthAngle Angle between the Earth-Sun line and the vernal equinox in degrees.
 * @return Triple<Float, Float, Float> Heliocentric rectangular coordinates (x, y, z).
 */
fun calculateHeliocentricCoordinates(earthDistance: Float, earthAngle: Float): Triple<Float, Float, Float> {

    // Convert earthAngle from degrees to radians
    val earthAngleRad = earthAngle * (Math.PI / 180)

    // Calculate heliocentric rectangular coordinates
    val x = earthDistance * Math.cos(earthAngleRad).toFloat()
    val y = earthDistance * Math.sin(earthAngleRad).toFloat()
    val z = 0.0f  // Astronomical objects are considered to lay in the ecliptic plane (z = 0)

    return Triple(x, y, z)
}