Ephemerides.TCB_SEGMENTSConstant
TCB_SEGMENTS

List of the SPK/PCK segment types for which the time argument is expressed in the TCB scale.

Ephemerides.TDB_SEGMENTSConstant
TDB_SEGMENTS

List of the SPK/PCK segment types for which the time argument is expressed in the TDB scale.

Ephemerides.DAFType
DAF

Container to hold the information of NAIF's Double precision Array File (DAF).

Fields

  • filepathString system filepath of the DAF
  • arrayVector{UInt8} binary content of the DAF
  • headerDAFHeader file record of the DAF
  • commentString text within the DAF comment area
  • ftypeInt file type, equals 1 for SPK and 2 for PCK
  • desc – DAF PCK/SPK segment descriptors
  • seglistSPKSegmentList list of the SPK/PCK segments within the DAF

References

See Also

See also DAFHeader, Ephemerides.SPKSegmentList and EphemerisProvider

Ephemerides.DAFMethod
DAF(filename::String)

Parse a DAF file and retrieve its content.

Note

This function does not initialise the segment types. That operation can be done in a second moment through the initialise_segments! function.

Warning

Only DAF files with identification word equal to "DAF/SPK" or "DAF/PCK" are accepted, otherwise an error is thrown.

See Also

See also initialise_segments!.

Ephemerides.DAFHeaderType
DAFHeader

The DAF header, or file record, is the first physical record in a DAF and stores general information about the content of the file.

Fields

  • ndInt32 number of double components in each array summary
  • niInt32 number of integer components in each array summary
  • fwdInt32 record number of initial summary record
  • bwdInt32 record number of final summary record
  • ffaInt32 first free address of the file
  • nameString internal name of the file
  • lendBool true if the file was generated in little endian

References

See Also

See also DAF and EphemerisProvider

Ephemerides.DAFSegmentDescriptorType
DAFSegmentDescriptor

A container object to store both SPK and PCK descriptors information.

Fields

  • segtypeInt32 SPK/PCK segment type
  • tstartFloat64 initial segment type, in TDB seconds since J2000.0
  • tendFloat64 final segment type, in TDB seconds since J2000.0
  • tidInt32 target object NAIF ID
  • cidInt32 center object NAIF ID
  • axesidInt32 reference axes ID. Defaults to -1 for PCKs
  • iaaInt32 initial array address
  • faaInt32 final array address

References

Ephemerides.DAFSegmentDescriptorMethod
DAFSegmentDescriptor(summary::Vector{UInt8}, head::DAFHeader, isspk::Bool)

Generate an SPK or PCK descriptor by parsing a DAF summary.

Ephemerides.EphemRecordPCKType
EphemRecordPCK <: AbstractEphemRecord

Store the PCK metadata relative to a given (target, center) axes pair.

Fields

  • targetInt target axes NAIF ID
  • centerInt center axes NAIF ID
  • t_start – start times of each sub-window, in TDB seconds since J2000
  • t_end – final times of each sub-window, in TDB seconds since J2000
Ephemerides.EphemRecordSPKType
EphemRecordSPK <: AbstractEphemRecord

Store the SPK metadata relative to a given (target, center) objects pair.

Fields

  • targetInt target object NAIF ID
  • centerInt center object NAIF ID
  • axesInt reference axes ID
  • t_start – start times of each sub-window, in TDB seconds since J2000
  • t_end – final times of each sub-window, in TDB seconds since J2000
Ephemerides.EphemerisProviderType
EphemerisProvider(file::String)
EphemerisProvider(files::Vector{String})

Create an EphemerisProvider instance by loading a single or multiple binary ephemeris kernel files specified by files. Currently, only NAIF Double precision Array File (DAF) kernels (i.e., SPK and PCK) are accepted.

Example

julia> eph = EphemerisProvider("PATH_TO_KERNEL")
EphemerisProvider([...])

julia> eph = EphemerisProvider(["PATH_TO_KERNEL_1", "PATH_TO_KERNEL_2"])
EphemerisProvider([])
Ephemerides.InterpCacheMethod
InterpCache{T}(len::Int, buffsize::Int)

Create an InterpCache instance of type T with len buffers, each of size buffsize.

Ephemerides.SPKLinkType
SPKLink

A link object to create a mapping between DAFSegmentDescriptor and its actual location within an EphemerisProvider object.

Fields

  • descDAFSegmentDescriptor for the segment associated to this link
  • fidInt index of the DAF containg the link data.
  • lidInt field number in the SPKSegmentList for this segment type.
  • eidInt index of the inner segment list that stores this SPK segment.
  • fctInt 1 or -1 depending on whether the (from, to) directions must be reversed.

