Formulas on that page are about as simple as you'll find and should meet your needs. If you're confused by something specific, just ask!
For shortening the period of night, you should go by the distance (in degrees, say) the Sun is below the horizion, rather than any fixed time. That is the setting of the "zenith" variable. You might like http://en.wikipedia.org/wiki/Twilight for background, then the values "official", "civil", "nautical", and "astronomical" on the page you referenced should make sense. Without even knowing the use for your sensor, I would suggest starting with the nautical twilight value, that is set the variable zenith to 102. (Nautical twilight is pretty dark!)
UPD: The math on the page looks good. I tried coding it and it gave the right answer (for my location today anyway) to within about a minute.
The answer to this question involves quite a bit of spherical trigonometry. Call $(\lambda_1,\varphi_1)$ the longitude and latitude of the place of departure, and $(\lambda_2,\varphi_2)$ the coordinates of the destination. Let's assume that the plane travels along a great circle. Then it will travel a total angle $\theta$, given by
$$
\cos\theta = \sin\varphi_1\sin\varphi_2 + \cos\varphi_1\cos\varphi_2\cos(\lambda_2-\lambda_1).
$$
If $\theta$ is expressed it radians, then the corresponding distance is $D=\theta R_\oplus$, with $R_\oplus$ the radius of the Earth. Suppose that the total flight time is $T$, and that the plane flies at a constant speed. If $t$ is the time since take-off, then
$$
\begin{align}
\theta_1 &= \theta t/T,\\
\theta_2 &= \theta -\theta_1,
\end{align}
$$
where $\theta_1$ is the angle traveled by the plane at time $t$, while $\theta_2$ is the angle that the plane still has to travel. At time $t$, the plane will then be above the location $(\lambda,\varphi)$, given by
$$
\begin{align}
\cos\theta_1 &= \sin\varphi_1\sin\varphi + \cos\varphi_1\cos\varphi\cos(\lambda-\lambda_1),\\
\cos\theta_2 &= \sin\varphi_2\sin\varphi + \cos\varphi_2\cos\varphi\cos(\lambda-\lambda_2),
\end{align}
$$
from which $(\lambda(t),\varphi(t))$ can be derived (after some tedius calculations).
If we know the Greenwhich Mean Solar Time $t_0$ at the moment of departure, then we can obtain the hour angle $H_\odot(t)$ of the Sun at $(\lambda(t),\varphi(t))$:
$$
H_\odot(t) + 12^\text{h}=t_0 +t + \lambda(t)\qquad\text{(modulo $24^\text{h}$)},
$$
where all variables are expressed in hours, minutes, and seconds (and $360^\circ$ corresponds with $24^\text{h}$). We also need to know the declination of the Sun $\delta_\odot$ during the flight (so we need to know the date).
The altitude of the Sun $a_\odot(t)$ above the local horizon is then
$$
\sin a_\odot(t) = \sin\varphi(t)\sin\delta_\odot + \cos\varphi(t)\cos\delta_\odot \cos H_\odot(t)
$$
(see the wiki page on celestial coordinates). Sunset and sunrise correspond with $a_\odot=0^\circ$ on the ground (ignoring atmospheric refraction). Using simple trigonometry, it is easy to show that from the plane's perspective, at a height $h$, sunset and sunrise will occur when
$$a_\odot= -\cos^{-1}(R_\oplus/(R_\oplus+h)).$$
Best Answer
I think that
provide enough information. You put the equation from the second link into the equation from the first link. You get hours by multiplying the positive solution $\omega_0$ by $2 \cdot \frac{24\text{h}}{2\pi}$. If the equation from the first link has no solution ($\tan\phi \cdot \tan\delta>1$ ), this means day is either $24\text{h}$ or $0\text{h}$ long.
As far as I checked equations' output, they seem to be consistent.