28. Given that $\mathbf{m}=(\cos \theta) \mathbf{i}+(\sin \theta) \mathbf{j}$ and $\mathbf{n}=(\sqrt{2}-\sin \theta) \mathbf{i}+(\cos \theta) \mathbf{j}$, where $\mathbf{i}$ and $\mathbf{j}$ are the usual unit vectors along the $x$-axis and the $y$-axis respectively, and $\theta \in(\pi 2 \pi)$. If the length or magnitude of the vector $\mathbf{m}+\mathbf{n}$ is given by $\mathbf{m}+\mathbf{n}=\frac{8 \sqrt{2}}{5}$, find the value of $5 \cos \left(\frac{\theta}{2}+\frac{\pi}{8}\right)+5$.