package space.nstart.pcp.pcp_request_service.service

import ballistics.Ballistics
import ballistics.types.BallisticsError
import ballistics.types.TLE
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service
import space.nstart.pcp.pcp_request_service.entity.AscNodeEntity
import space.nstart.pcp.pcp_request_service.entity.EarthCoverageEntity
import space.nstart.pcp.pcp_request_service.entity.FlightLineEntity
import space.nstart.pcp.pcp_request_service.entity.PDCMEntity
import space.nstart.pcp.pcp_request_service.repository.AscNodeRepository
import space.nstart.pcp.pcp_request_service.repository.EarthCellViewRepository
import space.nstart.pcp.pcp_request_service.repository.EarthCoverageRepository
import space.nstart.pcp.pcp_request_service.repository.FlightLineRepository
import space.nstart.pcp.pcp_request_service.repository.PDCMRepository
import space.nstart.pcp.pcp_types_lib.dto.ballistics.SatelliteICDTO
import space.nstart.pcp.pcp_types_lib.dto.ballistics.TLEDTO
import kotlin.collections.component1
import kotlin.collections.component2
import kotlin.math.PI

@Service
open class SatelliteIcEventService {

    private val logger = LoggerFactory.getLogger(this::class.java)

    @Autowired
    private lateinit var satelliteService: SatelliteService

    open fun handlePlacedIcRv(message: SatelliteICDTO) {
        CoroutineScope(Dispatchers.Default).launch {
            satelliteService.resieveRV(message)
        }
    }





}
