The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
[%# Astro::App::Satpass2 template to render TLE data in a format
    appropriate for loading into Celestia planetarium software. To use,
    load the TLE data, then do

    satpass2> formatter format eg/tle_celestia.tt

    -%]
[% UNLESS data %]
    [%- SET data = sp.tle( arg ) %]
[%- END %]
[%- FOR item IN data -%]
[% CALL item.fixed_width( 0 ) %]
# Keplerian elements for [% item.name %]
# Generated by [% provider %]
# Epoch: [% item.epoch( units = 'zulu' ) %] UT
#
# CAVEAT: This is just a demonstration, and is known (or at least
# strongly suspected) NOT to make Celestia display satellites where they
# actually are. I strongly suspect that the problem is an equivocation
# on the use of epoch, but I can not prove this.

Modify "[% item.name( missing = 'oid' ) %]" "Sol/Earth" {
    EllipticalOrbit {
        Epoch  [% item.epoch( units = 'julian', places = '' ) %]
        Period  [% item.period( units = 'days', places = '' ) %]
        SemiMajorAxis  [% item.semimajor( places = '' ) %]
        Eccentricity  [% item.eccentricity( places = '' ) %]
        Inclination  [% item.inclination( places = '' ) %]
        AscendingNode  [% item.ascending_node( units = 'degrees',
            places = '' ) %]
        ArgOfPericenter  [% item.argument_of_perigee( places = '' ) %]
        MeanAnomaly  [% item.mean_anomaly( places = '' ) %]
    }
    UniformRotation {
        Inclination  [% item.inclination( places = '' ) %]
        MeridianAngle  90
        AscendingNode  [% item.ascending_node( units = 'degrees',
            places = '' ) %]
    }
}
[% END -%]