Skip to content

Commit 5cbd3aa

Browse files
Merge pull request #11 from open-space-collective/dev@lucas
[misc] Update Physics library support
2 parents 29a6678 + d3386d4 commit 5cbd3aa

File tree

37 files changed

+34043
-29241
lines changed

37 files changed

+34043
-29241
lines changed

CMakeLists.txt

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ OPTION (BUILD_UNIT_TESTS "Build tests" ON)
2929
OPTION (BUILD_PYTHON_BINDINGS "Build Python bindings." ON)
3030
OPTION (BUILD_CODE_COVERAGE "Build code coverage" OFF)
3131
OPTION (BUILD_DOCUMENTATION "Build documentation" OFF)
32-
OPTION (INSTALL_DATA "Install data" ON)
3332

3433
################################################################################################################################################################
3534

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

480-
### Uninstall
481-
482-
CONFIGURE_FILE (
483-
"${CMAKE_MODULE_PATH}/UninstallTarget.cmake.in"
484-
"${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake"
485-
IMMEDIATE @ONLY)
486-
487-
ADD_CUSTOM_TARGET ("uninstall" COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake")
488-
489479
### Misc
490480

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

493-
IF (INSTALL_DATA)
483+
IF (EXISTS "${PROJECT_SOURCE_DIR}/share")
494484

495-
IF (EXISTS "${PROJECT_SOURCE_DIR}/share")
485+
INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/share/" DESTINATION ${INSTALL_DATA} COMPONENT "data")
496486

497-
INSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/share" DESTINATION ${INSTALL_DATA} COMPONENT "data")
487+
ENDIF ()
498488

499-
ENDIF ()
489+
### Uninstall
500490

501-
ENDIF ()
491+
CONFIGURE_FILE (
492+
"${CMAKE_MODULE_PATH}/UninstallTarget.cmake.in"
493+
"${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake"
494+
IMMEDIATE @ONLY)
495+
496+
ADD_CUSTOM_TARGET ("uninstall" COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/UninstallTarget.cmake")
502497

503498
################################################################################################################################################################
504499

bindings/python/docs/Reference.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"name": "python",
3939
"nbconvert_exporter": "python",
4040
"pygments_lexer": "ipython3",
41-
"version": "3.6.5"
41+
"version": "3.6.8"
4242
}
4343
},
4444
"nbformat": 4,

