Skip to content

Commit a01dc16

Browse files
committed
add test
1 parent d47c3c8 commit a01dc16

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

AerialNavigation/rocket_powered_landing/rocket_powered_landing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- Python implementation of 'Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time' paper
1010
by Michael Szmuk and Behçet Açıkmeşe.
1111
12-
- inspired by EmbersArc/SuccessiveConvexificationFreeFinalTime: Implementation of "Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time" https://github.com/EmbersArc/SuccessiveConvexificationFreeFinalTime
12+
- EmbersArc/SuccessiveConvexificationFreeFinalTime: Implementation of "Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time" https://github.com/EmbersArc/SuccessiveConvexificationFreeFinalTime
1313
1414
"""
1515

@@ -35,6 +35,8 @@
3535
solver = 'ECOS'
3636
verbose_solver = False
3737

38+
show_animation = True
39+
3840

3941
class Integrator:
4042
def __init__(self, m, K):
@@ -656,7 +658,8 @@ def main():
656658
print(f'Converged after {it + 1} iterations.')
657659
break
658660

659-
plot_animation(X, U)
661+
if show_animation:
662+
plot_animation(X, U)
660663

661664
print("done!!")
662665

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from unittest import TestCase
2+
3+
import sys
4+
sys.path.append("./AerialNavigation/rocket_powered_landing/")
5+
6+
from AerialNavigation.rocket_powered_landing import rocket_powered_landing as m
7+
print(__file__)
8+
9+
10+
class Test(TestCase):
11+
12+
def test1(self):
13+
m.show_animation = False
14+
m.main()

0 commit comments

Comments
 (0)