Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KStars
Commits
b2a51420
Commit
b2a51420
authored
Nov 12, 2013
by
Jasem Mutlaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUGS:327474
REVIEW:113409
parent
9b6b8aa7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
kstars/skyobjects/kscomet.cpp
kstars/skyobjects/kscomet.cpp
+10
-3
No files found.
kstars/skyobjects/kscomet.cpp
View file @
b2a51420
...
...
@@ -221,6 +221,14 @@ bool KSComet::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *
double
yh
=
r
*
(
sinN
*
cosvw
+
cosN
*
sinvw
*
cosi
);
double
zh
=
r
*
(
sinvw
*
sini
);
//the spherical ecliptic coordinates:
double
ELongRad
=
atan2
(
yh
,
xh
);
double
ELatRad
=
atan2
(
zh
,
r
);
helEcPos
.
longitude
.
setRadians
(
ELongRad
);
helEcPos
.
latitude
.
setRadians
(
ELatRad
);
setRsun
(
r
);
//xe, ye, ze are the Earth's heliocentric cartesian coords
double
cosBe
,
sinBe
,
cosLe
,
sinLe
;
Earth
->
ecLong
().
SinCos
(
sinLe
,
cosLe
);
...
...
@@ -236,13 +244,12 @@ bool KSComet::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *
zh
-=
ze
;
//Finally, the spherical ecliptic coordinates:
double
ELongRad
=
atan2
(
yh
,
xh
);
ELongRad
=
atan2
(
yh
,
xh
);
double
rr
=
sqrt
(
xh
*
xh
+
yh
*
yh
);
double
ELatRad
=
atan2
(
zh
,
rr
);
ELatRad
=
atan2
(
zh
,
rr
);
ep
.
longitude
.
setRadians
(
ELongRad
);
ep
.
latitude
.
setRadians
(
ELatRad
);
setRsun
(
r
);
setRearth
(
Earth
);
EclipticToEquatorial
(
num
->
obliquity
()
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment