Commit 4fb72a2e authored by fandongwei's avatar fandongwei
Browse files

jpl.405读取出错的原因是文件打开fopen是用"r"打开的,在windows下"r"是text,应该用"rb"打开

parent 89df5b5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# gcc -fPIC getObjInfo.c ephcom.c gnulliver.c -lm -o run_ephJPLDE405

ephJPLDE405: getObjInfo.c
ephJPLDE405: getObjInfo.c ephcom.c gnulliver.c
	gcc -fPIC getObjInfo.c ephcom.c gnulliver.c -lm -g -o ephJPLDE405 

# 默认目标
+6 −2
Original line number Diff line number Diff line
mac:
cc -fPIC -shared getObjInfo.c ephcom.c gnulliver.c -lm -o ephJPLDE405.dylib
cc -fPIC -shared getObjInfo.c ephcom.c gnulliver.c -lm -o ../data/ephJPLDE405.dylib
linux:
cc -fPIC -shared getObjInfo.c ephcom.c gnulliver.c -lm -o ephJPLDE405.so
 No newline at end of file
cc -fPIC -shared getObjInfo.c ephcom.c gnulliver.c -lm -o ../data/ephJPLDE405.so
windows dll:
gcc -fPIC -shared getObjInfo.c ephcom.c gnulliver.c -lm -o ../data/ephJPLDE405.dll
windows exe:
gcc -fPIC getObjInfo.c ephcom.c gnulliver.c -lm -g -o ephJPLDE405
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
FILE* infp = NULL ;

void loadEphFile(char* ehpFn){
   infp = fopen(ehpFn,"r");
   infp = fopen(ehpFn,"rb");
}

void freeEphFile(){
+1 −1
Original line number Diff line number Diff line
@@ -19,4 +19,4 @@ def locate_sun(jdTime=2459766.0, ephLib=None):


# clib = ctypes.CDLL('libc.dylib')
# file_ptr = clib.fopen(b"data/jpl.405", b"r")
# file_ptr = clib.fopen(b"data/jpl.405", b"rb")