Skip to content

Commit 95dd6b5

Browse files
Merge branch 'develop' of github.com:suavecode/Tutorials into develop
2 parents e78c008 + 6d5241a commit 95dd6b5

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

tut_solar_uav.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,7 @@ def plot_mission(results):
466466
axes.get_yaxis().get_major_formatter().set_scientific(False)
467467
axes.get_yaxis().get_major_formatter().set_useOffset(False)
468468
plt.ylim((0,1))
469-
axes.grid(True)
470-
471-
plt.figure("Angle of Attack History")
472-
axes = plt.gca()
473-
for i in range(len(results.segments)):
474-
time = results.segments[i].conditions.frames.inertial.time[:,0] / Units.min
475-
aoa = results.segments[i].conditions.aerodynamics.angle_of_attack[:,0] / Units.deg
476-
axes.plot(time, aoa, 'bo-')
477-
axes.set_xlabel('Time (mins)')
478-
axes.set_ylabel('Angle of Attack (deg)')
479-
axes.grid(True)
469+
axes.grid(True)
480470

481471
# ------------------------------------------------------------------
482472
# Altitude
@@ -692,6 +682,7 @@ def plot_mission(results):
692682
axes = fig.add_subplot(3,1,1)
693683
axes.plot( time , aoa , 'bo-' )
694684
axes.set_ylabel('Angle of Attack (deg)')
685+
axes.grid(True)
695686

696687
axes = fig.add_subplot(3,1,2)
697688
axes.plot( time , altitude , 'bo-' )
@@ -705,7 +696,7 @@ def plot_mission(results):
705696
axes.grid(True)
706697

707698
# ------------------------------------------------------------------
708-
# Mass, State of Charge, Power
699+
# Solar Flux, Charging Power, Battery Energy
709700
# ------------------------------------------------------------------
710701

711702

@@ -719,7 +710,7 @@ def plot_mission(results):
719710

720711
axes = fig.add_subplot(3,1,1)
721712
axes.plot( time , flux , 'bo-' )
722-
axes.set_ylabel('Solar Fkux (W/m$^2$)')
713+
axes.set_ylabel('Solar Flux (W/m$^2$)')
723714
axes.grid(True)
724715

725716
axes = fig.add_subplot(3,1,2)
@@ -739,4 +730,4 @@ def plot_mission(results):
739730
if __name__ == '__main__':
740731
main()
741732

742-
plt.show()
733+
plt.show()

0 commit comments

Comments
 (0)