Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/esa/pykep
Browse files Browse the repository at this point in the history
Conflicts:
	cmake_scripts/set_compiler_flags.cmake
  • Loading branch information
darioizzo committed May 6, 2015
2 parents b04b398 + cc9cb17 commit 278b2e4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion PyKEP/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# We detect the version and if more than 1.1.0 mplot3d is there
mver = matplotlib_ver.split('.')
mver = int(mver[0]) * 100 + int(mver[1]) * 10 + int(mver[2])
mver = int(mver[0]) * 100 + int(mver[1]) * 10
if mver >= 110:
__extensions__['mplot3d'] = True
del mver
Expand Down
28 changes: 16 additions & 12 deletions PyKEP/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# -*- coding: iso-8859-1 -*-
# We import the proteced symbols we use in this file
from PyKEP.core._core import _get_AU, _get_JR, _get_DAY2SEC, _get_DAY2YEAR, _get_DEG2RAD, _get_EARTH_VELOCITY, _get_G0, _get_MU_SUN, _get_RAD2DEG, _get_SEC2DAY
from PyKEP.core._core import _epoch_type
# We import symbols we use in this file
from PyKEP.core._core import epoch
# We import all symbols in the core namespace (also the ones we do not use in this file, but we still want in the namespace core)
from PyKEP.core._core import *

"""Defining astronomical constants defined in the keplerian_toolbox file astro_constants.h"""
AU = _core._get_AU()
JR = _core._get_JR()
DAY2SEC = _core._get_DAY2SEC()
DAY2YEAR = _core._get_DAY2YEAR()
DEG2RAD = _core._get_DEG2RAD()
EARTH_VELOCITY = _core._get_EARTH_VELOCITY()
G0 = _core._get_G0()
MU_SUN = _core._get_MU_SUN()
RAD2DEG = _core._get_RAD2DEG()
SEC2DAY = _core._get_SEC2DAY()

from PyKEP.core._core import _epoch_type
AU = _get_AU()
JR = _get_JR()
DAY2SEC = _get_DAY2SEC()
DAY2YEAR = _get_DAY2YEAR()
DEG2RAD = _get_DEG2RAD()
EARTH_VELOCITY = _get_EARTH_VELOCITY()
G0 = _get_G0()
MU_SUN = _get_MU_SUN()
RAD2DEG = _get_RAD2DEG()
SEC2DAY = _get_SEC2DAY()

EPOCH_TYPE = {
"jd": _epoch_type.JD,
Expand Down
13 changes: 2 additions & 11 deletions tests/load_spice_kernel_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ std::string stream(double input[6])

int main() {
// We start loading the four kernels shipped with the kep_toolbox
load_spice_kernel("C_G_1000012_2012_2017.bsp");
load_spice_kernel("pck00010.tpc");
load_spice_kernel("gm_de431.tpc");
int dim = 0;
Expand All @@ -72,20 +71,12 @@ int main() {

// We check if the kernels have been loaded correctly by extracting a few
// properties of mars
//bodvrd_c ( "MARS", "RADII", 3, &dim, radii );
//std::cout << "Mars Radius in km: " << std::setprecision(16) << radii[0] << std::endl ;
bodvrd_c ( "MARS", "RADII", 3, &dim, radii );
std::cout << "Mars Radius in km: " << std::setprecision(16) << radii[0] << std::endl ;

bodvrd_c ( "MARS", "GM", 1, &dim, mu_mars );
std::cout << "Mars gravity parameter in km: " << std::setprecision(16) << mu_mars[0] << std::endl << std::endl;

std::cout << "Computing ephemerides at: " << when;
std::cout << ", on the ecliptic J2000 reference frame as seen from the Sun" << std::endl << std::endl;

spkezr_c ( "CHURYUMOV-GERASIMENKO", spice_epoch, "ECLIPJ2000", "NONE", "SUN", state, &lt );
std::cout << "CHURYUMOV-GERASIMENKO: " << stream(state) << std::endl << std::endl;

std::cout << "You can check results manually on-line at http://ssd.jpl.nasa.gov/horizons.cgi" << std::endl;

return failed_c();
}

0 comments on commit 278b2e4

Please sign in to comment.