def from_orbit(cls, orbit, name=None, norad_id=None, cospar_id=None):
        """Convert an orbit to it's TLE representation

        Args:
            orbit (Orbit)
            norad_id (str or int):
            cospar_id (str):
        Return:
            str: TLE representation
        """

        name = "0 %s\n" % name if name is not None else ""
        norad_id = norad_id if norad_id is not None else "99999"

        if cospar_id is not None:
            y, _, i = cospar_id.partition('-')
            cospar_id = y[2:] + i
        else:
            cospar_id = ""

        orbit = orbit.copy(form='TLE', frame='TEME')

        date = orbit.date.datetime
        i, Ω, e, ω, M, n = orbit

        line1 = "1 {norad_id}U {cospar_id:<8} {date:%y}{day:012.8f} {ndot:>10} {ndotdot:>8} {bstar:>8} 0  999".format(
            norad_id=norad_id,
            cospar_id=cospar_id,
            date=date,
            day=int("{:%j}".format(date)) + date.hour / 24. + date.minute / 1440 + date.second / 86400 + date.microsecond / 86400000000.,
            ndot="{: 0.8f}".format(orbit.complements['ndot'] / 2).replace("0.", "."),
            ndotdot=_unfloat(orbit.complements['ndotdot'] / 6),
            bstar=_unfloat(orbit.complements['bstar']),
        )
        line2 = "2 {norad_id} {i:8.4f} {Ω:8.4f} {e} {ω:8.4f} {M:8.4f} {n:11.8f}99999".format(
            norad_id=norad_id,
            i=np.degrees(i),
            Ω=np.degrees(Ω),
            e="{:.7f}".format(e)[2:],
            ω=np.degrees(ω),
            M=np.degrees(M),
            n=n * 86400 / (2 * np.pi)
        )

        line1 += str(cls._checksum(line1))
        line2 += str(cls._checksum(line2))

        return cls("%s%s\n%s" % (name, line1, line2))
Convert an orbit to it's TLE representation

        Args:
            orbit (Orbit)
            norad_id (str or int):
            cospar_id (str):
        Return:
            str: TLE representation