Commit 39d1e731 authored by Zhang Xin's avatar Zhang Xin
Browse files

Merge branch 'fandongwei' into 'master'

Fandongwei

See merge request zhangxin/csst_survey_sim!3
parents d90bb61f f845d9a7
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+6 −0
Original line number Diff line number Diff line
build/
data/
*.egg-info/
dist/
.VSCodeCounter/
__pycache__/

.vscode/launch.json

0 → 100644
+26 −0
Original line number Diff line number Diff line
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "debug csst_survey_sim",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/survey_sim/ephemeris/jplFileReader/ephJPLDE405",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/survey_sim/ephemeris/jplFileReader",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "gdb",
            "preLaunchTask": "make-ephJPLDE405",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
        },
    ]
}
 No newline at end of file

.vscode/tasks.json

0 → 100644
+18 −0
Original line number Diff line number Diff line
{
    "tasks": [
        {
            "label": "make-ephJPLDE405",
            "type": "shell",
            "command": "make",
            "args": [
                "-C",
                "${workspaceFolder}/survey_sim/ephemeris/jplFileReader"
            ],
            "group": {
              "kind": "build",
              "isDefault": true
            }
        },
    ],
    "version": "2.0.0"
}
 No newline at end of file
+8 −2
Original line number Diff line number Diff line
@@ -7,14 +7,20 @@ def importEphemerisLib():
    jplDataFn = str(
        pkg_resources.files("survey_sim.ephemeris.data").joinpath("jpl.405")
    )
    #
    libFn = str(
        pkg_resources.files("survey_sim.ephemeris.data").joinpath("ephJPLDE405.dylib")
    )
    if platform.system() == "Linux":
    plt = platform.system()
    if plt == "Linux":
        libFn = str(
            pkg_resources.files("survey_sim.ephemeris.data").joinpath("ephJPLDE405.so")
        )

    elif plt == "Windows":
        libFn = str(
            pkg_resources.files("survey_sim.ephemeris.data").joinpath("ephJPLDE405.dll")
        )
    #
    d = ctypes.CDLL(libFn)
    d.loadEphFile.argtypes = [ctypes.c_char_p]
    d.loadEphFile(str.encode(jplDataFn))
+132 KiB

File added.

No diff preview for this file type.

Loading