-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from nlesc-dirac/cspice
Cspice integration
- Loading branch information
Showing
27 changed files
with
1,020 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Installing CSPICE toolkit | ||
This document describes building the CSPICE toolkit to link with sagecal. | ||
|
||
# Download | ||
Get the latest [cspice.tar.Z](https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_64bit/packages/cspice.tar.Z) | ||
|
||
``` | ||
wget https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_64bit/packages/cspice.tar.Z | ||
``` | ||
|
||
Extract the files | ||
|
||
``` | ||
tar xvf cspice.tar.Z | ||
``` | ||
and there will be directory ```cspice```. | ||
|
||
# Copy files | ||
Copy all files in this directory to the ```cspice``` directory. | ||
|
||
``` | ||
cp makeall.sh mkprodct.sh pkgconfig.stub /full_path_to/cspice/ | ||
``` | ||
|
||
Note that ```/full_path_to/cspice/``` is the directory created by extracting cspice.tar.Z. | ||
|
||
# Build | ||
In the ```cspice``` directory, run | ||
|
||
``` | ||
bash ./makeall.sh | ||
``` | ||
and you are ready to link with sagecal. | ||
|
||
|
||
# Linking with sagecal | ||
Use cmake flag ```-DCSPICE_PREFIX=/full_path_to/cspice``` to point to ```cspice``` directory created after exctracting CSPICE. | ||
|
||
|
||
# Download kernels | ||
The following kernels are required. | ||
|
||
``` | ||
wget https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/pck00011.tpc | ||
wget https://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/naif0012.tls | ||
wget https://naif.jpl.nasa.gov/pub/naif/generic_kernels/fk/satellites/moon_de440_220930.tf | ||
wget https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/moon_pa_de440_200625.bpc | ||
``` | ||
|
||
Download them and save them in a directory, and set your environment variable ```CSPICE_KERNEL_PATH``` to point to this directory before running sagecal. | ||
|
||
zo 28 apr 2024 20:16:15 CEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
echo This script builds the SPICE delivery | ||
echo for the cspice package of the toolkit. | ||
echo | ||
echo The script must be executed from the | ||
echo cspice directory. | ||
echo | ||
cd src | ||
echo | ||
echo Creating cspice | ||
echo | ||
cd cspice | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating csupport | ||
echo | ||
cd csupport | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating brief_c | ||
echo | ||
cd brief_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating chrnos_c | ||
echo | ||
cd chrnos_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating ckbref_c | ||
echo | ||
cd ckbref_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating commnt_c | ||
echo | ||
cd commnt_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating cook_c | ||
echo | ||
cd cook_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating dskbrief_c | ||
echo | ||
cd dskbrief_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating dskexp_c | ||
echo | ||
cd dskexp_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating frmdif_c | ||
echo | ||
cd frmdif_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating inspkt_c | ||
echo | ||
cd inspkt_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating mkdsk_c | ||
echo | ||
cd mkdsk_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating mkspk_c | ||
echo | ||
cd mkspk_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating msopck_c | ||
echo | ||
cd msopck_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating spacit_c | ||
echo | ||
cd spacit_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating spkdif_c | ||
echo | ||
cd spkdif_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating spkmrg_c | ||
echo | ||
cd spkmrg_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating tobin_c | ||
echo | ||
cd tobin_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating toxfr_c | ||
echo | ||
cd toxfr_c | ||
../../mkprodct.sh | ||
cd .. | ||
echo | ||
echo Creating versn_c | ||
echo | ||
cd versn_c | ||
../../mkprodct.sh | ||
cd .. | ||
cd .. | ||
echo Toolkit Build Complete | ||
|
||
echo Making links | ||
cd ./lib && ln -s cspice.a libcspice.a && ln -s csupport.a libcsupport.a && cd .. | ||
echo Done making links | ||
|
||
echo Making pkgconfig file | ||
mkdir -p ./lib/pkgconfig && echo "prefix=\"`pwd`\"" > ./lib/pkgconfig/libcspice.pc && cat pkgconfig.stub >> ./lib/pkgconfig/libcspice.pc | ||
echo Done making pkgconfig | ||
|
||
echo All done |
Oops, something went wrong.