Skip to content

Commit

Permalink
Try both windows and unix, to see more about this error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fyellin committed Dec 7, 2023
1 parent 3c3eaea commit 9290a72
Show file tree
Hide file tree
Showing 7 changed files with 4,467 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run-name: Run Tests triggered by ${{ github.ref_type }} ${{ github.ref_name }} o
on:
workflow_dispatch:
push:
branches: [ tester ]
branches: [ testerx ]

jobs:
test:
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/run-tests2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Run Tests
run-name: Run Tests triggered by ${{ github.ref_type }} ${{ github.ref_name }} or ${{ github.triggering_actor }}

on:
workflow_dispatch:
push:
branches: [ testerx ]

jobs:
test:
name: Test cspyce
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Cache CSPICE source code
uses: actions/cache@v3
env:
cache-name: cspice-source-code
with:
path: cspice
# If setup.py is modified, we want to invalidate the cache. It means that there
# has been some change to the build process (a new Spice version??) and we want
# to make sure new sources are pulled.
key: ${{ matrix.os }}-${{ runner.arch }}-${{ env.cache-name }}-${{ hashFiles('setup.py') }}

- name: Generate cspyce
run: |
python setup.py generate
- name: Determine compiler version for non-Windows
if: matrix.os != 'windows-latest'
run: |
gcc --version > compiler-version.txt
cat compiler-version.txt
- name: Determine compiler version for Windows
if: matrix.os == 'windows-latest'
# We ask Python what it uses as the compiler. I can't find anything simpler.
run: |
python3 -c 'import distutils.ccompiler as cc; x = cc.new_compiler(); x.initialize(); print(x.cc)' > compiler-version.txt
cat compiler-version.txt
- name: Cache libraries
id: cache-libraries
uses: actions/cache@v3
env:
cache-name: cspice-libraries
with:
path: build/
# We need to rebuild the cspice library if the source files have changed,
# if there is some change in the build process, or if the compiler version
# has changed.
key: ${{ matrix.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ env.cache-name }}-${{ hashFiles('setup.py', 'compiler-version.txt', 'cspice/**/*') }}

