This can be derived from the basic lens formulas. The lens divides the entire system in two halves:
- the subject side, with two variables
- S the real size of the subject, this is what you are looking for
- s the distance between the subject and the lens, this is the altitude
- the image side, also with two variables
- I the size of the subject in the image, this is what you can measure
- i the distance between the sensor and the lens, this is a property of the camera. this is not the flange distance.
- and of course there's the focal length f
Dividing sizes and distances yields a constant value.
s/i = S/I = constant
From how the rays go through a lens, one can derive a formula including the focal length and without the i which is unknown:
S/I = (s-f) / f
By multiplying with I, you get a formula for S:
S = (s-f)*I / f
Is I measured in proportions?
No. All the variables mentioned: i,I,s,S and f are lengths. They have a dimension of length and therefore have a unit of length. The focal length is usually given in mm, but any unit that describes a length will do.
Number of pixels?
Yes and no. As mentioned above, it is a length. It is the size of the object as it is optically projected onto the sensor. Of course, the sensor captures that projected image and you end up with a digital image made out of pixels. You have to convert the pixels back to a length value, e.g. you have a sensor that is 100pixels wide. The physical width of the sensor is 20mm (roughly 4/5 of an inch if you don't like metric). If the object is 39px wide in the image, how wide was it when being projected onto the sensor?
First find how big one pixel is:
20mm / 100px = 0.2mm/px (or 200µm/px)
now you can multiply this with the pixel size of your object to find I:
I = 39px * 0.2mm/px = 7.8mm
And is there a name for the property i? Or a method of calculating it?
It is usually referred to as "the distance between image and lens". The term used in optics is "image distance"
Please take a look at the following image from here:
Attention: it uses different symbols. What I call s is what they call S1 and what I call i is what they call S2.
The thing is that in optics, a lot of calculations use a certain reference for their calculations. (where "0" is) This reference point is not simply the "middle" of the lens. It doesn't have to be "within" the lens at all. It is a mathematical construct to describe the lens, based on its shape. For any real world lenses, like those used on cameras, there are actually two such reference points. (basically speaking)
As you can see, this is not a trivial thing to measure. And it isn't a practical thing to do either, because it isn't necessarily constant. Yes, you read that right, it's a variable property. Essentially, this is the variable that your camera changes when it focuses on something. That's why I suggested the formula that involves the focal length, which is a (more) constant value.
I tried to keep my answer simple and not too optics/physics/math heavy or just as much as necessary.