This wonderful device is a self-contained mechanical computer from the late 1930's that calculates a type of celestial navigation called "line of position". (If you're not fluent in celestial navigation, it more complicated than one might think. If you want to know more, there are many of good references on the web and here is a free book I recommend.) Another great reference is Technical Manual TM1-206, 1941 (Figure 12) which includes a description of how to use the A-4 computer (Figure 13).
A very simplified description of line-of-position navigation is that given the time of day and sighting data (from a sextant) of the sun or another celestial body like a star, and by using precomputed tables, you can calculate the coordinates of a line on the surface of the earth, upon which you must be. Two such sightings and calculations produce two lines, whose intersection is where you are. (Technically, these "lines" are not lines but are "circles of equal altitude" which intersect at two positions, but in practice the position is not ambiguous.) The line of position approach was discovered in 1837 by Thomas Sumner (his original publication describing the method is here)
Although celestial navigation from a ship and an airplane are conceptually similar, there are important differences, among these are the fact that airplanes lack a stable horizon, experience high acceleration, and rapidly change their position. This means that it is important to be able to make position estimates accurately and rapidly. Before the A-4 computer, the line of position calculations required solving several trigonometric formulas using data from massive celestial almanacs. These calculations were done by hand or using specialized slide rules. The A-4 performs these calculations with greater precision than slide rules, and most conveniently, has the almanac values for the sun built into it, thus eliminating almanac lookup in many cases.
As can be seen in Figures 6-10, the computation mechanisms are completely mechanical and are quite complicated.
The astronomical almanac data for the sun is machined into a replaceable module that covers a particular quarter of a year. Our data is for fourth quarter, 1938 (Figure 5). The replaceable unit is the shiny mechanism in Figure 9. Close examination show part of a large gear with a track cut in it. This is the data.
An interesting historical note: the Fairchild A-4 was used by Howard Hughes of his flight around the world in 1938.