package org.nstart.dep265.tletools.zeptomoby.core.wgs

interface WGS {

    val xkmPer: Double       // Earth equatorial radius - km
    val f: Double            // Earth flattening
    val ge: Double           // Earth gravitational constant
    val j2: Double           // J2 harmonic
    val j3: Double           // J3 harmonic
    val j4: Double           // J4 harmonic
}

object WGS72: WGS {

    override val xkmPer: Double = 6378.135
    override val f: Double = 1.0 / 298.26
    override val ge: Double = 398600.8
    override val j2: Double = 1.0826158e-3
    override val j3: Double = -2.53881e-6
    override val j4: Double = -1.65597e-6
}

object WGS84: WGS {

    override val xkmPer: Double = 6378.137
    override val f: Double = 1.0 / 298.257223563
    override val ge: Double = 398600.4418
    override val j2: Double = 1.08262998905e-3
    override val j3: Double = -2.53215306e-6
    override val j4: Double = -1.61098761e-6
}