SPICEApplications.jl

Note

The SPICEApplications module is not included within SPICE. To access the functions documented on this page, install SPICEApplications using Julia's package manager: Pkg.install("SPICEApplications").

The JPL SPICE Toolkit provides executables for interacting with SPICE kernels, such as mkspk, brief, and others. SPICEApplications.jl provides idiomatic Julia interfaces to these executables, which themselves are packaged by CSPICE_jll.jl.

Usage

Each executable can be called through its corresponding function without arguments, or programatically using function arguments. For example, the SPICE Toolkit's BRIEF program prints the description of a provided kernel. When the brief executable is called without arguments, it prints its "help" text; this can be replicated by calling SPICEApplications.brief() without arguments. Alternatively, you can pass the kernel that you want to inspect as a positional argument: brief(kernel_file).

All SPICE Toolkit executables are documented within the SPICE Toolkit Documentation.

julia> using SPICEApplications
julia> kernel = download("https://naif.jpl.nasa.gov/pub/naif/CASSINI/kernels/spk/000202R_SK_V1P32_V2P12.bsp")"/tmp/jl_rejuxwlcdC"
julia> brief(kernel); BRIEF -- Version 4.1.0, September 17, 2021 -- Toolkit Version N0067 Summary for: /tmp/jl_rejuxwlcdC Body: CASSINI (-82) Start of Interval (ET) End of Interval (ET) ----------------------------- ----------------------------- 1998 MAY 28 21:23:03.184 1999 JUL 06 16:01:04.183

Example

For a concrete usage example, see how SPICEApplications is used to generate docstrings for SPICEKernels.jl.

Reference

SPICEApplications.SPICEApplicationsModule

Call all SPICE Utilities from within Julia!

Warning

This package is not affiliated with or endorsed by NASA, JPL, Caltech, or any other organization! This is an independently written package by an astrodynamics hobbyist.

Extended help

README

Stable Dev

SPICEApplications

Generate ephemeris kernel files using NASA JPL's SPICEApplications program, all from within Julia!

Installation

Choose one of the following two lines!

import Pkg; Pkg.add("SPICEApplications");
]add SPICEApplications # in Julia's REPL

Documentation

The documentation for SPICEApplications.jl is hosted within the SPICE.jl documentation.

Credits

NASA JPL developed and maintains the NAIF SPICE Toolkit, including SPICEApplications. Helge Eichhorn developed and maintains SPICE.jl, as well as the Julia wrappers around the SPICE Toolkit.

License

Exports

Imports

  • Base
  • Core
  • DocStringExtensions
