The text on the left of Figure 4.15 is full justified even though I didn't specify that. I want the layout of this page to stay the same with all the text being justified. Instead the paragraph beginning "The vehicle configuration data..." is full justified, i.e. the last line is stretched to end on the right margin.
I tried putting braces around the wrapfigure as suggested here: Text alignment after wrapped figure, but it didn't work. Neither did, just putting that block of text inside a \begin{flushleft} environment. Both end up putting text over the wrapped figures.
How do I fix this?
\documentclass[11pt]{report}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm} %changed
\usepackage{bm}
\usepackage{graphicx}
\graphicspath{{./Images/}}
\usepackage{parskip}
\usepackage{setspace}
\doublespacing
\usepackage{import}
% my packages
\usepackage{verbatim}
\usepackage[backend=bibtex,style=trad-plain]{biblatex}
\addbibresource{papersNS.bib}
\usepackage{wrapfig}
\usepackage[skip=1pt]{caption}
\usepackage{subcaption}
\usepackage[linesnumbered,ruled,noline]{algorithm2e}
\usepackage{xcolor,colortbl}
\definecolor{Gray}{gray}{0.85}
\newcolumntype{a}{>{\columncolor{Gray}}l}
\usepackage{graphics}
\usepackage{float}
\begin{document}
the de Havilland beaver fixed wing aircraft, in order to obtain the state space models required to derive the LQR gains.
\begin{figure}[H]
\centering
\includegraphics[width=0.4\textwidth]{6DOF.png}
\setlength{\belowcaptionskip}{-16pt}
\caption{\label{fig:6DOF}`sixDOF\_simulation' SIMULINK model}
\end{figure}
\setlength{\belowcaptionskip}{0pt}
A pre-existing SIMULIINK model template from the Aerospace Blockset, shown in Figure \ref{fig:6DOF}, was used to linearise the state space model around the operating point. In order to do so, the operating point initial flight conditions were specified in the script shown below in Figure \ref{fig:code1}.
\begin{wrapfigure}{r}{0.3\textwidth}
\centering
\vspace{-20pt}
\includegraphics[width=0.3\textwidth]{code1_1.png}
\begin{singlespace}
\setlength{\belowcaptionskip}{-16pt}
\caption{\label{fig:code1}Initializing Flight Conditions}
\end{singlespace}
\end{wrapfigure}
\setlength{\belowcaptionskip}{0pt}
The vehicle configuration data used here is from the original design of the UAV [??]. Once the initial conditions had been configured, the desired trim condition had to be specified for the linearisation. As mentioned previously, the operating point was chosen to be steady flight at a constant altitude. This means when defining the trim condition for the operating point, the altitude and yaw has to be specified as known quantities.
\begin{wrapfigure}{l}{0.25\textwidth}
\centering
\vspace{-20pt}
\includegraphics[width=0.25\textwidth]{code2.png}
\begin{singlespace}
\setlength{\belowcaptionskip}{-16pt}
\caption{\label{fig:code2}Linearising the airframe around a trimmed operating point}
\end{singlespace}
\end{wrapfigure}
\setlength{\belowcaptionskip}{0pt}
\vspace{-20pt}
The Matlab script in Figure \ref{fig:code2} is responsible for linearising the airframe. It does so by first defining a trim condition for the operating point of the airframe in lines 8-36.
In these lines, all the states are initialized to be the same as in Figure \ref{fig:code1}. This portion of the code also declares the yaw and height to be known quantities, therefore eliminating them as possible states in the state space model. Once the trim condition has been specified, an operating point satisfying it is found in line 39. The airframe is then linearised about this operating point in lines 42-50. The state space model found is only valid for small deviations of the airframe about this operating point.
The results of this Matlab script are shown in Figure \ref{fig:code_results}. The LQR controller being designed will control deviations of the states about this operating
\end{document}
\raggedright
anywhere