- name: Compile C libraries
if: ${{ steps.cache-libraries.outputs.cache-hit != 'true' }}
run: |
python setup.py build_clib
- name: Mess up badly
ls -l cspice/
cc -I cspice/Darwin-arm64/include/ main.c cspice/Darwin-arm64/src/*.c -o main
./main
Binary file added kernels/de405s_littleendian.bsp
Binary file not shown.
150 changes: 150 additions & 0 deletions kernels/gm_de431.tpc
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
KPL/PCK

Assign mass parameters to planets & satellites.

Parameter "BODY000_GMLIST" contains list of included objects in
ASCENDING ID code order.

Source: DE-431 "ASTRO-VALUES", Folkner [1-10,199,299,301,399]
Jacobson satellite file release forms [non-Lunar satellites, planets]
SB431-BIG16 small-body integration perturber file

UNITS: km^3/s^2

Modification history:

DATE Who Change
----------- --- -------------------------------------------------------
2000-Nov-28 JDG Version 1.0
2002-Oct-17 JDG C-P-V values current
2003-Feb-26 JDG Pluto/Charon values consistent w/Jacobson PLU006
2003-Mar-13 JDG Update all satellite/planet GMs
2005-Mar-02 JDG Update Saturnians 601-609,699 to SAT192 values
2005-Mar-07 JDG Update Pluto system (901,999) to PLU009 values
2005-Mar-18 JDG Update 610-611, add 615-617 (SAT196)
2006-Apr-28 JDG Update 601-609, 699 (SAT242) and 401-402, 499 (MAR063)
2006-Sep-28 JDG Update 601-609, 699 (SAT252)
2008-Aug-11 JDG Revert to DE405 for Pluto system GM (9)
2008-Sep-05 JDG Over-ride DE405 "4" with 499+401+402.
2008-Sep-25 JDG Update 4,499,401,402 for MAR080.
2013-Jul-23 JDG Version 2.0
Updated to DE431 values (from DE405)
401-402,499 : MAR097
501-505,599 : JUP230
601-609,699 : SAT359
610-611,615-617: SAT357
701-705,799 : URA083
801,899 : NEP081
901-904,999 : PLU042 (902-904 newly added)
2000001-2000004: BIG16 (smb perturber file value)
2000006-2000007: BIG16
2000010 : BIG16
2000015-2000016: BIG16
2000029 : BIG16
2000052 : BIG16
2000065 : BIG16
2000087-2000088: BIG16
2000433 : Yeomans et al. (2000) Science v.289,pp.2085-2088
2000511 : BIG16
2000704 : BIG16
2013-Dec-30 JDG Updated for SAT360, PLU043
2014-Jan-08 JDG Updated for URA111/112.

Key:
JDG= Jon.D.Giorgini@jpl.nasa.gov

\begindata

BODY000_GMLIST = ( 1 2 3 4 5 6 7 8 9 10
199 299
301 399
401 402 499
501 502 503 504 505 599
601 602 603 604 605 606 607 608 609 610 611 699
701 702 703 704 705 799
801 899
901 902 903 904 999
2000001 2000002 2000003 2000004 2000006 2000007 2000010
2000015 2000016 2000029 2000052 2000065 2000087 2000088
2000433 2000511 2000704 )

BODY1_GM = ( 2.2031780000000021E+04 )
BODY2_GM = ( 3.2485859200000006E+05 )
BODY3_GM = ( 4.0350323550225981E+05 )
BODY4_GM = ( 4.2828375214000022E+04 )
BODY5_GM = ( 1.2671276480000021E+08 )
BODY6_GM = ( 3.7940585200000003E+07 )
BODY7_GM = ( 5.7945486000000080E+06 )
BODY8_GM = ( 6.8365271005800236E+06 )
BODY9_GM = ( 9.7700000000000068E+02 )
BODY10_GM = ( 1.3271244004193938E+11 )

BODY199_GM = ( 2.2031780000000021E+04 )
BODY299_GM = ( 3.2485859200000006E+05 )
BODY399_GM = ( 3.9860043543609598E+05 )
BODY499_GM = ( 4.282837362069909E+04 )
BODY599_GM = ( 1.266865349218008E+08 )
BODY699_GM = ( 3.793120749865224E+07 )
BODY799_GM = ( 5.793951322279009E+06 )
BODY899_GM = ( 6.835099502439672E+06 )
BODY999_GM = ( 8.696138177608748E+02 )

BODY301_GM = ( 4.9028000661637961E+03 )

BODY401_GM = ( 7.087546066894452E-04 )
BODY402_GM = ( 9.615569648120313E-05 )

BODY501_GM = ( 5.959916033410404E+03 )
BODY502_GM = ( 3.202738774922892E+03 )
BODY503_GM = ( 9.887834453334144E+03 )
BODY504_GM = ( 7.179289361397270E+03 )
BODY505_GM = ( 1.378480571202615E-01 )

BODY601_GM = ( 2.503522884661795E+00 )
BODY602_GM = ( 7.211292085479989E+00 )
BODY603_GM = ( 4.121117207701302E+01 )
BODY604_GM = ( 7.311635322923193E+01 )
BODY605_GM = ( 1.539422045545342E+02 )
BODY606_GM = ( 8.978138845307376E+03 )
BODY607_GM = ( 3.718791714191668E-01 )
BODY608_GM = ( 1.205134781724041E+02 )
BODY609_GM = ( 5.531110414633374E-01 )
BODY610_GM = ( 1.266231296945636E-01 )
BODY611_GM = ( 3.513977490568457E-02 )
BODY615_GM = ( 3.759718886965353E-04 )
BODY616_GM = ( 1.066368426666134E-02 )
BODY617_GM = ( 9.103768311054300E-03 )

BODY701_GM = ( 8.346344431770477E+01 )
BODY702_GM = ( 8.509338094489388E+01 )
BODY703_GM = ( 2.269437003741248E+02 )
BODY704_GM = ( 2.053234302535623E+02 )
BODY705_GM = ( 4.319516899232100E+00 )

BODY801_GM = ( 1.427598140725034E+03 )

BODY901_GM = ( 1.058799888601881E+02 )
BODY902_GM = ( 3.048175648169760E-03 )
BODY903_GM = ( 3.211039206155255E-03 )
BODY904_GM = ( 1.110040850536676E-03 )

BODY2000001_GM = ( 6.3130000000000003E+01 )
BODY2000002_GM = ( 1.3730000000000000E+01 )
BODY2000003_GM = ( 1.8200000000000001E+00 )
BODY2000004_GM = ( 1.7289999999999999E+01 )
BODY2000006_GM = ( 9.3000000000000005E-01 )
BODY2000007_GM = ( 8.5999999999999999E-01 )
BODY2000010_GM = ( 5.7800000000000002E+00 )
BODY2000015_GM = ( 2.1000000000000001E+00 )
BODY2000016_GM = ( 1.8100000000000001E+00 )
BODY2000029_GM = ( 8.5999999999999999E-01 )
BODY2000052_GM = ( 1.5900000000000001E+00 )
BODY2000065_GM = ( 9.1000000000000003E-01 )
BODY2000087_GM = ( 9.8999999999999999E-01 )
BODY2000088_GM = ( 1.0200000000000000E+00 )
BODY2000433_GM = ( 4.463E-4 )
BODY2000511_GM = ( 2.2599999999999998E+00 )
BODY2000704_GM = ( 2.1899999999999999E+00 )

\begintext

152 changes: 152 additions & 0 deletions kernels/naif0012.tls
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
KPL/LSK


LEAPSECONDS KERNEL FILE
===========================================================================

Modifications:
--------------

2016, Jul. 14 NJB Modified file to account for the leapsecond that
will occur on December 31, 2016.

2015, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2015.

2012, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2012.

2008, Jul. 7 NJB Modified file to account for the leapsecond that
will occur on December 31, 2008.

2005, Aug. 3 NJB Modified file to account for the leapsecond that
will occur on December 31, 2005.

1998, Jul 17 WLT Modified file to account for the leapsecond that
will occur on December 31, 1998.

1997, Feb 22 WLT Modified file to account for the leapsecond that
will occur on June 30, 1997.

1995, Dec 14 KSZ Corrected date of last leapsecond from 1-1-95
to 1-1-96.

1995, Oct 25 WLT Modified file to account for the leapsecond that
will occur on Dec 31, 1995.

1994, Jun 16 WLT Modified file to account for the leapsecond on
June 30, 1994.

1993, Feb. 22 CHA Modified file to account for the leapsecond on
June 30, 1993.

1992, Mar. 6 HAN Modified file to account for the leapsecond on
June 30, 1992.

1990, Oct. 8 HAN Modified file to account for the leapsecond on
Dec. 31, 1990.


Explanation:
------------

The contents of this file are used by the routine DELTET to compute the
time difference

[1] DELTA_ET = ET - UTC

the increment to be applied to UTC to give ET.

The difference between UTC and TAI,

[2] DELTA_AT = TAI - UTC

is always an integral number of seconds. The value of DELTA_AT was 10
seconds in January 1972, and increases by one each time a leap second
is declared. Combining [1] and [2] gives

[3] DELTA_ET = ET - (TAI - DELTA_AT)

= (ET - TAI) + DELTA_AT

The difference (ET - TAI) is periodic, and is given by

[4] ET - TAI = DELTA_T_A + K sin E

where DELTA_T_A and K are constant, and E is the eccentric anomaly of the
heliocentric orbit of the Earth-Moon barycenter. Equation [4], which ignores
small-period fluctuations, is accurate to about 0.000030 seconds.

The eccentric anomaly E is given by

[5] E = M + EB sin M

where M is the mean anomaly, which in turn is given by

[6] M = M + M t
0 1

where t is the number of ephemeris seconds past J2000.

Thus, in order to compute DELTA_ET, the following items are necessary.

DELTA_TA
K
EB
M0
M1
DELTA_AT after each leap second.

The numbers, and the formulation, are taken from the following sources.

1) Moyer, T.D., Transformation from Proper Time on Earth to
Coordinate Time in Solar System Barycentric Space-Time Frame
of Reference, Parts 1 and 2, Celestial Mechanics 23 (1981),
33-56 and 57-68.

2) Moyer, T.D., Effects of Conversion to the J2000 Astronomical
Reference System on Algorithms for Computing Time Differences
and Clock Rates, JPL IOM 314.5--942, 1 October 1985.

The variable names used above are consistent with those used in the
Astronomical Almanac.

\begindata

DELTET/DELTA_T_A = 32.184
DELTET/K = 1.657D-3
DELTET/EB = 1.671D-2
DELTET/M = ( 6.239996D0 1.99096871D-7 )

DELTET/DELTA_AT = ( 10, @1972-JAN-1
11, @1972-JUL-1
12, @1973-JAN-1
13, @1974-JAN-1
14, @1975-JAN-1
15, @1976-JAN-1
16, @1977-JAN-1
17, @1978-JAN-1
18, @1979-JAN-1
19, @1980-JAN-1
20, @1981-JUL-1
21, @1982-JUL-1
22, @1983-JUL-1
23, @1985-JUL-1
24, @1988-JAN-1
25, @1990-JAN-1
26, @1991-JAN-1
27, @1992-JUL-1
28, @1993-JUL-1
29, @1994-JUL-1
30, @1996-JAN-1
31, @1997-JUL-1
32, @1999-JAN-1
33, @2006-JAN-1
34, @2009-JAN-1
35, @2012-JUL-1
36, @2015-JUL-1
37, @2017-JAN-1 )

\begintext


Loading

0 comments on commit 9290a72

Please sign in to comment.