source
SPICEApplications.briefMethod
brief(
    file;
    tabular,
    single,
    centers,
    utc,
    utcdoy,
    etsec,
    sec,
    min,
    hour,
    day,
    bytime,
    bycoverage,
    byid,
    byname,
    body,
    center,
    at,
    from,
    to,
    listfile,
    help,
    version,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

BRIEF is a command-line utility program that displays a contents and time coverage summary for one or more binary SPK or binary PCK files.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
tabular-tDisplay summary in a tabular format
single-aTreat all files as a single file
centers-cDisplays centers of motion/relative-to frames
utc-utcDisplay times in UTC calendar date format (needs LSK)
utcdoy-utcdoyDisplay times in UTC day-of-year format (needs LSK)
etsec-etsecDisplay times as ET seconds past J2000
sec-secDisplay times "rounded inward" to second
min-minDisplay times "rounded inward" to minute
hour-hourDisplay times "rounded inward" to hour
day-dayDisplay times "rounded inward" to day
bytime-sDisplay summary sorted by start time for each body/frame
bycoverage-gDisplay summary grouped by coverage
byid-nDisplay bodies/frames using numeric id-codes
byname-oDisplay summary ordered by body/frame name
body-sb[bod]Display summary for body [bod]
center-sc[cen]Display summary for center of motion/relative-to frame [cen]
at-at [time]Display summary if coverage contains epoch [time]
from-from [beg]Display summary if coverage contains interval [beg]:[end]
to-to [end]Display summary if coverage contains interval [beg]:[end]
listfile-f [list]Summarize kernels listed in the [list] file
help-hDisplay help
version-vDisplay version
source
SPICEApplications.chronosMethod
chronos(
    file;
    from,
    fromtype,
    to,
    totype,
    format,
    time,
    sc,
    center,
    landingtime,
    sol1index,
    nolabel,
    trace,
    help,
    usage,
    template,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

CHRONOS is a command-line program that converts between several time systems and time formats.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
from-FROM <arg>"from" time system
fromtype-FROMTYPE <arg>"from" time system type
to-TO <arg>"to" time system
totype-TOTYPE <arg>"to" time system type
format-FORMAT <arg>output time format picture
time-TIME <time>input time
sc-SC <ID>sc ID
center-CENTER <ID>central body ID
landingtime-LANDINGTIME <time>UTC time of the landing
sol1index-SOL1INDEX <index>index of the first SOL
nolabel-NOLABEL
trace-TRACE
help-HELPdisplay help
usage-USAGEdisplay usage
template-TEMPLATEdisplay setup file template
source
SPICEApplications.ckbriefMethod
ckbrief(
    file;
    dump,
    boundaries,
    relframes,
    idframes,
    tabular,
    single,
    bycoverage,
    utc,
    utcdoy,
    sclk,
    dpsclk,
    id,
    summarize,
    help,
    version,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

CKBRIEF is a command-line utility program that displays a contents and time coverage summary for one or more binary CK files.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
dump-dumpdisplay interpolation intervals boundaries
boundaries-nmdisplay segment boundaries
relframes-reldisplay relative-to frames
idframes-ndisplay frames associated with structure IDs
tabular-tdisplay summary in a tabular format
single-atreat all files as a single file
bycoverage-gdisplay summary grouped by coverage
utc-utcdisplay times in UTC calendar date format
utcdoy-utcdoydisplay times in UTC day-of-year format
sclk-sclkdisplay times as SCLK strings
dpsclk-dpsclkdisplay times as SCLK ticks
id[ID]display summmary for structure with [ID]
summarize-fsummarize kernels listed in the [list] file
help-hdisplay help
version-vdisplay version
source
SPICEApplications.commntFunction
commnt(; ...)
commnt(kernelfile; ...)
commnt(
    kernelfile,
    commentfile;
    add,
    extract,
    read,
    delete,
    help,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

COMMNT is a command-line program that reads, adds, extracts, or deletes comments from SPICE binary kernel files.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
add-aadd comments to binary kernel
extract-eextract comments from a binary kernel
read-rread the comments in a binary kernel
delete-ddelete the comments from the binary kernel
help-hdisplay the help message
source
SPICEApplications.dskbriefMethod
dskbrief(
    file;
    single,
    gaps,
    extended,
    timebounds,
    bysegment,
    full,
    sigdigs,
    version,
    help,
    usage,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

DSKBRIEF is a command-line utility program that displays a summary of the spatial coverage and additional attributes of one or more binary Digital Shape Kernel (DSK) files.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
single-atreat all DSK files as a single file
gaps-gapsdisplay coverage gaps (aplies only when -a is used)
extended-extdisplay extended summaries: these include data type, data class, and time bounds
timebounds-tgrequire segment time bounds to match when grouping segments
full-fulldisplay a detailed summary for each segment, including data-type-specific parameters
sigdigs-d <n>display n significant digits of floating point values
version-vdisplay the version of the program
help-hdisplay help text
usage-udisplay usage text
source
SPICEApplications.dskexpMethod
dskexp(
;
    dsk,
    text,
    format,
    precision,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

DSKEXP is a command-line program that exports data from DSK files to text files.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
dsk-dsk <arg>DSK kernel
text-text <name>output name
format-format <arg>MKSDK format code/name
precision-prec <number>number of vertex mantissa digits
source
SPICEApplications.frmdiffMethod
frmdiff(
;
    kernels,
    from1,
    to1,
    frame1,
    supporting_kernels1,
    from2,
    to2,
    frame2,
    supporting_kernels2,
    angular,
    angularframe,
    start,
    stop,
    numpoints,
    timestep,
    timeformat,
    report,
    rotation,
    units,
    sigdigs,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

FRMDIFF is a program that samples orientation of a reference frame known to SPICE or computes differences between orientations of two reference frames known to SPICE, and either displays this orientation or these differences, or shows statistics about it or them.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
kernels-k <kernels>supporting kernel(s) name(s)
from1-f1 <arg>first "from" frame, name or ID
to1-t1 <arg>first "to" frame, name or ID
frame1-c1 <arg>first frame for coverage look up, name or ID
supporting_kernels1-k1 <kernels>additional supporting kernel(s) for first file
from2-f2 <arg>second "from" frame, name or ID
to2-t2 <arg>second "to" frame, name or ID
frame2-c2 <arg>second frame for coverage look up, name or ID
supporting_kernels2-k2 <kernels>additional supporting kernel(s) for second file
angular`-a <yesno>`
angularframe`-m <fromto>`
start-b <start>interval start time
stop-e <stop>interval stop time
numpoints-n <number>number of points 1 to 1000000 (default: 1000)
timestep-s <time step>time step in seconds
timeformat-f <format>time format: one of et, sclk, sclkd, ticks, picture_for_TIMOUT, (default: et)
report-t <report options>report options: basic, stats, dumpaa, dumpm, dumpqs, dumpqo, dumpea, dumpc, dumpg
rotation-o <order>rotation axes order (default: z y x)
units-x <units>units for output angles (only for -t dumpaa and -t dumpea)
sigdigs-d <num>number of significant digits (6 to 17, default 14)
source
SPICEApplications.inspektMethod
inspekt(; stdout, stderr, stdin, append, wait)

INSPEKT is an interactive program that examines the contents of an events component (ESQ) of an E-kernel.

source
SPICEApplications.mkdskMethod
mkdsk(
;
    setup,
    input,
    output,
    help,
    template,
    usage,
    version,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

MKDSK is a utility program that creates a SPICE Digital Shape Kernel (DSK) file from a text file containing shape data for an extended object.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
setup-setup <filename>setup file name
input-input <filename>input shape data file name
output-output <filename>output DSK file name
help-h,-helpdisplay help
template-t,-templatedisplay template
usage-u,-usagedisplay usage
version-v,-versiondisplay version
source
SPICEApplications.mkspkMethod
mkspk(
;
    setup,
    input,
    output,
    add,
    usage,
    help,
    template,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

MKSPK is a program that creates an SPK file from a text file containing trajectory information.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
setup-setup <filename>setup file name
input-input <filename>input shape data file name
output-output <filename>output DSK file name
add-appendappend; output file must be new
help-h,-helpdisplay help
template-t,-templatedisplay template
usage-u,-usagedisplay usage
source
SPICEApplications.msopckMethod
msopck(
;
    setup,
    input,
    output,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

MSOPCK is a command-line program that converts attitude data provided in a text file as UTC, SCLK, or ET-tagged quaternions, Euler angles, or matrices, optionally accompanied by angular velocities, into a type 1, 2, or 3 SPICE C-kernel.

source
SPICEApplications.spacitMethod
spacit(; stdout, stderr, stdin, append, wait)

SPACIT is an interactive program that converts kernels in transfer format to binary format, converts binary kernels to transfer format, and summarizes the contents of binary kernels.

source
SPICEApplications.spkdiffMethod
spkdiff(
;
    kernels,
    body1,
    center1,
    frame1,
    supporting_kernels1,
    body2,
    center2,
    frame2,
    supporting_kernels2,
    start,
    stop,
    timestep,
    numstates,
    timeformat,
    sigdigs,
    report,
    stdout,
    stderr,
    stdin,
    append,
    wait
)

SPKDIFF provides means for comparing the trajectories of two bodies or sampling the trajectory of a single body using data from SPICE kernels.

Extended Help

Warning

All descriptions below were manually parsed from the commandline program's help/usage output.

ArgumentEquivalentDescription
kernels-k <kernels>supporting kernel(s) name(s)
body1-b1 <arg>first body name or ID
center1-c1 <arg>first center name or ID
frame1-r1 <arg>first reference frame name
supporting_kernels1-k1 <kernels>additional supporting kernel(s) for first SPK
body2-b2 <arg>second body name or ID
center2-c2 <arg>second center name or ID
frame2-r2 <arg>second reference frame name
supporting_kernels2-k2 <kernels>additional supporting kernel(s) for second SPK
start-b <start>interval start time
stop-e <stop>interval stop time
timestep-s <time step>time step in seconds
numstates-n <number>number of states: 2 to 1000000 (default: 1000)
timeformat-f <arg>output time format (default: TDB seconds past J2000)
sigdigs1-d <arg>number of significant digits: 6 to 17 (default: 14)
report-t <type>report type: basic,stats,dump,dumpvf,dumpc,dumpg (def.: basic,dump)
source
SPICEApplications.spkmergeFunction
spkmerge(; ...)
spkmerge(commandfile; stdout, stderr, stdin, append, wait)

SPKMERGE is a program that subsets or merges one or more SPK files into a single SPK file.

source
SPICEApplications.tobinFunction
tobin(; ...)
tobin(kernelfile; stdout, stderr, stdin, append, wait)

TOBIN is a command-line program that converts transfer format SPK, CK, PCK, DSK and EK files to binary format.

source
SPICEApplications.toxfrFunction
toxfr(; ...)
toxfr(kernelfile; stdout, stderr, stdin, append, wait)

TOXFR is a command-line program that converts binary format SPK, CK, PCK, DSK and EK files to transfer format.

source