Think I'm gonna call it for now. May reassess, but almost completely done!

This commit is contained in:
Connor
2022-03-14 01:09:52 -06:00
parent e36b99b84c
commit fca9f32ea7
15 changed files with 173 additions and 183 deletions

View File

@@ -88,9 +88,13 @@
In this formulation the cost function $F$ is a user provided function of the input Guess. In this formulation the cost function $F$ is a user provided function of the input Guess.
The constraint function $G$ defines the following conditions that must be met: The constraint function $G$ defines the following conditions that must be met:
\begin{spacing}{1.0}
\begin{itemize} \begin{itemize}
\setlength\itemsep{-0.5em}
\item For every phase other than the final: \item For every phase other than the final:
\vspace{-0.5em}
\begin{itemize} \begin{itemize}
\setlength\itemsep{0em}
\item The minimum periapsis of the hyperbolic flyby arc must be above some \item The minimum periapsis of the hyperbolic flyby arc must be above some
user-specified minimum safe altitude. user-specified minimum safe altitude.
\item The magnitude of the incoming hyperbolic velocity must match the magnitude \item The magnitude of the incoming hyperbolic velocity must match the magnitude
@@ -99,12 +103,15 @@
at the end of the phase. at the end of the phase.
\end{itemize} \end{itemize}
\item For the final phase: \item For the final phase:
\vspace{-0.5em}
\begin{itemize} \begin{itemize}
\setlength\itemsep{0em}
\item The spacecraft position must match the planet's position (within bounds) \item The spacecraft position must match the planet's position (within bounds)
at the end of the phase. at the end of the phase.
\item The final mass must be greater than the dry mass of the craft. \item The final mass must be greater than the dry mass of the craft.
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\end{spacing}
\begin{figure}[H] \begin{figure}[H]
\centering \centering

41
LaTeX/conclusion.tex Normal file
View File

