Skip to content
Snippets Groups Projects
Commit 78408cb0 authored by Roberto Susino's avatar Roberto Susino
Browse files

Add management of predictive SPICE metakernel

parent 6f9f0908
Branches
Tags v1.0.3
No related merge requests found
pro load_spice_kernels, path, unload = unload, kernel_list = kernel_list, kernel_version = kernel_version pro load_spice_kernels, path, unload = unload, kernel_list = kernel_list, kernel_version = kernel_version
if keyword_set(unload) then cspice_kclear else begin if keyword_set(unload) then cspice_kclear else begin
metakernel = path + '/mk/solo_ANC_soc-flown-mk.tm'
openr, in, metakernel, /get_lun
kernel_list = list() kernel_list = list()
while ~ eof(in) do begin
openr, unit, path + '/mk/solo_ANC_soc-pred-mk.tm', /get
while ~ eof(unit) do begin
line = '' line = ''
readf, in, line readf, unit, line
if line.contains('$KERNELS', /fold) then begin if line.contains('$KERNELS', /fold) then begin
line = line.replace('$KERNELS', path) line = line.replace('$KERNELS', path)
line = line.replace("'", '') line = line.replace("'", '')
...@@ -17,6 +17,23 @@ pro load_spice_kernels, path, unload = unload, kernel_list = kernel_list, kernel ...@@ -17,6 +17,23 @@ pro load_spice_kernels, path, unload = unload, kernel_list = kernel_list, kernel
endif endif
endwhile endwhile
close, /all close, /all
openr, unit, path + '/mk/solo_ANC_soc-flown-mk.tm', /get
while ~ eof(unit) do begin
line = ''
readf, unit, line
if line.contains('$KERNELS', /fold) then begin
line = line.replace('$KERNELS', path)
line = line.replace("'", '')
kernel_list.add, line.trim()
endif
if line.contains('SKD_VERSION', /fold) then begin
fields = stregex(line, ".*'([a-z_0-9]*)'", /extract, /sub)
kernel_version = fields[1]
endif
endwhile
close, /all
foreach item, kernel_list do cspice_furnsh, item foreach item, kernel_list do cspice_furnsh, item
endelse endelse
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment