[ANN] SatelliteToolbox.jl v0.7.0 => IGRFv13 and RV to TLE conversion

Hi!

I have just registered a new version of SatelliteToolbox.jl (v0.7.0).

It was supposed to be a somewhat small release. However, I decided to make a huge change in some parts because I was using a very old way of programming. Every time we had a function with an option for multiple-dispatch, it was expecting a type like Val{:symbol} instead of a value Val(:symbol) as in Julia documentation (this old way dates back to Julia v0.5 documentation, I think). All old signatures are supposed to be working, but was marked as deprecated. However, I may have forgotten some declarations, so sorry for any possible breakage :slight_smile: If you find one, please fill an issue in Github.

Ok, so let’s go to what’s new.

IGRF v13

The IGRF version was updated to v13. You can compute the geomagnetic field using the functions igrf (which is more “Julian”) or the common function igrf13syn (which is more “FORTRAN”). Moreover, I added the function igrfd so that the latitude and longitude can be passed in degrees:

julia> igrfd(2026, 6371e3+640e3, 50, 25; show_warns = false)
3-element StaticArrays.SArray{Tuple{3},Float64,1,3} with indices SOneTo(3):
 15118.591511098817
  1588.129544718571
 34668.84185460438

Position and velocity to TLE

I added an algorithm that can convert a set of positions and velocities (osculating elements) to a TLE (mean elements) to be used in SGP4. The function name is rv_to_tle. However, this should be considered alpha. The keplerian elements seems to be working fine, but BSTAR is way too wrong. Any help to fix that will be appreciated!

TLE to String

The structure TLE can now be converted to String, leading to what we know as TLE:

julia> tle_scd
                             TLE
    ==========================================================
                            Name: SCD 1
                Satellite number: 22490
        International designator: 93009B
                    Epoch (Year): 18
                     Epoch (Day): 359.76217587
              Epoch (Julian Day): 2458478.26218
              Element set number: 999
                    Eccentricity:   0.00432110 deg
                     Inclination:  24.96940000 deg
                            RAAN: 116.17090000 deg
             Argument of perigee:  90.39680000 deg
                    Mean anomaly:  62.00830000 deg
                 Mean motion (n):  14.44539396 revs/day
               Revolution number: 36616

                              B*: 0.000001 1/[er]

                        1   d
                       ---.--- n: 0.000002 rev/day²
                        2  dt

                        1   d²
                       ---.--- n: 0.000000 rev/day³
                        6  dt²
    ==========================================================

julia> print(tle_to_str(tle_scd))
SCD 1
1 22490U 93009B   18359.76217587  .00000186  00000-0  84512-6 0  9998
2 22490  24.9694 116.1709 0043211  90.3968  62.0083 14.44539396366163

I think that’s all!

4 Likes