Skip to content

Commit

Permalink
Merge pull request #11 from open-space-collective/dev@lucas
Browse files Browse the repository at this point in the history
[misc] Update Physics library support
  • Loading branch information
lucas-bremond authored Feb 11, 2019
2 parents 29a6678 + d3386d4 commit 5cbd3aa
Show file tree
Hide file tree
Showing 37 changed files with 34,043 additions and 29,241 deletions.
25 changes: 10 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ OPTION (BUILD_UNIT_TESTS "Build tests" ON)
OPTION (BUILD_PYTHON_BINDINGS "Build Python bindings." ON)
OPTION (BUILD_CODE_COVERAGE "Build code coverage" OFF)
OPTION (BUILD_DOCUMENTATION "Build documentation" OFF)
OPTION (INSTALL_DATA "Install data" ON)

################################################################################################################################################################

Expand Down Expand Up @@ -477,28 +476,24 @@ CONFIGURE_FILE (
INSTALL (FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION "${INSTALL_LIB}/${PROJECT_NAME}" COMPONENT "libraries")
INSTALL (FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION "${INSTALL_LIB}/${PROJECT_NAME}" COMPONENT "libraries")

### Uninstall

CONFIGURE_FILE (
"${CMAKE_MODULE_PATH}/UninstallTarget.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake"
IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET ("uninstall" COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake")

### Misc

INSTALL (FILES "LICENSE" DESTINATION ${INSTALL_ROOT} COMPONENT "documentation")

IF (INSTALL_DATA)
IF (EXISTS "${PROJECT_SOURCE_DIR}/share")

IF (EXISTS "${PROJECT_SOURCE_DIR}/share")
INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/share/" DESTINATION ${INSTALL_DATA} COMPONENT "data")

INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/share" DESTINATION ${INSTALL_DATA} COMPONENT "data")
ENDIF ()

ENDIF ()
### Uninstall

ENDIF ()
CONFIGURE_FILE (
"${CMAKE_MODULE_PATH}/UninstallTarget.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake"
IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET ("uninstall" COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake")

################################################################################################################################################################

Expand Down
2 changes: 1 addition & 1 deletion bindings/python/docs/Reference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
71 changes: 21 additions & 50 deletions bindings/python/docs/Reference/Access.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"\n",
"!{sys.executable} -m pip install --quiet LibraryCorePy\n",
"!{sys.executable} -m pip install --quiet LibraryIOPy\n",
"!{sys.executable} -m pip install --quiet LibraryMathematicsPy\n",
"!{sys.executable} -m pip install --quiet LibraryPhysicsPy\n",
"# !{sys.executable} -m pip install --quiet LibraryAstrodynamicsPy"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -40,31 +25,18 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: to-Python converter for library::physics::time::DateTime already registered; second conversion method ignored.\n",
" return f(*args, **kwds)\n",
"/opt/conda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: to-Python converter for library::math::obj::IntervalBase::Type already registered; second conversion method ignored.\n",
" return f(*args, **kwds)\n"
]
}
],
"outputs": [],
"source": [
"import Library.Core as Core\n",
"import Library.IO as IO\n",
"import Library.Mathematics as Mathematics\n",
"import Library.Physics as Physics\n",
"import Library.Astrodynamics as Astrodynamics"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -78,7 +50,6 @@
"Environment = Physics.Environment\n",
"\n",
"Trajectory = Astrodynamics.Trajectory\n",
"Model = Astrodynamics.Trajectory.Model\n",
"Orbit = Astrodynamics.Trajectory.Orbit\n",
"Pass = Astrodynamics.Trajectory.Orbit.Pass\n",
"Kepler = Astrodynamics.Trajectory.Orbit.Models.Kepler\n",
Expand Down Expand Up @@ -111,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -124,7 +95,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -140,7 +111,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -157,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -166,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -175,7 +146,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -184,7 +155,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -195,7 +166,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -204,7 +175,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -213,7 +184,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -238,7 +209,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -249,7 +220,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -258,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -280,7 +251,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -343,7 +314,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -356,7 +327,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -384,7 +355,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
26 changes: 4 additions & 22 deletions bindings/python/docs/Reference/Trajectory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,6 @@
"## Setup"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"\n",
"!{sys.executable} -m pip install --quiet LibraryCorePy\n",
"!{sys.executable} -m pip install --quiet LibraryIOPy\n",
"!{sys.executable} -m pip install --quiet LibraryMathematicsPy\n",
"!{sys.executable} -m pip install --quiet LibraryPhysicsPy\n",
"# !{sys.executable} -m pip install --quiet LibraryAstrodynamicsPy"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand All @@ -55,9 +40,6 @@
}
],
"source": [
"import Library.Core as Core\n",
"import Library.IO as IO\n",
"import Library.Mathematics as Mathematics\n",
"import Library.Physics as Physics\n",
"import Library.Astrodynamics as Astrodynamics"
]
Expand Down Expand Up @@ -609,7 +591,7 @@
"metadata": {},
"outputs": [],
"source": [
"coe.getMeanMotion(Environment.Objects.CelestialBodies.Earth.GravitationalConstant) ;"
"coe.getMeanMotion(Environment.Objects.CelestialBodies.Earth.GravitationalParameter) ;"
]
},
{
Expand All @@ -618,7 +600,7 @@
"metadata": {},
"outputs": [],
"source": [
"coe.getOrbitalPeriod(Environment.Objects.CelestialBodies.Earth.GravitationalConstant) ;"
"coe.getOrbitalPeriod(Environment.Objects.CelestialBodies.Earth.GravitationalParameter) ;"
]
},
{
Expand All @@ -627,7 +609,7 @@
"metadata": {},
"outputs": [],
"source": [
"# coe.getCartesianState(Physics.Environment.Objects.CelestialBodies.Earth.GravitationalConstant, Frame.GCRF()) ;"
"# coe.getCartesianState(Physics.Environment.Objects.CelestialBodies.Earth.GravitationalParameter, Frame.GCRF()) ;"
]
},
{
Expand Down Expand Up @@ -1087,7 +1069,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
12 changes: 12 additions & 0 deletions bindings/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
################################################################################################################################################################

# @project Library/Astrodynamics
# @file requirements.txt
# @author Lucas Brémond <lucas@loftorbital.com>
# @license Apache License 2.0

################################################################################################################################################################

LibraryPhysicsPy>=0.2.0

################################################################################################################################################################
2 changes: 1 addition & 1 deletion bindings/python/src/LibraryAstrodynamicsPy/Trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline void LibraryAstrodynamicsPy_Trajectory ( )

.def("isDefined", &Trajectory::isDefined)

.def("accessModel", &Trajectory::accessModel, return_value_policy<reference_existing_object>())
// .def("accessModel", &Trajectory::accessModel, return_value_policy<reference_existing_object>())

.def("getStateAt", &Trajectory::getStateAt)
.def("getStatesAt", &Trajectory::getStatesAt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inline void LibraryAstrodynamicsPy_Trajectory_Model ( )

using library::astro::trajectory::Model ;

scope in_Model = class_<Model, boost::noncopyable>("Model", no_init)
scope in_Model = class_<Model, boost::noncopyable>("TrajectoryModel", no_init)

.def(self == self)
.def(self != self)
Expand Down
Loading

0 comments on commit 5cbd3aa

Please sign in to comment.