See Also

See also SPKLinkTable, SPKSegmentList and add_spklinks!.

Ephemerides.SPKSegmentCache1Type
SPKSegmentCache1 <: AbstractSPKCache

Cache instance for SPK segments of type 1 and 21. The fields contained within this cache are taken from the FORTRAN NAIF's SPICE implementation for type 1 SPK segments.

Fields

  • tl – Reference epoch of the difference line.
  • g – Stepsize function vector.
  • refpos – Reference position vector.
  • refvel – Reference velocity vector.
  • dt – Modified Divided Difference arrays, with size (maxdim, 3)
  • kqmax – Maximum integration order plus 1.
  • kq – Integration order array.
  • id – Index of the currently loaded logical record.
  • fc – Buffer for the MDA computations.
  • wc – Buffer for the MDA computations.
  • w – Buffer for the MDA computations.
  • vct – Buffer for the MDA computations.
Ephemerides.SPKSegmentCache18Type
SPKSegmentCache18 <: AbstractSPKCache

Cache instance for SPK segments of type 18.

Fields

  • p – Vector storing indexes of the first and last points as well as the window size.
  • epochs – Epochs of the interpolating points.
  • states – Matrix storing the states of the interpolating points.
  • buff – Buffers to compute the interpolating polynomials.
Ephemerides.SPKSegmentCache19Type
SPKSegmentCache19 <: AbstractSPKCache

Cache instance for SPK segments of type 19.

Fields

  • minihead – Header with the mini-segment properties.
  • minidata – Cache for the mini-segment.
  • id – Index of the currently loaded mini-segment.
Ephemerides.SPKSegmentCache2Type
SPKSegmentCache2 <: AbstractSPKCache

Cache instance for SPK segments of type 2 and 3.

Fields

  • A – Chebyshev's polynomial coefficients, with size (ncomp, order)
  • p – Stores the record mid point and radius and scale factor
  • buff – Stores the buffers for the Chebyshev polynomials
  • id – Index of the currently loaded logical record
Ephemerides.SPKSegmentCache20Type
SPKSegmentCache20 <: AbstractSPKCache

Cache instance for SPK segments of type 20.

Fields

  • id – Index of the currently loaded logical record
  • p – Stores the record position constants
  • A – Chebyshev's polynomial coefficients, with size (ncomp, order)
  • buff – Stores the buffers for the Chebyshev polynomials
Ephemerides.SPKSegmentCache5Type
SPKSegmentCache5 <: AbstractSPKCache

Cache instance for SPK segments of type 5.

Fields

  • c1 – Twobody propagation cache for the left state.
  • c2 – Twobody propagation cache for the right state.
  • epochs – Epochs associated to the two states.
  • id – Index of the currently loaded logical record.
Ephemerides.SPKSegmentCache8Type
SPKSegmentCache8 <: AbstractSPKCache

Cache instance for SPK segments of type 8 and 12.

Fields

  • states – Matrix storing the states of the interpolating points.
  • buff – Buffers to compute the interpolating polynomials.
  • id – Index of the currently loaded logical record.
Ephemerides.SPKSegmentCache9Type
SPKSegmentCache9 <: AbstractSPKCache

Cache instance for SPK segments of type 9 and 13.

Fields

  • epochs – Epochs of the interpolating points.
  • states – Matrix storing the states of the interpolating points.
  • buff – Buffers to compute the interpolating polynomials.
  • id – Index of the currently loaded logical record.
Ephemerides.SPKSegmentHeader1Type
SPKSegmentHeader1 <: AbstractSPKHeader

Header instance for SPK segments of type 1 and 21.

Fields

  • nInt number of records in the segment
  • ndirsInt number of directory epochs
  • epochs – Storage for directory epochs or epochs (when ndirs = 0)
  • iaa - Int initial segment file address
  • etidInt initial address for the epoch table (after all the MDA records)
  • recsize - Int Number of double numbers stored in each MDA record
  • maxdim - Int MDA dimension (fixed to 15 for type 1)