@@ -0,0 +1,41 @@
\chapter{Conclusion} \label{conclusion}
This thesis explored an approach for automating the initial analysis and discovery of useful
interplanetary, low-thrust trajectories including the difficult task of optimizing the flyby
parameters. This makes the mission designer's job significantly simpler in that they can
simply explore a number of different flyby selection options in order to get a good
understanding of the mission scope and search space for a given spacecraft, launch window,
and target.
In performing this examination, two results were selected for further analysis. These
results are outlined in Table~\ref{results_table}. As can be seen in the table, both
resulting trajectories have trade-offs in mission length, launch energy, fuel usage, and
more. However, both results show very interesting trajectories that could indicate some
favorable possibilities for such a mission profile. Each of these trajectories should be
within the capabilities of existing launch vehicles in terms of $C_3$.
\section{Recommendations for Future Work}\label{improvement_section}
In the course of producing this algorithm, a large number of improvement possibilities were
noted. This work was based, in large part, on the work of Jacob Englander in a number of
papers\cite{englander2014tuning}\cite{englander2017automated} \cite{englander2012automated}
in which they explored the hybrid optimal control problem of multi-objective low-thrust
interplanetary trajectories.
In light of this, there are a number of additional approaches that Englander took in
preparing their algorithm that were not implemented here in favor of reducing complexity and
time constraints. For instance, many of the Englander papers explore the concept of an outer
loop that utilizes a genetic algorithm to compare many different flyby planet choices
against each other.
Further improvements, in the name of performance stem from the field of computer science. An
evolutionary algorithm such as the one proposed by Englander would benefit from high levels
of parallelization. Therefore, it would be worth considering a GPU-accelerated or even
cluster-computing capable implementation of the monotonic basin hopping algorithm.
Finally, the monotonic basin hopping algorithm as currently written provides no guarantees
of actual global optimization. Generally optimization is achieved by running the algorithm
until it fails to produce newer, better trajectories for a sufficiently long time. But it
would be worth investigating the robustness of the NLP solver as well as the robustness of
the MBH algorithm basin drilling procedures in order to quantify the search granularity
needed to completely traverse the search space.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,35 +1,10 @@
\chapter{Results Analysis} \label{results} \chapter{Sample Saturn Trajectory Analysis} \label{results}
The algorithm described in this thesis is quite flexible in its design and could be used as The algorithm described in this thesis is quite flexible in its design and could be used as
a tool for a mission designer on a variety of different mission types. However, to consider a tool for a mission designer on a variety of different mission types. However, to consider
a relatively simple but representative mission design objective, a sample mission to Saturn a relatively simple but representative mission design objective, a sample mission to Saturn
was investigated. was investigated.
Ultimately, two optimized trajectories were selected. The results of those trajectories can
be found in Table~\ref{results_table} below:
\begin{table}[h!]
\begin{small}
\centering
\begin{tabular}{ | c c c c c c | }
\hline
\bfseries Flyby Selection &
\bfseries Launch Date &
\bfseries Mission Length &
\bfseries Launch $C_3$ &
\bfseries Arrival $V_\infty$ &
\bfseries Fuel Usage \\
& & (years) & $\left( \frac{km}{s} \right)^2$ & ($\frac{km}{s}$) & (kg) \\
\hline
EMS & 2024-06-27 & 7.9844 & 60.41025 & 5.816058 & 446.9227 \\
EMJS & 2023-11-08 & 14.1072 & 40.43862 & 3.477395 & 530.6683 \\
\hline
\end{tabular}
\end{small}
\caption{Comparison of the two most optimal trajectories}
\label{results_table}
\end{table}
\section{Mission Constraints} \section{Mission Constraints}
The sample mission was defined to represent a general case for a near-future low-thrust The sample mission was defined to represent a general case for a near-future low-thrust
@@ -91,7 +66,17 @@
used by the mass at launch and the $C_3$ number is determined by dividing the $C_3$ used by the mass at launch and the $C_3$ number is determined by dividing the $C_3$
at launch by the maximum allowed. These two numbers are then weighted, with the fuel at launch by the maximum allowed. These two numbers are then weighted, with the fuel
usage value getting a weight of three and the launch energy value getting a weight usage value getting a weight of three and the launch energy value getting a weight
of one. The values are summed and returned as the cost value. of one. The values are summed and returned as the cost value, represented as the value
$J$ below:
\begin{equation}
J(\vec{x}, m_{dry}, C_{3,max}) = 3 \left| \frac{h(\vec{x})}{m_{dry}} \right| +
\left| \frac{k(\vec{x})}{C_{3,max}} \right|
\end{equation}
\noindent
Where $h(\vec{x})$ represents the total fuel mass used during the trajectory and
$k(\vec{x})$ represents the launch $C_3$ of the initial phase.
\subsection{Flybys Analyzed} \subsection{Flybys Analyzed}
@@ -102,9 +87,12 @@
the mission. the mission.
For this particular mission scenario, the following flyby profiles were For this particular mission scenario, the following flyby profiles were
investigated: investigated (E: Earth, M: Mars, V: Venus, J: Jupiter, S: Saturn). These flyby choices
were initially sampled randomly, but as patterns were noticed during the previous runs,
certain trajectories were chosen to investigate phases that seemed promising.
\begin{itemize} \begin{itemize}
\setlength\itemsep{-0.5em}
\item EJS \item EJS
\item EMJS \item EMJS
\item EMMJS \item EMMJS
@@ -128,17 +116,17 @@
contrast to the usual dichotomy of low-thrust travel. The cost function used for this contrast to the usual dichotomy of low-thrust travel. The cost function used for this
analysis did not include the time of flight as a component of the overall cost, and yet analysis did not include the time of flight as a component of the overall cost, and yet
this trajectory still managed to be the lowest cost trajectory of all trajectories found this trajectory still managed to be the lowest cost trajectory of all trajectories found
by the algorithm. by the algorithm, meaning that it has merit for both a flyby mission as well as a capture
mission.
The mission begins in late June of 2024 and proceeds first to an initial gravity assist The mission begins in late June of 2024 and proceeds first to an initial gravity assist with
with Mars after three and one half years to rendezvous in mid-December 2027. Mars after three and one half years to rendezvous in mid-December 2027. Unfortunately, the
Unfortunately, the launch energy required to effectively used the gravity assist with launch energy required to effectively used the gravity assist with Mars at this time is
Mars at this time is quite high. The $C_3$ value was found to be $60.4102$ kilometers quite high. The $C_3$ value was found to be $60.4102 \frac{\text{km}^2}{\text{s}^2}$. However,
per second squared. However, for this phase, the thrust magnitudes are quite low, for this phase, the thrust magnitudes are quite low, raising slowly only as the spacecraft
raising slowly only as the spacecraft approaches Mars, allowing for a nearly-natural approaches Mars, allowing for a nearly-natural trajectory to Mars rendezvous. Note also that
trajectory to Mars rendezvous. Note also that the in-plane thrust direction was neither the in-plane thrust angle was neither zero nor $\pi$, implying that these thrusts were
zero nor $\pi$, implying that these thrusts were steering thrusts rather than steering thrusts rather than momentum-increasing thrusts.
momentum-increasing thrusts.
\begin{figure}[H] \begin{figure}[H]
\centering \centering
@@ -158,15 +146,15 @@
\end{figure} \end{figure}
The second and final leg of this trip exits the Mars flyby and, initially burns quite The second and final leg of this trip exits the Mars flyby and, initially burns quite
heavily along the velocity vector in order to increase it's semi-major axis. After an heavily along the velocity vector in order to increase its semi-major axis. After an initial
initial period of thrusting, though, the spacecraft effectively coasts with minor period of thrusting, though, the spacecraft effectively coasts with minor adjustments until
adjustments until its rendezvous with Saturn just four and a half years later in June of its rendezvous with Saturn just four and a half years later in June of 2032. The arrival
2032. The arrival $v_\infty$ is not particularly small, at $5.816058$ kilometers per $v_\infty$ is not particularly small, at $5.816058 \frac{\text{km}}{\text{s}}$, but this is
second, but this is to be expected as the arrival excess velocity was not considered as to be expected as the arrival excess velocity was not considered as a part of the cost
a part of the cost function. If capture was not the final intention of the mission, this function. If capture was not the final intention of the mission, this may be of little
may be of little concern. Otherwise, the low fuel usage of $446.92$ kilograms for a concern. Otherwise, the low fuel usage of $446.92$ kilograms for a $3500$ kilogram launch
$3500$ kilogram launch mass leaves much margin for a large impulsive thrust to enter mass leaves much margin for a large impulsive thrust to enter into a capture orbit at
into a capture orbit at Saturn. Saturn.
\begin{figure}[H] \begin{figure}[H]
\centering \centering
@@ -183,7 +171,7 @@
\label{ems_components} \label{ems_components}
\end{figure} \end{figure}
In this case the algorithm effectively realized that a higher-powered launch from In this case the algorithm effectively discovered that a higher-powered launch from
the Earth, then a natural coasting arc to Mars flyby would provide the spacecraft with the Earth, then a natural coasting arc to Mars flyby would provide the spacecraft with
enough velocity that a short but efficient powered-arc to Saturn was possible with enough velocity that a short but efficient powered-arc to Saturn was possible with
effective thrusting. It also determined that the most effective way to achieve this effective thrusting. It also determined that the most effective way to achieve this
@@ -202,12 +190,11 @@
\section{Slower, More Efficient Trajectory} \section{Slower, More Efficient Trajectory}
Next we'll analyze the nominally second-best trajectory. While the cost function Next we'll analyze the nominally second-best trajectory. While the cost function provided to
provided to the algorithm can be a useful tool for narrowing down the field of search the algorithm can be a useful tool for narrowing down the field of search results, it can
results, it can also be very useful to explore options that may or may not be of similar also be very useful to explore options that may or may not have quite as small of a cost
"efficiency" in terms of the cost function, but beneficial for other reasons. By function value, but beneficial for other reasons. By outputting many different optimal
outputting many different optimal trajectories, the MBH algorithm can allow for this trajectories, the MBH algorithm can allow for this type of mission design flexibility.
type of mission design flexibility.
To highlight the flexibility, a second trajectory has been selected, which has nearly To highlight the flexibility, a second trajectory has been selected, which has nearly
equal value by the cost function, coming in slightly lower. However, this trajectory equal value by the cost function, coming in slightly lower. However, this trajectory
@@ -276,81 +263,51 @@
While the fuel use is also slightly higher at $530.668$ kilograms, plenty of payload While the fuel use is also slightly higher at $530.668$ kilograms, plenty of payload
mass is still capable of delivery into the vicinity of Saturn. Also, it should be noted mass is still capable of delivery into the vicinity of Saturn. Also, it should be noted
that the incoming excess hyperbolic velocity at arrival to Saturn is significantly that the incoming excess hyperbolic velocity at arrival to Saturn is significantly
lower, at only $3.4774$ kilometers per second, meaning that less of the delivered lower, at only $3.4774\frac{\text{km}}{\text{s}}$, meaning that less of the delivered
payload mass would need to be taken up by impulsive thrusters and fuel for Saturn orbit payload mass would need to be taken up by impulsive thrusters and fuel for Saturn orbit
capture, should the mission designer desire this. capture, should the mission designer desire this.
Also, as mentioned before, the launch energy requirements are quite a bit lower. Having \section{Final Trajectory Analysis}
a second mission trajectory capable of launching on a smaller vehicle could be valuable
to a mission designer presenting possibilities. According to an analysis of the Delta IV Ultimately, two optimized trajectories were selected to be excellent candidates for further
and Atlas V launch configurations\cite{c3capabilities} in Figure~\ref{c3}, this consideration. The resultant flyby selection, launch and arrival dates, and relevant cost
function input of those trajectories can be found in Table~\ref{results_table} below:
\begin{table}[h!]
\begin{small}
\centering
\begin{tabular}{ | c c c c c c | }
\hline
\bfseries Flyby Selection &
\bfseries Launch Date &
\bfseries Mission Length &
\bfseries Launch $C_3$ &
\bfseries Arrival $V_\infty$ &
\bfseries Fuel Usage \\
& & (years) & $\left( \frac{km}{s} \right)^2$ & ($\frac{km}{s}$) & (kg) \\
\hline
EMS & 2024-06-27 & 7.9844 & 60.41025 & 5.816058 & 446.9227 \\
EMJS & 2023-11-08 & 14.1072 & 40.43862 & 3.477395 & 530.6683 \\
\hline
\end{tabular}
\end{small}
\caption{Comparison of the two most optimal trajectories}
\label{results_table}
\end{table}
As mentioned before, the launch energy requirements of the second trajectory are quite a bit
lower. Having a second mission trajectory capable of launching on a smaller vehicle could be
valuable to a mission designer presenting possibilities. According to an analysis of the
Delta IV and Atlas V launch configurations\cite{c3capabilities} in Figure~\ref{c3}, this
reduction of $C_3$ from around 60 to around 40 brings the sample mission to just within reduction of $C_3$ from around 60 to around 40 brings the sample mission to just within
range of both the Delta IV Heavy and the Atlas V in its largest configuration, neither range of both the Delta IV Heavy and the Atlas V in its largest configuration, neither of
of which are possible for the other result, meaning that either different launch which are possible for the other result, meaning that either different launch vehicles must
vehicles must be found or mission specifications must change. be found or mission specifications must change.
\begin{figure}[H] \begin{figure}[H]
\centering \centering
\includegraphics[width=\textwidth]{fig/c3} \includegraphics[width=\textwidth]{fig/c3}
\caption{Plot of Delta IV and Atlas V launch vehicle capabilities as they relate to \caption{Plot of Delta IV and Atlas V launch vehicle capabilities as they relate to
payload mass} payload mass \cite{c3capabilities} from a source from 2007}
\label{c3} \label{c3}
\end{figure} \end{figure}
\chapter{Conclusion} \label{conclusion}
\section{Overview of Results}
A mission designer's job is quite a difficult one and it can be very useful to have
tools to automate some of the more complex analysis. This paper attempted to explore one
such tool, meant for automating the initial analysis and discovery of useful
interplanetary, low-thrust trajectories including the difficult task of optimizing the
flyby parameters. This makes the mission designer's job significantly simpler in that
they can simply explore a number of different flyby selection options in order to get a
good understanding of the mission scope and search space for a given spacecraft, launch
window, and target.
In performing this examination, two results were selected for further analysis. These
results are outlined in Table~\ref{results_table}. As can be seen in the table, both
resulting trajectories have trade-offs in mission length, launch energy, fuel usage, and
more. However, both results should be considered very useful low-thrust trajectories in
comparison to other missions that have launched on similar interplanetary trajectories,
using both impulsive and low-thrust arcs with planetary flybys. Each of these missions
should be feasible or nearly feasible (feasible with some modifications) using existing
launch vehicle and certainly even larger missions should be reasonable with advances in
launch capabilities currently being explored.
\section{Recommendations for Future Work}\label{improvement_section}
In the course of producing this algorithm, a large number of improvement possibilities
were noted. This work was based, in large part, on the work of Jacob Englander in a
number of papers\cite{englander2014tuning}\cite{englander2017automated}
\cite{englander2012automated} in which he explored the hybrid optimal control problem of
multi-objective low-thrust interplanetary trajectories.
In light of this, there are a number of additional approaches that Englander took in
preparing his algorithm that were not implemented here in favor of reducing complexity
and time constraints. For instance, many of the Englander papers explore the concept of
an outer loop that utilizes a genetic algorithm to compare many different flyby planet
choice against each other. This would create a truly automated approach to low-thrust
interplanetary mission planning. However, a requirement of this approach is that the
monotonic basin hopping algorithm algorithm must converge on optimal solutions very
quickly. Englander typically runs his for 20 minutes each for evolutionary fitness
evaluation, which is over an order of magnitude faster than the implementation in this
paper to achieve satisfactory results.
Further improvements to performance stem from the field of computer science. An
evolutionary algorithm such as the one proposed by Englander would benefit from high
levels of parallelization. Therefore, it would be worth considering a GPU-accelerated or
even cluster-computing capable implementation of the monotonic basin hopping algorithm.
These cluster computing concepts scale very well with new cloud infrastructures such as
that provided by AWS or DigitalOcean.
Finally, the monotonic basin hopping algorithm as currently written provides no
guarantees of actual global optimization. Generally optimization is achieved by running
the algorithm until it fails to produce newer, better trajectories for a sufficiently
long time. But it would be worth investigating the robustness of the NLP solver as well
as the robustness of the MBH algorithm basin drilling procedures in order to quantify
the search granularity needed to completely traverse the search space. From this
information, a new MBH algorithm could be written that is guaranteed to explore the
entire space.

