# Analytic expression for detecting horizontal velocity using camera

There is device that can be used in a military aircraft.

The device is able to capture two images consecutively. It detects features and gives pixel shift of the features in the two images in camera A and camera C axis. Camera Frame is A, B, C axis with $A \times C = -B$.

This pixel shift can then be used to calculate the horizontal(cross track and along track) velocity.

The working is very similar to mouse used in a computer but, here the view angle of the device isnt in nadir direction, but at a certain known angle. Also there is a finite-fixed time difference between two images, by which the aircraft would have changes its attitude as well as height.

Iam interested in deriving an Analytics function accurate atleast upto first order that gives me horizontal velocity. The function should look like

$$V_x, V_y = F(h, \theta, \phi, \psi, \delta{h}, \delta{\theta}, \delta{\psi}, \delta{P_A}, \delta{P_C})$$

Constants are: $fov = 1.4^{\circ}$, $\delta{T} = 300$ ms

Variable Description: $h$ is the current height of aircraft, $\theta$ is yaw, $\phi$ is roll, $\psi$ is pitch, $\delta{\theta}$, $\delta{\phi}$, $\delta{\psi}$ are yaw, roll, pitch change in $\delta{T}$ time, $\delta{P_A}$ and $\delta{P_C}$ is pixel difference in $A$ and $C$ Axis respectively where, $fov$ = Field of view and $\delta{T}$ is time difference between two snapshots

Since FOV is small, one can assume the camera recognizes the center of the image.

If we assume this, the camera is insensitive to yaw direction(Aircraft convention). So the only correction to be added is due to height change and roll and pitch change.

Since only first order correction will suffice for small change. The terms can be considered independently.

$\delta{P_x}$ and $\delta{P_y}$ will have similar terms due to roll and pitch. Here assuming the camera frame is along the direction of motion.

Correction due to height change : $\delta{h}\sin{\phi}$

Correction due to roll change: $\frac{h\delta{\phi}\big(1 + \tan{\phi}\big)}{1-\delta{\phi}}$

and similar terms for pitch change.

Whether the correction has to be added or subtracted depends on further frame convention