package space.nstart.pcp.slots_service.dto.tlecomparison

import java.time.LocalDateTime

/*
 * Времена ([LocalDateTime], epoch/time) — naive ISO без зоны (локальное настенное время, без UTC-семантики).
 */

class TleTextRequestDTO(
    var tle: String = ""
)

class TleCompareRequestDTO(
    var first: String = "",
    var second: String = "",
    var time: LocalDateTime? = null
)

data class TleParsedDTO(
    val satName: String? = null,
    val noradId: Long? = null,
    val revolution: Long? = null,
    val time: LocalDateTime? = null,
    val inclination: Double? = null,
    val perigee: Double? = null,
    val apogee: Double? = null,
    val argPerigee: Double? = null,
    val eccentricity: Double? = null,
    val major: Double? = null,
    val minor: Double? = null,
    val meanAnomaly: Double? = null,
    val period: Double? = null,
    val semiMajor: Double? = null,
    val semiMinor: Double? = null,
    val ascendingNode: Double? = null,
    val meanMotion: Double? = null,
    val meanMotionTLE: Double? = null
)

data class TlePositionDTO(
    val time: LocalDateTime,
    val revolution: Long,
    val x: Double,
    val y: Double,
    val z: Double,
    val vx: Double,
    val vy: Double,
    val vz: Double,
    val radiusNorm: Double,
    val velocityNorm: Double
)

data class TleCompareRowDTO(
    val code: String,
    val name: String,
    val first: String?,
    val second: String?,
    val delta: String? = null
)

data class TleCompareResponseDTO(
    val time: LocalDateTime,
    val firstEpoch: LocalDateTime,
    val secondEpoch: LocalDateTime,
    val first: TlePositionDTO,
    val second: TlePositionDTO,
    val radiusVectorDelta: TlePositionDeltaDTO,
    val rows: List<TleCompareRowDTO>
)

data class TlePositionDeltaDTO(
    val dx: Double,
    val dy: Double,
    val dz: Double,
    val norm: Double
)