View File

@@ -20,26 +20,40 @@
\abstract{ \OnePageChapter \abstract{ \OnePageChapter
There are a variety of approaches to finding and optimizing low-thrust trajectories in Much work has been performed recently to utilize the increasingly viable technology of
interplanetary space. This thesis analyzes one such approach, namely the application of a low-thrust electric propulsion systems on missions of interplanetary scope. This thesis analyzes
Monotonic Basin Hopping (MBH) algorithm to a series of Sims-Flanagan transcribed trajectory arcs a technique for the initial analysis of feasibility of utilizing a combination of low-thrust
and its applications in a multiple-shooting non-linear solver for the purpose of finding valid propulsion systems and natural gravity flybys for missions to the outer planets. First, a method
low-thrust trajectories between planets given poor initial conditions. These valid arcs are then for finding local optima by utilizing an interior-point linesearch algorithm to directly
fed into the MBH algorithm, which combines them in order to find and optimize interplanetary optimize the entire trajectory as a Non-Linear Programming problem is presented. Then, a
trajectories, given a set of flyby planets. This allows for a fairly rapid searching of a very Monotonic Basin Hopping algorithm is utilized to traverse the search space, improve the local
large solution space of low-thrust profiles via a medium fidelity inner-loop solver and a optima determined by the internal optimizer, and determine the global optima. This allows for a
well-suited optimization routine. The trajectories found by this method can then be optimized medium-fidelity, fully automated global optimization of the low thrust controls and flyby
further by feeding the solutions back, once again, into the non-linear solver, this time parameters for a given mission objective.
allowing the solver to perform optimization.
} }
\dedication[Dedication]{ \dedication[Dedication]{
Dedicated to some people. \begin{center}
I'd like to dedicate this work to anyone with an interest in space.
We're all exploring this together.
\end{center}
} }
\acknowledgements{ \OnePageChapter \acknowledgements{ \OnePageChapter
This will be an acknowledgement. I owe just about everything that I am today to the circumstances that I grew up in and in no
area of my life is that more apparent than in my loving family. I'd like to thank them for
providing me with the emotional support I needed to grow confident in my own abilities and the
logistical support I needed to nurture my curiosities.
I'd also like to thank my girlfriend, Rachael, for supporting me through this process. This has
not been an easy time for me, and I owe a lot to your support this past year.
Finally, I'd like to give a huge thanks to Dr. Bosanac, who provided me with the structure I
needed to stay on track, the motivation I needed to really get the most out of this paper, and
the guidance I needed to finish this up. It's no exxageration to say that this thesis wouldn't be
written to anywhere near the level of quality it was without you.
} }
\emptyLoT \emptyLoT
@@ -58,6 +72,8 @@
\input LaTeX/results.tex \input LaTeX/results.tex
\input LaTeX/conclusion.tex
\bibliographystyle{plain} \bibliographystyle{plain}
\nocite{*} \nocite{*}
\bibliography{thesis} \bibliography{thesis}

