Aerial Photograph Footprint Size Calculation

So if I assume the following variables:

x = camera sensor x size

y = camera sensor y size

f = focal length

h = height above ground 

And I am looking for:

ay = photo y ground distance

ax = photo x ground distance

Would these formulas work? making sure that I compare the proper units to the proper units.

(h/f)*x = ax

(h/f)*y = ay

Does this make sense. See my crude photo below (source of diagrams:

enter image description here

We have created an webpage with a script that will perform the calculation for you: Aerial Camera Ground Footprint Calculator. You just have to enter the variables mentioned and click the Calculate button. Please note the calculator interface is in English, but the primary site language and explanations are in Spanish.