Ephemerides.SPKSegmentHeader1Method
SPKSegmentHeader1(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 1.

Ephemerides.SPKSegmentHeader14Type
SPKSegmentHeader14 <: AbstractSPKHeader

Header instance for SPK segments of type 14.

Fields

  • orderInt interpolating polynomial degree
  • nInt number of packets in the segment
  • ndirsInt number of epoch directories
  • epochs – Storage for directory epochs or epochs (when ndirs = 0)
  • etidInt initial address for the epoch table (after all the state data)
  • ptidInt initial address for the packet table (after the constants)
  • pktsizeInt size of each data packet excluding the packet information area.
  • pktoffInt offset of the packet data from the packet start
  • ncompInt number of states coefficients (= 6 for SPK 14)
  • NInt number of polynomial coefficients
Ephemerides.SPKSegmentHeader14Method
SPKSegmentHeader14(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 14.

Ephemerides.SPKSegmentHeader15Type
SPKSegmentHeader15 <: AbstractSPKHeader

Header instance for SPK segments of type 15.

Fields

  • epoch – Epoch of periapsis
  • tp – Trajectory pole, i.e., vector parallel to the angular momentum of the orbit
  • pv – Central body north pole unit vector
  • pa – Periapsis unit vector at epoch
  • p – Semi-latus rectum
  • ecc – Eccentricity
  • j2f – J2 processing flag
  • vj2 – J2 validation flag, true if the orbit shape is compliant with J2 pertubations.
  • GM – Central body gravitational constant (km³/s²)
  • J2 – Central body J2
  • R – Central body radius (km)
  • dmdt – Mean anomaly rate of change (rad/s)
  • kn – Gain factor for the regression of the nodes
  • kp – Gain factor for the precession of the pericenter
Ephemerides.SPKSegmentHeader15Method
SPKSegmentHeader15(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 15.

Ephemerides.SPKSegmentHeader17Type
SPKSegmentHeader17 <: AbstractSPKHeader

Header instance for SPK segments of type 17.

Fields

  • epoch: epoch of periapsis (s)
  • sma: semi-major axis (km)
  • h: H term of the equinoctial elements
  • k: K term of the equinoctial elements
  • lon: mean longitude at epoch (rad)
  • p: P term of the equinoctial elements
  • q: Q term of the equinoctial elements
  • dlpdt: rate of longitude of the periapse (rad/s)
  • dmldt: mean longitude rate (mean motion rate), (rad/s)
  • dnodedt: longitude of the ascending node rate (rad/s)
  • ra: equatorial pole right ascension (rad)
  • de: equatorial pole declination (rad)
  • R: Rotation matrix from planetary equator to inertial reference frame
Ephemerides.SPKSegmentHeader17Method
SPKSegmentHeader17(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 17.

Ephemerides.SPKSegmentHeader18Type
SPKSegmentHeader18 <: AbstractSPKHeader

Header instance for SPK segments of type 18.

Fields

  • nInt number of states in the segment
  • ndirsInt number of epoch directories
  • epochs – Storage for directory epochs or epochs (when ndirs = 0)
  • iaa - Int initial segment file address
  • etidInt initial address for the epoch table (after all the state data)
  • orderInt interpolating polynomial degree
  • NInt group size
  • subtypeInt type 18 subtype, either 0 (Hermite) or 1 (Lagrange)
  • packetsizeInt packet size for each point, either 12 (Hermite) or 6 (Lagrange)
Ephemerides.SPKSegmentHeader19Type
SPKSegmentHeader19 <: AbstractSPKHeader

Header instance for SPK segments of type 19.

Fields

  • nInt number of states in the segment.
  • ndirsInt number of epoch directories.
  • times – Storage for interval directories or start times (when ndirs = 0).
  • iaa - Int initial segment file address.
  • etidInt byte address for the interval table (after all the minisegment data).
  • ptidInt byte for the pointer table.
  • usefirstBool boundary flag, true if the preceding segment should be used.
  • typeInt either type 18 or 19.
Ephemerides.SPKSegmentHeader19Method
SPKSegmentHeader19(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 18 and 19.

Ephemerides.SPKSegmentHeader2Type
SPKSegmentHeader2 <: AbstractSPKHeader

Header instance for SPK segments of type 2 and 3.

Fields

  • tstartFloat64 initial epoch of the first record, in seconds since J2000
  • tlenFloat64 interval length covered by each record, in seconds
  • orderInt polynomial order
  • NInt number of coefficients in each window
  • nInt number of records in the segment
  • recsizeInt byte size of each logical record
  • ncompInt number of vector components
  • iaaInt initial segment file address
  • typeInt SPK segment type, either 2 or 2
Ephemerides.SPKSegmentHeader2Method
SPKSegmentHeader2(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 2 and 3.

Ephemerides.SPKSegmentHeader20Type
SPKSegmentHeader20 <: AbstractSPKHeader

Header instance for SPK segments of type 20.

Fields

  • dscaleFloat64 length conversion factor
  • tscaleFloat64 time conversion factor
  • tstartFloat64 initial epoch of the first record, in seconds since J2000
  • tlenFloat64 interval length covered by each record, in seconds
  • recsizeInt byte size of each logical record
  • orderInt polynomial order
  • NInt number of coefficients in each window
  • nInt number of records in the segment
  • iaaInt initial segment file address
Ephemerides.SPKSegmentHeader20Method
SPKSegmentHeader20(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 20

Ephemerides.SPKSegmentHeader5Type
SPKSegmentHeader5 <: AbstractSPKHeader

Header instance for SPK segments of type 5.

Fields

  • GMFloat64 Gravitational constant
  • nInt number of states
  • ndirsInt number of epoch directories
  • etidInt initial address for the epoch table (after all the state data)
  • epochs – Storage for directory epochs or epochs (when ndirs = 0)
  • iaa - Int initial segment file address
Ephemerides.SPKSegmentHeader5Method
SPKSegmentHeader5(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 5.

Ephemerides.SPKSegmentHeader8Type
SPKSegmentHeader8 <: AbstractSPKHeader

Header instance for SPK segments of type 8 and 12.

Fields

  • tstartFloat64 segment starting epoch, in TDB seconds since J2000
  • tlenFloat64 interval length, in seconds
  • orderInt interpolating polynomial degree
  • NInt group size
  • nInt number of states in the segment
  • iaa - Int initial segment file address
  • isevenBool true for even group size
  • typeInt SPK type (either 8 or 12)
Ephemerides.SPKSegmentHeader8Method
SPKSegmentHeader8(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 8 and 12.

Ephemerides.SPKSegmentHeader9Type
SPKSegmentHeader9 <: AbstractSPKHeader

Header instance for SPK segments of type 9 and 13.

Fields

  • nInt number of states in the segment
  • ndirsInt number of epoch directories
  • epochs – Storage for directory epochs or epochs (when ndirs = 0)
  • iaa - Int initial segment file address
  • etidInt initial address for the epoch table (after all the state data)
  • orderInt interpolating polynomial degree
  • NInt group size
  • isevenBool true for even group size
  • typeInt SPK type (either 9 or 13)
Ephemerides.SPKSegmentHeader9Method
SPKSegmentHeader9(daf::DAF, desc::DAFSegmentDescriptor)

Create the segment header for an SPK segment of type 9 and 13.

Ephemerides.SPKSegmentListType
SPKSegmentList

A container object to efficiently store all the different SPK segments that are contained within a single DAF file.


SPKSegmentList()

Initialises an empty SPKSegmentList object.

See also

See also Ephemerides.add_segment!

Ephemerides.SPKSegmentType1Type
SPKSegmentType1 <: AbstractSPKSegment

Segment instance for SPK segments of type 1 and 21, which contain Modified Difference Arrays (MDA). This data type is normally used for spacecraft whose ephemerides are produced by JPL's principal trajectory integrator DPTRAJ.

Fields

  • head – Segment header
  • cache – Segment cache

References

Ephemerides.SPKSegmentType1Method
SPKSegmentType1(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 1.

Ephemerides.SPKSegmentType14Method
SPKSegmentType14(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 14.

Ephemerides.SPKSegmentType15Method
SPKSegmentType15(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 15.

Ephemerides.SPKSegmentType17Type
SPKSegmentType17 <: AbstractSPKSegment

Segment instance for SPK segments of type 17.

Fields

  • head – Segment header
Note

SPK segments of type 17 do not require a cache because they do not extract any additional coefficients at runtime.

References

Ephemerides.SPKSegmentType17Method
SPKSegmentType17(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 17.

Ephemerides.SPKSegmentType19Type
SPKSegmentType19 <: AbstractSPKSegment

Segment instance for SPK segments of type 18 and 19. Type 18 segments are treated as special cases of a type 19 with a single mini-segment.

Fields

  • head – Segment header
  • cache – Segment cache

References

Ephemerides.SPKSegmentType19Method
SPKSegmentType19(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 19.

Ephemerides.SPKSegmentType2Type
SPKSegmentType2 <: AbstractSPKSegment

Segment instance for SPK segments of type 2 and 3, which contain Chebyshev polynomial coefficients for the position and/or state of the body as function of time. This data type is normally used for planet barycenters, and for satellites whose ephemerides are integrated.

Fields

  • head – Segment header
  • cache – Segment cache

References

Ephemerides.SPKSegmentType2Method
SPKSegmentType2(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 2.

Ephemerides.SPKSegmentType20Type
SPKSegmentType2 <: AbstractSPKSegment

Segment instance for SPK segments of type 20, which contain Chebyshev polynomial coefficients for the position and/or state of the body as function of time. This data type is normally used for planet barycenters, and for satellites whose ephemerides are integrated.

Fields

  • head – Segment header
  • cache – Segment cache

References

Ephemerides.SPKSegmentType20Method
SPKSegmentType20(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 2.

Ephemerides.SPKSegmentType5Method
SPKSegmentType2(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 5.

Ephemerides.SPKSegmentType8Method
SPKSegmentType8(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 8 and 12.

Ephemerides.SPKSegmentType9Method
SPKSegmentType9(daf::DAF, desc::DAFSegmentDescriptor)

Create the object representing an SPK segment of type 9 and 13.

Ephemerides.TwoBodyUniversalCacheType
TwoBodyUniversalCache

A container to store precomputed quantities required for the two-body propagation based on universal variables. Only the quantities that depend on the initial state are computed.

Ephemerides.add_spklinks!Method
add_spklinks!(table::SPKLinkTable, daf::DAF, fid::Int)

Insert in the input SPKLinkTable all the SPK or PCK links associated to the segment descriptors of the input DAF.

Ephemerides.arrayMethod
get_array(daf::DAF)

Return the byte content of the DAF file.

Ephemerides.axesMethod
axes(desc::DAFSegmentDescriptor)

Return the NAIF integer code for the reference axes. It is valid only for SPK files and defaults to -1 for PCKs.

Ephemerides.cacheMethod
cache(spk::AbstractSPKSegment)

Return the segment cache data.

Ephemerides.centerMethod
center(desc::DAFSegmentDescriptor)

Return the NAIF integer code for the reference object or axes for SPK and PCK, respectively.

Ephemerides.chebyshevFunction
chebyshev(cache::InterpCache, cₖ, t::Number, idx::Int, N::Int, ibuff::Int)

Evaluate a sum of Cheybyshev polynomials of the first kind at t using a recursive algorithm. It simultenously evalutes the 3 state components. idx is the index of the starting row (in 0-based notation) in the matrix of coefficients cₖ. ibuff is the index of the first free buffer.

Note

x is a re-work of the actual ascissa value that lies between [-1, 1]

See Also

See also ∂chebyshev, ∂²chebyshev and ∂³chebyshev

Ephemerides.commentMethod
get_comment(daf::DAF)

Return the comment written in the DAF comment section.

Ephemerides.descriptorMethod
descriptor(link::SPKLink)

Return the SPK/PCK segment descriptor associated to this link.

Ephemerides.descriptorsMethod
get_descriptors(daf::DAF)

Return the SPK/PCK segment descriptors contained in the DAF.

Ephemerides.element_idMethod
element_id(link::SPKLink)

Return the segment index in the inner SPK/PCK segment list.

Ephemerides.endianMethod
endian(head::DAFHeader)

Return true if the DAF file is in little-endian.

Ephemerides.ephem_get_axesMethod
ephem_get_axes(eph::EphemerisProvider)

Return a list of Frame IDs representing axes with available orientation data.

Ephemerides.ephem_get_pointsMethod
ephem_get_points(eph::EphemerisProvider)

Return a list of NAIFIds representing bodies with available ephemeris data.

Ephemerides.ephem_pck_recordsMethod
ephem_pck_records(eph::EphemerisProvider)

Return a list of EphemRecordPCK storing metadata relative to each (target, center) axes pairs in the loaded PCK kernels.

Ephemerides.ephem_pck_timespanMethod
ephem_pck_timespan(eph::EphemerisProvider)

Return the minimum and maximum time available in the PCK kernels loaded within eph, in TDB seconds since J2000, together with a continuity parameter defined as follows:

  • 0 no PCK data is available.
  • 1 the quantities of all axes are available for any time between the first and last time.
  • 2 the quantities of some axes are available on discontinuous time intervals between the first and last time.
  • 3 the quantities of each axis are available on a continuous time interval between the first and the last time, but not available for any time between the first and last time.

References

See Also

See also ephem_spk_timespan.

Ephemerides.ephem_rotation12Method
ephem_rotation12(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 12-elements orientation angles of one set of axes (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Note

For the orientation angles, it is not possible to automatically compute the reverse transformation , i.e., if the orientation of PA440 is defined with respect to the ICRF, it is not possible to compute the rotation from the PA440 to the ICRF with this routine.

Ephemerides.ephem_rotation3Method
ephem_rotation3(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 3-elements orientation angles of one set of axes (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Note

For the orientation angles, it is not possible to automatically compute the reverse transformation , i.e., if the orientation of PA440 is defined with respect to the ICRF, it is not possible to compute the rotation from the PA440 to the ICRF with this routine.

Ephemerides.ephem_rotation6Method
ephem_rotation6(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 6-elements orientation angles of one set of axes (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Note

For the orientation angles, it is not possible to automatically compute the reverse transformation , i.e., if the orientation of PA440 is defined with respect to the ICRF, it is not possible to compute the rotation from the PA440 to the ICRF with this routine.

Ephemerides.ephem_rotation9Method
ephem_rotation9(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 9-elements orientation angles of one set of axes (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Note

For the orientation angles, it is not possible to automatically compute the reverse transformation , i.e., if the orientation of PA440 is defined with respect to the ICRF, it is not possible to compute the rotation from the PA440 to the ICRF with this routine.

Ephemerides.ephem_spk_recordsMethod
ephem_spk_records(eph::EphemerisProvider)

Return a list of EphemRecordSPK storing metadata relative to each (target, center) object pairs in the loaded SPK kernels.

Ephemerides.ephem_spk_timespanMethod
ephem_spk_timespan(eph::EphemerisProvider)

Return the minimum and maximum time available in the SPK kernels loaded within eph, in TDB seconds since J2000, together with a continuity parameter defined as follows:

  • 0 no SPK data is available.
  • 1 the quantities of all bodies are available for any time between the first and last time.
  • 2 the quantities of some bodies are available on discontinuous time intervals between the first and last time.
  • 3 the quantities of each body are available on a continuous time interval between the first and the last time, but not available for any time between the first and last time.

References

See Also

See also ephem_pck_timespan.

Ephemerides.ephem_timescale_idMethod
ephem_timescale_id(eph::EphemerisProvider)

Retrieve a timescale ID associated with the ephemeris handler eph. It returns 1 for Barycentric Dynamical Time (TDB) and 2 for Barycentric Coordinate Time (TCB).

Warning

Ephemeris providers with mixed timescales are not supported. An error is thrown if in the ephemeris handler some segments are defined in TDB and some other segments in TCB.

Ephemerides.ephem_vector12Method
ephem_vector12(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 12-elements state of one body (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Ephemerides.ephem_vector3Method
ephem_vector3(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 3-elements state of one body (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Ephemerides.ephem_vector6Method
ephem_vector6(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 6-elements state of one body (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Ephemerides.ephem_vector9Method
ephem_vector9(eph::EphemerisProvider, from::Int, to::Int, time::Number)

Compute the 9-elements state of one body (to) relative to another (from) at time, expressed in TDB/TCB seconds since J2000, in accordance with the kernel timescale.

Ephemerides.factorMethod
factor(link::SPKLink)

Return the direction multiplicative factor.

Ephemerides.final_addressMethod
final_address(desc::DAFSegmentDescriptor)

Return the final address of the segment array in teh DAF.

Ephemerides.final_recordMethod
final_record(head::DAFHeader)

Return the record number of the final summary record in the DAF

Ephemerides.final_recordMethod
final_record(daf::DAF)

Return the record number of the final summary record in the DAF.

Ephemerides.final_timeMethod
final_time(desc::DAFSegmentDescriptor)

Return the final epoch of the interval for which ephemeris data are contained in the segment, in seconds since J2000.0

Ephemerides.final_timeMethod
final_time(link::SPKLink)

Return the final epoch of the interval for which ephemeris data are contained in the segment associated to this link, in seconds since J2000.0

Ephemerides.final_timesMethod
final_times(record::AbstractEphemRecord)

Recover the final times of each sub-window in which the ephemeris data of record is defined, expressed in TDB seconds since J2000

Ephemerides.free_addressMethod
free_address(head::DAFHeader)

Return the first free address in the file, i.e., the address at which the first element of the next array is to be added.

Ephemerides.free_addressMethod
free_address(daf::DAF)

Return the first free address in the file, i.e., the address at which the first element of the next array is to be added.

Ephemerides.get_bufferMethod
get_buffer(c::InterpCache, idx::int, x::Number)

Return the idx-th buffer from the corresponding DiffCache depending on the type of x.

Ephemerides.get_dafMethod
daf(eph::EphemerisProvider, id::Int)

Return the DAF file in the ephemeris provider at index id.

Ephemerides.get_dafMethod
daf(eph::EphemerisProvider)

Return the DAF files stored in the ephemeris provider.

Ephemerides.get_recordMethod
get_record(array::Vector{UInt8}, index::Integer)

Retrieve a whole DAF record at position index.

Ephemerides.get_segmentMethod
get_segment(list::SPKSegmentList, lid::Int, eid::Int)

Return the segment contained in the lid list at index eid.

Ephemerides.get_segment_boundariesMethod
get_segment_boundaries(desclist::Vector{DAFSegmentDescriptor})

Parse all the segment descriptors of a given (center, target) pair and return a set of initial and final times, in TDB seconds since J2000, representing all the time sub-windows in which the ephemeris data for this pair is defined.

Ephemerides.hermiteMethod
hermite(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Evalute a Hermite polynomial at x using a recursive algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.hermiteMethod
hermite(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Evalute a Hermite polynomial at x using a recursive algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δt is the length of the polynomial interval.

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also ∂hermite, ∂²hermite and ∂³hermite.

Ephemerides.initial_addressMethod
initial_address(desc::DAFSegmentDescriptor)

Return the initial address of the segment array in the DAF.

Ephemerides.initial_recordMethod
initial_record(head::DAFHeader)

Return the record number of the initial summary record in the DAF

Ephemerides.initial_timeMethod
initial_time(desc::DAFSegmentDescriptor)

Return the initial epoch of the interval for which ephemeris data are contained in the segment, in seconds since J2000.0

Ephemerides.initial_timeMethod
initial_time(link::SPKLink)

Return the initial epoch of the interval for which ephemeris data are contained in the segment associated to this link, in seconds since J2000.0

Ephemerides.initial_timesMethod
initial_times(record::AbstractEphemRecord)

Recover the initial times of each sub-window in which the ephemeris data of record is defined, expressed in TDB seconds since J2000

Ephemerides.is_little_endianMethod
is_little_endian(array::Vector{UInt8})

Return true if the array corresponds to the string indicating a little-endian format.

Ephemerides.lagrangeMethod
lagrange(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Recursively evaluate a Lagrange polynomial at x by using Neville's algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.lagrangeMethod
lagrange(cache::InterpCache, states, x, idx::Int, N::Int)

Recursively evaluate a Lagrange polynomial at x by using Neville's algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state and N is the number of coefficients of the polynomial.

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also ∂lagrange and ∂²lagrange.

Ephemerides.list_idMethod
list_id(link::SPKLink)

Return the index of the list containing the segments of the given SPK/PCK type.

Ephemerides.normalise_timeMethod
normalise_time(cache::SPKSegmentCache2, time::Number)

Transform time in an interval between [-1, 1] for compliance with Chebyshev polynomials.

Ephemerides.normalise_timeMethod
normalise_time(head::SPKSegmentHeader8, time::Number, index::Int)

Returned a normalised time that starts at 1 at the beginning of the interval.

Ephemerides.propagate_twobodyMethod
propagate_twobody(cache::TwoBodyUniversalCache, Δt::Number)

Propagate the state vector in cache of Δt using the universal variables formulation for Kepler's Equation and the Lagrange coefficients f and g.

Note

This routine is valid for any type of orbit and uses a bisection method to find the root of the universal variables Kepler's equation. The algorithm has been directly taken from the SPICE toolkit prob2b.f.

References

Ephemerides.reset_indexes!Method
reset_indexes!(cache::SPKSegmentCache18)

Reset the cache indexes to force the coefficients reload.

Ephemerides.reverse_linkMethod
reverse_link(link::SPKLink)

Reverse the sign, i.e. change the sign of the multiplicative factor, of the link.

Ephemerides.spk_linksMethod
spk_links(eph::EphemerisProvider)

Return the [SPKLinkTable] for the SPK segments.

Ephemerides.stumpffMethod
stumpff(x::Number, p::AbstractVector)

Compute Stumpff's functions from C₀ up to C₃ at x.

Note

This routine uses the trigonometrical expressions of the functions when the absolute value of x is greater or equal to 1. If that is not the case, the C₂ and C₃ functions are computed from a truncated expression of the Maclaurin series at order 11, which guarantees a higher precision and avoid overflow errors when x is null.

References

Ephemerides.summary_sizeMethod
summary_size(head::DAFHeader)

Compute the size of a single summary record of a DAF file, in bytes.

Ephemerides.targetMethod
target(desc::DAFSegmentDescriptor)

Return the NAIF integer code for the target object or axes for SPK and PCK, respectively.

Ephemerides.update_cache!Method
update_cache!(c::TwoBodyUniversalCache)

Update the precomputed values in the cache using the position and velocity in c.

Ephemerides.update_header!Method
update_header!(head::SPKSegmentHeader18, daf::DAF, iaa, faa, type)

Update the header of type 18 segments.

Ephemerides.∂chebyshevFunction
∂chebyshev(cache::InterpCache, cₖ, t::Number, idx::Int, N::Int, Δt, ibuff=1)

Evaluate a sum of Cheybyshev polynomials of the first kind and its derivative at t using a recursive algorithm. It simultenously evalutes the 3 state components. idx is the index of the starting row (in 0-based notation) in the matrix of coefficients cₖ. ibuff is the index of the first free buffer.

Note

x is a re-work of the actual ascissa value that lies between [-1, 1]

See Also

See also chebyshev, ∂²chebyshev and ∂³chebyshev

Ephemerides.∂hermiteMethod
∂hermite(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Evalute a Hermite polynomial and its derivative at x using a recursive algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.∂hermiteMethod
∂hermite(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Evalute a Hermite polynomial and its derivative at x using a recursive algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δt is the length of the polynomial interval.

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also hermite, ∂²hermite and ∂³hermite.

Ephemerides.∂lagrangeMethod
∂lagrange(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Recursively evaluate a Lagrange polynomial and its derivative at x by using Neville's algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.∂lagrangeMethod
∂lagrange(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Recursively evaluate a Lagrange polynomial and its derivative at x by using Neville's algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δtis the length of the polynomial interval

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also lagrange and ∂²lagrange

Ephemerides.∂²chebyshevFunction
∂²chebyshev(cache::InterpCache, cₖ, t::Number, idx::Int, N::Int, Δt, ibuff=1)

Evaluate a sum of Cheybyshev polynomials of the first kind and its two derivatives at t using a recursive algorithm. It simultenously evalutes the 3 state components. idx is the index of the starting row (in 0-based notation) in the matrix of coefficients cₖ. ibuff is the index of the first free buffer.

Note

x is a re-work of the actual ascissa value that lies between [-1, 1]

See Also

See also chebyshev, ∂chebyshev and ∂³chebyshev

Ephemerides.∂²hermiteMethod
∂²hermite(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Evalute a Hermite polynomial and its two derivatives at x using a recursive algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.∂²hermiteMethod
∂²hermite(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Evalute a Hermite polynomial and its two derivatives at x using a recursive algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δt is the length of the polynomial interval.

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also hermite, ∂hermite and ∂³hermite.

Ephemerides.∂²lagrangeMethod
∂²lagrange(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Recursively evaluate a Lagrange polynomial and its two derivatives at x by using Neville's algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

See Also

See also lagrange and ∂lagrange

Ephemerides.∂²lagrangeMethod
∂²lagrange(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Recursively evaluate a Lagrange polynomial and its two derivatives at x by using Neville's algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δtis the length of the polynomial interval

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also lagrange and ∂lagrange

Ephemerides.∂³chebyshevFunction
∂³chebyshev(cache::InterpCache, cₖ, t::Number, idx::Int, N::Int, Δt, ibuff=1)

Evaluate a sum of Cheybyshev polynomials of the first kind and its three derivatives at t using a recursive algorithm. It simultenously evalutes the 3 state components. idx is the index of the starting row (in 0-based notation) in the matrix of coefficients cₖ. ibuff is the index of the first free buffer.

Note

x is a re-work of the actual ascissa value that lies between [-1, 1]

See Also

See also chebyshev, ∂chebyshev and ∂²chebyshev

Ephemerides.∂³hermiteMethod
∂³hermite(cache::InterpCache, states, epochs, x, idx::Int, N::Int)

Evalute a Hermite polynomial and its three derivatives at x using a recursive algorithm. This function handles unequally-spaced polynomials, where the coefficients in states are interpolated at epochs.

Ephemerides.∂³hermiteMethod
∂³hermite(cache::InterpCache, states, x, idx::Int, N::Int, Δt::Number)

Evalute a Hermite polynomial and its three derivatives at x using a recursive algorithm. This function is valid only for equally-spaced polynomials. idx is the index of the desired state, N is the number of coefficients of the polynomial and Δt is the length of the polynomial interval.

Note

x is a re-work of the actual ascissa value that starts at 1

See Also

See also hermite, ∂hermite and ∂²hermite.

Ephemerides.∫chebyshevMethod
∫chebyshev(cache::InterpCache, cₖ, t::Number, N::Int, Δt, tlen, p₀)

Evaluate the integral of a sum of Cheybyshev polynomials of the first kind using a recursive algorithm. It simultenously evalutes the 3 state components. This function simultaneously computes both the Chebyshev polynomials as well as their integrals.

Ephemerides.∫chebyshevMethod
∫chebyshev(cache::InterpCache, cₖ, t::Number, N::Int, Δt, tlen, p₀)

Evaluate the integral of a sum of Cheybyshev polynomials of the first kind using a recursive algorithm. It simultenously evalutes the 3 state components. It assumes the Chebyshev polynomials up to degree N have already been computed and are stored in the buffer with index ibuff. tlen is the size of the record interval, Δt is the timescale factor, and p₀ is a vector containing the position coefficients at the midpoint (i.e., when the integral is evaluated at t = 0).

Note

x is a re-work of the actual ascissa value that lies between [-1, 1]