bindings/python/docs/Reference/Access.ipynb

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,7 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": 1,
20-
"metadata": {},
21-
"outputs": [],
22-
"source": [
23-
"import sys\n",
24-
"\n",
25-
"!{sys.executable} -m pip install --quiet LibraryCorePy\n",
26-
"!{sys.executable} -m pip install --quiet LibraryIOPy\n",
27-
"!{sys.executable} -m pip install --quiet LibraryMathematicsPy\n",
28-
"!{sys.executable} -m pip install --quiet LibraryPhysicsPy\n",
29-
"# !{sys.executable} -m pip install --quiet LibraryAstrodynamicsPy"
30-
]
31-
},
32-
{
33-
"cell_type": "code",
34-
"execution_count": 1,
19+
"execution_count": 3,
3520
"metadata": {},
3621
"outputs": [],
3722
"source": [
@@ -40,31 +25,18 @@
4025
},
4126
{
4227
"cell_type": "code",
43-
"execution_count": 2,
28+
"execution_count": 4,
4429
"metadata": {},
45-
"outputs": [
46-
{
47-
"name": "stderr",
48-
"output_type": "stream",
49-
"text": [
50-
"/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",
51-
" return f(*args, **kwds)\n",
52-
"/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",
53-
" return f(*args, **kwds)\n"
54-
]
55-
}
56-
],
30+
"outputs": [],
5731
"source": [
58-
"import Library.Core as Core\n",
59-
"import Library.IO as IO\n",
6032
"import Library.Mathematics as Mathematics\n",
6133
"import Library.Physics as Physics\n",
6234
"import Library.Astrodynamics as Astrodynamics"
6335
]
6436
},
6537
{
6638
"cell_type": "code",
67-
"execution_count": 3,
39+
"execution_count": 8,
6840
"metadata": {},
6941
"outputs": [],
7042
"source": [
@@ -78,7 +50,6 @@
7850
"Environment = Physics.Environment\n",
7951
"\n",
8052
"Trajectory = Astrodynamics.Trajectory\n",
81-
"Model = Astrodynamics.Trajectory.Model\n",
8253
"Orbit = Astrodynamics.Trajectory.Orbit\n",
8354
"Pass = Astrodynamics.Trajectory.Orbit.Pass\n",
8455
"Kepler = Astrodynamics.Trajectory.Orbit.Models.Kepler\n",
@@ -111,7 +82,7 @@
11182
},
11283
{
11384
"cell_type": "code",
114-
"execution_count": 4,
85+
"execution_count": 9,
11586
"metadata": {},
11687
"outputs": [],
11788
"source": [
@@ -124,7 +95,7 @@
12495
},
12596
{
12697
"cell_type": "code",
127-
"execution_count": 5,
98+
"execution_count": 10,
12899
"metadata": {},
129100
"outputs": [],
130101
"source": [
@@ -140,7 +111,7 @@
140111
},
141112
{
142113
"cell_type": "code",
143-
"execution_count": 6,
114+
"execution_count": 11,
144115
"metadata": {},
145116
"outputs": [],
146117
"source": [
@@ -157,7 +128,7 @@
157128
},
158129
{
159130
"cell_type": "code",
160-
"execution_count": 7,
131+
"execution_count": 12,
161132
"metadata": {},
162133
"outputs": [],
163134
"source": [
@@ -166,7 +137,7 @@
166137
},
167138
{
168139
"cell_type": "code",
169-
"execution_count": 8,
140+
"execution_count": 13,
170141
"metadata": {},
171142
"outputs": [],
172143
"source": [
@@ -175,7 +146,7 @@
175146
},
176147
{
177148
"cell_type": "code",
178-
"execution_count": 9,
149+
"execution_count": 14,
179150
"metadata": {},
180151
"outputs": [],
181152
"source": [
@@ -184,7 +155,7 @@
184155
},
185156
{
186157
"cell_type": "code",
187-
"execution_count": 10,
158+
"execution_count": 15,
188159
"metadata": {},
189160
"outputs": [],
190161
"source": [
@@ -195,7 +166,7 @@
195166
},
196167
{
197168
"cell_type": "code",
198-
"execution_count": 11,
169+
"execution_count": 16,
199170
"metadata": {},
200171
"outputs": [],
201172
"source": [
@@ -204,7 +175,7 @@
204175
},
205176
{
206177
"cell_type": "code",
207-
"execution_count": 12,
178+
"execution_count": 17,
208179
"metadata": {},
209180
"outputs": [],
210181
"source": [
@@ -213,7 +184,7 @@
213184
},
214185
{
215186
"cell_type": "code",
216-
"execution_count": 13,
187+
"execution_count": 18,
217188
"metadata": {},
218189
"outputs": [],
219190
"source": [
@@ -238,7 +209,7 @@
238209
},
239210
{
240211
"cell_type": "code",
241-
"execution_count": 14,
212+
"execution_count": 19,
242213
"metadata": {},
243214
"outputs": [],
244215
"source": [
@@ -249,7 +220,7 @@
249220
},
250221
{
251222
"cell_type": "code",
252-
"execution_count": 15,
223+
"execution_count": 20,
253224
"metadata": {},
254225
"outputs": [],
255226
"source": [
@@ -258,7 +229,7 @@
258229
},
259230
{
260231
"cell_type": "code",
261-
"execution_count": 16,
232+
"execution_count": 21,
262233
"metadata": {},
263234
"outputs": [],
264235
"source": [
@@ -280,7 +251,7 @@
280251
},
281252
{
282253
"cell_type": "code",
283-
"execution_count": 17,
254+
"execution_count": 22,
284255
"metadata": {},
285256
"outputs": [],
286257
"source": [
@@ -343,7 +314,7 @@
343314
},
344315
{
345316
"cell_type": "code",
346-
"execution_count": 18,
317+
"execution_count": 23,
347318
"metadata": {},
348319
"outputs": [],
349320
"source": [
@@ -356,7 +327,7 @@
356327
},
357328
{
358329
"cell_type": "code",
359-
"execution_count": 19,
330+
"execution_count": 24,
360331
"metadata": {},
361332
"outputs": [],
362333
"source": [
@@ -384,7 +355,7 @@
384355
"name": "python",
385356
"nbconvert_exporter": "python",
386357
"pygments_lexer": "ipython3",
387-
"version": "3.6.5"
358+
"version": "3.6.8"
388359
}
389360
},
390361
"nbformat": 4,

bindings/python/docs/Reference/Trajectory.ipynb

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,6 @@
1414
"## Setup"
1515
]
1616
},
17-
{
18-
"cell_type": "code",
19-
"execution_count": 1,
20-
"metadata": {},
21-
"outputs": [],
22-
"source": [
23-
"import sys\n",
24-
"\n",
25-
"!{sys.executable} -m pip install --quiet LibraryCorePy\n",
26-
"!{sys.executable} -m pip install --quiet LibraryIOPy\n",
27-
"!{sys.executable} -m pip install --quiet LibraryMathematicsPy\n",
28-
"!{sys.executable} -m pip install --quiet LibraryPhysicsPy\n",
29-
"# !{sys.executable} -m pip install --quiet LibraryAstrodynamicsPy"
30-
]
31-
},
3217
{
3318
"cell_type": "code",
3419
"execution_count": 2,
@@ -55,9 +40,6 @@
5540
}
5641
],
5742
"source": [
58-
"import Library.Core as Core\n",
59-
"import Library.IO as IO\n",
60-
"import Library.Mathematics as Mathematics\n",
6143
"import Library.Physics as Physics\n",
6244
"import Library.Astrodynamics as Astrodynamics"
6345
]
@@ -609,7 +591,7 @@
609591
"metadata": {},
610592
"outputs": [],
611593
"source": [
612-
"coe.getMeanMotion(Environment.Objects.CelestialBodies.Earth.GravitationalConstant) ;"
594+
"coe.getMeanMotion(Environment.Objects.CelestialBodies.Earth.GravitationalParameter) ;"
613595
]
614596
},
615597
{
@@ -618,7 +600,7 @@
618600
"metadata": {},
619601
"outputs": [],
620602
"source": [
621-
"coe.getOrbitalPeriod(Environment.Objects.CelestialBodies.Earth.GravitationalConstant) ;"
603+
"coe.getOrbitalPeriod(Environment.Objects.CelestialBodies.Earth.GravitationalParameter) ;"
622604
]
623605
},
624606
{
@@ -627,7 +609,7 @@
627609
"metadata": {},
628610
"outputs": [],
629611
"source": [
630-
"# coe.getCartesianState(Physics.Environment.Objects.CelestialBodies.Earth.GravitationalConstant, Frame.GCRF()) ;"
612+
"# coe.getCartesianState(Physics.Environment.Objects.CelestialBodies.Earth.GravitationalParameter, Frame.GCRF()) ;"
631613
]
632614
},
633615
{
@@ -1087,7 +1069,7 @@
10871069
"name": "python",
10881070
"nbconvert_exporter": "python",
10891071
"pygments_lexer": "ipython3",
1090-
"version": "3.6.5"
1072+
"version": "3.6.8"
10911073
}
10921074
},
10931075
"nbformat": 4,

bindings/python/requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
################################################################################################################################################################
2+
3+
# @project Library/Astrodynamics
4+
# @file requirements.txt
5+
# @author Lucas Brémond <lucas@loftorbital.com>
6+
# @license Apache License 2.0
7+
8+
################################################################################################################################################################
9+
10+
LibraryPhysicsPy>=0.2.0
11+
12+
################################################################################################################################################################

bindings/python/src/LibraryAstrodynamicsPy/Trajectory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline void LibraryAstrodynamicsPy_Trajectory ( )
3737

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

40-
.def("accessModel", &Trajectory::accessModel, return_value_policy<reference_existing_object>())
40+
// .def("accessModel", &Trajectory::accessModel, return_value_policy<reference_existing_object>())
4141

4242
.def("getStateAt", &Trajectory::getStateAt)
4343
.def("getStatesAt", &Trajectory::getStatesAt)

bindings/python/src/LibraryAstrodynamicsPy/Trajectory/Model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ inline void LibraryAstrodynamicsPy_Trajectory_Model ( )
1818

1919
using library::astro::trajectory::Model ;
2020

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

2323
.def(self == self)
2424
.def(self != self)

0 commit comments

Comments
 (0)