Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SophyaExtLibs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
.
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
SOPHYA
SophyaExtLibs
Commits
b68f9666
Commit
b68f9666
authored
21 years ago
by
cmv
Browse files
Options
Downloads
Patches
Plain Diff
tests directs de xephem lib cmv 31/05/2003
parent
d2fae0d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
XephemAstroLib/Makefile
+4
-1
4 additions, 1 deletion
XephemAstroLib/Makefile
XephemAstroLib/testxephem.c
+40
-0
40 additions, 0 deletions
XephemAstroLib/testxephem.c
with
44 additions
and
1 deletion
XephemAstroLib/Makefile
+
4
−
1
View file @
b68f9666
...
...
@@ -4,7 +4,7 @@ all: libxastro.a
clean
:
rm
-f
libxastro.a
rm
-f
*
.o
rm
-f
*
.o
testxephem
install
:
if
[
!
-d
$(
EXTINCPATH
)
/XAstro
]
;
then
mkdir
$(
EXTINCPATH
)
/XAstro
;
fi
...
...
@@ -21,3 +21,6 @@ libxastro.a : $(OBJASTRO)
%.o
:
%.c
$(
COMPILE.c
)
-o
$@
$<
testxephem
:
testxephem.o
$(
LINK.c
)
-o
$@
$^
-L
$(
EXTLIBPATH
)
-lxastro
-lc
-lm
This diff is collapsed.
Click to expand it.
XephemAstroLib/testxephem.c
0 → 100644
+
40
−
0
View file @
b68f9666
/* Pour faire des tests de Xephem Librairie */
#include
<stdio.h>
#include
<stdlib.h>
#include
<math.h>
#include
<unistd.h>
#include
"P_.h"
#include
"astro.h"
#define R2D (180./PI)
int
main
(
int
narg
,
char
**
arg
)
{
int
year
=
1989
,
month
=
7
,
day
=
21
;
/* UTC*/
double
hour
=
12
.
5
;
int
npnum
=
8
,
pnum
[
8
]
=
{
MERCURY
,
VENUS
,
MARS
,
JUPITER
,
SATURN
,
URANUS
,
NEPTUNE
,
PLUTO
};
int
i
;
double
mjd
,
sunecl
,
sunecb
,
sundist
,
geodist
,
geoecl
,
geoecb
,
diamang
,
mag
,
msp
,
mdp
;
cal_mjd
(
month
,
day
+
hour
/
24
.,
year
,
&
mjd
);
printf
(
"date %d/%d/%d %gh -> mjd=%f
\n
"
,
day
,
month
,
year
,
hour
,
mjd
);
/* Soleil */
sunpos
(
mjd
,
&
geoecl
,
&
geodist
,
&
geoecb
);
printf
(
"Sun: geo ecl=%g ecb=%g dist=%g
\n
"
,
geoecl
*
R2D
,
geoecb
*
R2D
,
geodist
);
/* Lune */
moon
(
mjd
,
&
geoecl
,
&
geoecb
,
&
geodist
,
&
msp
,
&
mdp
);
printf
(
"Moon: geo ecl=%g ecb=%g dist=%g
\n
"
,
geoecl
*
R2D
,
geoecb
*
R2D
,
geodist
);
/* Planete */
printf
(
"--- Planets
\n
"
);
for
(
i
=
0
;
i
<
npnum
;
i
++
)
{
plans
(
mjd
,
pnum
[
i
],
&
sunecl
,
&
sunecb
,
&
sundist
,
&
geodist
,
&
geoecl
,
&
geoecb
,
&
diamang
,
&
mag
);
printf
(
"pnum=%d: sun ecl=%g ecb=%g dist=%g,"
,
pnum
[
i
],
sunecl
*
R2D
,
sunecb
*
R2D
,
sundist
);
printf
(
" geo ecl=%g ecb=%g dist=%g,"
,
geoecl
*
R2D
,
geoecb
*
R2D
,
geodist
);
printf
(
" diamang=%g
\"
/1UA mag=%g
\n
"
,
diamang
,
mag
);
}
exit
(
0
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment