def in_orbit_idx_to_sat_idx(
    sat_idx_in_orbit: int, orbit_idx: int, num_sat_per_orbit: int
) -> int:
    """Compute the satellite index in the constellation.
     Starting from from the satellite index in the orbit and orbit index.
    Args:
        sat_idx_in_orbit: Index of the satellite inside its orbit.
        orbit_idx: Index of the satellite's orbit.
        num_sat_per_orbit: Total number of satellites in each orbit of the
            constellation.
    Returns:
        int: Index of the satellite in the constellation.
    """
    if sat_idx_in_orbit >= num_sat_per_orbit:
        raise ValueError(
            "Satellite index in orbit cannot be greater than "
            "the number of satellites per orbit"
        )
    base_idx = orbit_idx * num_sat_per_orbit
    sat_idx = base_idx + sat_idx_in_orbit
    return sat_idx