View File

@@ -85,45 +85,6 @@
Since the spacecraft is acting only under the gravitational influence of the planet and Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as: no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as:
We may also wish to utilize the total orbital energy for a spacecraft within this model.
Since the spacecraft is acting only under the gravitational influence of the planet and
no other forces, we can define the total specific mechanical energy as
\cite{vallado2001fundamentals}: \cite{vallado2001fundamentals}:
\begin{equation} \label{energy} \begin{equation} \label{energy}
@@ -660,7 +621,7 @@
The primary use of SPICE in this thesis, however, was to determine the planetary The primary use of SPICE in this thesis, however, was to determine the planetary
ephemeris at a known epoch. Using the NAIF0012 and DE430 kernels, ephemeris in the ephemeris at a known epoch. Using the NAIF0012 and DE430 kernels, ephemeris in the
ecliptic plane J2000 frame could be easily determined for a given epoch, provided as ecliptic plane J2000 frame (ICRF) could be easily determined for a given epoch, provided as
a decimal Julian Day since the J2000 epoch. a decimal Julian Day since the J2000 epoch.
\subsubsection{Porkchop Plots} \subsubsection{Porkchop Plots}

View File

@@ -53,7 +53,6 @@ println(get_id.(sorted_missions1[1:5]))
println(get_id.(sorted_missions2[1:5])) println(get_id.(sorted_missions2[1:5]))
# long, short = improve.(sorted_missions2[1:2], n=7)#, use_cost=true) # long, short = improve.(sorted_missions2[1:2], n=7)#, use_cost=true)
display_mission = long
# Display Orbit Plot # Display Orbit Plot
# display(Thesis.plot(long, # display(Thesis.plot(long,
@@ -66,22 +65,22 @@ display_mission = long
# Save Orbit Plot # Save Orbit Plot
savefig(Thesis.plot(short, title="EMS Mission Profile", mode="light", planet_colors=false, savefig(Thesis.plot(short, title="EMS Mission Profile", mode="light", planet_colors=false,
phase_colors=["#F00","#F0F","#6AF"], markers=false, phase_colors=["#F00","#F0F","#6AF"], markers=false, legend=false,
camera=((-0.2, 0.1, -0.3),(-2.,-2.,1.))), camera=((-0.2, 0.1, -0.3),(-2.,-2.,1.))),
"/home/connor/projects/thesis/LaTeX/fig/EMS_plot.png", "/home/connor/projects/thesis/LaTeX/fig/EMS_plot.png",
width=850, height=400) width=850, height=400)
savefig(Thesis.plot(short, title="EMS Mission Profile", mode="light", planet_colors=false, savefig(Thesis.plot(short, title="EMS Mission Profile", mode="light", planet_colors=false,
phase_colors=["#F00","#F0F","#6AF"], markers=false, planets=false, phase_colors=["#F00","#F0F","#6AF"], markers=false, planets=false, legend=false,
camera=((-0.2, 0.1, -0.3),(-2.,-2.,1.))), camera=((-0.2, 0.1, -0.3),(-2.,-2.,1.))),
"/home/connor/projects/thesis/LaTeX/fig/EMS_plot_noplanets.png", "/home/connor/projects/thesis/LaTeX/fig/EMS_plot_noplanets.png",
width=850, height=400) width=850, height=400)
savefig(Thesis.plot(long, title="EMS Mission Profile", mode="light", planet_colors=false, savefig(Thesis.plot(long, title="EMS Mission Profile", mode="light", planet_colors=false,
phase_colors=["#F00","#F0F","#6AF"], markers=false, phase_colors=["#F00","#F0F","#6AF"], markers=false, legend=false,
camera=((-0.2, -0.3, -0.2),(1.75,-1.75,1.5))), camera=((-0.2, -0.3, -0.2),(1.75,-1.75,1.5))),
"/home/connor/projects/thesis/LaTeX/fig/EMJS_plot.png", "/home/connor/projects/thesis/LaTeX/fig/EMJS_plot.png",
width=850, height=400) width=850, height=400)
savefig(Thesis.plot(long, title="EMS Mission Profile", mode="light", planet_colors=false, savefig(Thesis.plot(long, title="EMS Mission Profile", mode="light", planet_colors=false,
phase_colors=["#F00","#F0F","#6AF"], markers=false, planets=false, phase_colors=["#F00","#F0F","#6AF"], markers=false, planets=false, legend=false,
camera=((-0.2, -0.3, -0.2),(2.,-2.,1.5))), camera=((-0.2, -0.3, -0.2),(2.,-2.,1.5))),
"/home/connor/projects/thesis/LaTeX/fig/EMJS_plot_noplanets.png", "/home/connor/projects/thesis/LaTeX/fig/EMJS_plot_noplanets.png",
width=850, height=400) width=850, height=400)
@@ -90,16 +89,16 @@ savefig(Thesis.plot(long, title="EMS Mission Profile", mode="light", planet_colo
# display(plot_thrust_components(display_mission, title="Thrust Components vs Time", mode="light")) # display(plot_thrust_components(display_mission, title="Thrust Components vs Time", mode="light"))
# Save Thrust Plots # Save Thrust Plots
savefig(plot_thrust(short, title="Thrust Magnitude vs Time", mode="light"), savefig(plot_thrust(short, title="Thrust Magnitude vs Time", mode="light", legend=false),
"/home/connor/projects/thesis/LaTeX/fig/EMS_thrust_mag.png", "/home/connor/projects/thesis/LaTeX/fig/EMS_thrust_mag.png",
width=850, height=400) width=850, height=400)
savefig(plot_thrust_components(short, title="Thrust Components vs Time", mode="light"), savefig(plot_thrust_components(short, title="Thrust Components vs Time", mode="light", legend=false),
"/home/connor/projects/thesis/LaTeX/fig/EMS_thrust_components.png", "/home/connor/projects/thesis/LaTeX/fig/EMS_thrust_components.png",
width=850, height=400) width=850, height=400)
savefig(plot_thrust(long, title="Thrust Magnitude vs Time", mode="light"), savefig(plot_thrust(long, title="Thrust Magnitude vs Time", mode="light", legend=false),
"/home/connor/projects/thesis/LaTeX/fig/EMJS_thrust_mag.png", "/home/connor/projects/thesis/LaTeX/fig/EMJS_thrust_mag.png",
width=850, height=400) width=850, height=400)
savefig(plot_thrust_components(long, title="Thrust Components vs Time", mode="light"), savefig(plot_thrust_components(long, title="Thrust Components vs Time", mode="light", legend=false),
"/home/connor/projects/thesis/LaTeX/fig/EMJS_thrust_components.png", "/home/connor/projects/thesis/LaTeX/fig/EMJS_thrust_components.png",
width=850, height=400) width=850, height=400)

View File

@@ -320,6 +320,7 @@ function plot(m::Union{Mission, Mission_Guess};
markers=true, markers=true,
planets=true, planets=true,
camera=nothing, camera=nothing,
legend=true,
) )
# First plot the earth # First plot the earth
# Then plot phase plus planet phase # Then plot phase plus planet phase
@@ -402,6 +403,8 @@ function plot(m::Union{Mission, Mission_Guess};
layout["scene_camera_eye_z"] = camera[2][3] layout["scene_camera_eye_z"] = camera[2][3]
end end
layout["showlegend"] = legend
# Plot # Plot
PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) ) PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) )
@@ -434,6 +437,7 @@ end
function plot_thrust(m::Union{Mission, Mission_Guess}; function plot_thrust(m::Union{Mission, Mission_Guess};
title::String="Mission Plot", title::String="Mission Plot",
mode::String="dark", mode::String="dark",
legend=true,
) )
times = Vector{String}() times = Vector{String}()
vals = Vector{Float64}() vals = Vector{Float64}()
@@ -467,6 +471,8 @@ function plot_thrust(m::Union{Mission, Mission_Guess};
yaxis_range=[0.0,maximum(vals)*1.02], yaxis_range=[0.0,maximum(vals)*1.02],
) )
layout["showlegend"] = legend
# Plot # Plot
PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) ) PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) )
@@ -475,6 +481,7 @@ end
function plot_thrust_components(m::Union{Mission, Mission_Guess}; function plot_thrust_components(m::Union{Mission, Mission_Guess};
title::String="Mission Plot", title::String="Mission Plot",
mode::String="dark", mode::String="dark",
legend=true,
) )
traces = Vector{PlotlyJS.AbstractTrace}() traces = Vector{PlotlyJS.AbstractTrace}()
times = Vector{String}() times = Vector{String}()
@@ -519,6 +526,8 @@ function plot_thrust_components(m::Union{Mission, Mission_Guess};
yaxis_range=[min(minimum(αs),minimum(βs))*1.02,max(maximum(αs),maximum(βs))*1.02], yaxis_range=[min(minimum(αs),minimum(βs))*1.02,max(maximum(αs),maximum(βs))*1.02],
) )
layout["showlegend"] = legend
# Plot # Plot
PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) ) PlotlyJS.plot( PlotlyJS.Plot( traces, layout ) )