Skip to content

Commit

Permalink
fix the function name to barycentric for Sun special
Browse files Browse the repository at this point in the history
  • Loading branch information
henrysky committed Jan 9, 2025
1 parent 910b92f commit 4a5c744
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/modules/SolarSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ bool SolarSystem::loadPlanets(const QString& filePath)
else
{
static const QMap<QString, posFuncType>posfuncMap={
{ "sun_special", &get_sun_helio_coordsv},
{ "sun_special", &get_sun_barycentric_coordsv},
{ "mercury_special", &get_mercury_helio_coordsv},
{ "venus_special", &get_venus_helio_coordsv},
{ "earth_special", &get_earth_helio_coordsv},
Expand Down
9 changes: 8 additions & 1 deletion src/core/planetsephems/EphemWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,15 @@ void get_pluto_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* un
}
}

/* Return barycentric coordinates for the sun */
void get_sun_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
{
Q_UNUSED(unused)
xyz[0] =0.; xyz[1] =0.; xyz[2] =0.;
xyzdot[0]=0.; xyzdot[1]=0.; xyzdot[2]=0.;
}

/* Return barycentric coordinates for the sun */
void get_sun_barycentric_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
{
Q_UNUSED(unused)
get_planet_bary_coordsv(jd, xyz, xyzdot, EPHEM_SUN_ID);
Expand Down

0 comments on commit 4a5c744

Please sign in to comment.