package space.nstart.pcp.pcp_satellites_service.service

import ballistics.types.OrbitalPoint
import ballistics.utils.fromDateTime
import ballistics.utils.math.Vector3D
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import space.nstart.pcp.pcp_satellites_service.configuration.CustomErrorException
import space.nstart.pcp.pcp_satellites_service.entity.SatelliteModeSource
import space.nstart.pcp.pcp_satellites_service.model.mode.SurveyMode
import space.nstart.pcp.pcp_types_lib.dto.ballistics.ExactTimePositionRequestDTO
import space.nstart.pcp.pcp_types_lib.dto.ballistics.ObjDTO
import space.nstart.pcp.pcp_types_lib.dto.ballistics.ObjViewRequestDTO
import space.nstart.pcp.pcp_types_lib.dto.requests.CoverageResponseDTO
import space.nstart.pcp.pcp_types_lib.dto.requests.CoverageResponseStatus
import space.nstart.pcp.pcp_types_lib.dto.requests.EarthCellCalculationRequestDTO
import java.time.LocalDateTime
import kotlin.math.abs


@Service
class ComplexMissionService {

    @Autowired
    private lateinit var satelliteService: SatelliteService
    @Autowired
    private lateinit var ballisticsService: BallisticsService
    private val logger : Logger = LoggerFactory.getLogger(this::class.java)

    @Autowired
    private lateinit var complexPlanCalculationService: ComplexPlanCalculationService

    fun clear() =
        complexPlanCalculationService.clear()

    fun process(tn : LocalDateTime, tk : LocalDateTime, satsAvail : List<Long>?){
        complexPlanCalculationService.process(tn, tk, satsAvail)
    }
}
