Guns And Ammo

So this is about the closest photo I have of my own making related to the subject.

Anyhow, about 50 years ago there was this guy Don who worked at the UT Astronomy Department, and he left and formed his own engineering company. He rented offices on Lamar Blvd. and later moved to space in the back of a pharmacy he had built for his wife, who was a pharmacist. Anyhow we did some contracts for the university, and we were looking around for other work.

The Federal Register lists open contracts for bid, and one Don spotted was for the design of a machine to unscramble 20mm ammunition. Yeah, there is a lot of story there, but first we had to figure out how to win the contract.

The problem was this. The war in Vietnam was winding down, but they still needed scads of 20mm ammunition, and the stuff was shipped to the field in crates. But guns needed the cartridges linked into belts, and they already had machinery for that. Ah ha! I had some experience with that. On the Kitty Hawk we had a belting room with one of the machines, and I had worked with it ten years before.

But the problem is the belting machine has a tray, and you load the cartridges into the tray, which was curved into an arc, because the cartridges are bigger around at one end, so when they roll they roll in a circle. The belting machine is powered, so as long as you kept the tray full of cartridges and the link feeder full of links, then the machine would spit out long chains of belted ammunition.

But the problem was you had to hand transfer cartridges from the crates and place them onto the tray. The military saw this as a manpower-intense activity they wanted to eliminate out in the field. That’s where we came in.

Statement of problem:

  • You have a bin full of pilled up cartridges.
  • You want to sort them out so the pointy ends are all in the same direction.
  • And you want to feed the sorted cartridges onto the tray.

We saw the main problem to be getting all the pointy ends in the same direction. But wait. Surely this problem has been solved before. Yes, of course. In a bowling alley. The pin spotters sweep all the pins into a bin behind the end of the lane, and they line them all up so the small ends are pointing in the same direction, then they feed them into the spotting machine. How did they do that?

We went to a nearby bowling alley. The manager listened, and he was agreeable. He allowed us to go and look. We looked. Yes! That’s how they do it. If you feed a random bowling pin into a chute with a drop-off at the end, the narrow end is lighter and will protrude farther before toppling into into the cavity below. All you have to do is to put a shelf past the end of the chute to catch the small end while the fat end goes over the edge and falls first.

We obtained some dummy cartridges from a surplus store, and we made a movie. These were the days before camcorders. And we wrote the whole thing up, and we submitted our proposal. And we got the contract.

What to do next? We needed to go to Lake City Army Ammunition Plant in Independence, MO. Don and his partner Don and I put on our business suits (I had to purchase one), and we flew up to Missouri to check it out. And that’s what got me to thinking about this, because the contractor operating the plant was Remington Arms, and I noticed on the news this week they were filing for bankruptcy. But to the plant and what is really interesting.

We got the plant tour. Here is where they made the 20mm cartridges. Here was the machine that assembled the brass casing, the primer, and the warhead. In case you did not know, 20mm rounds are explosive. And here was the very machine. And it was pushing the cartridges out onto a flat surface, and they were all standing upright with the pointy end up. And here the cartridges were pushed out as more fed onto the flat plate, and here the cartridges fell off the edge of the flat plate into a bin, creating the problem we needed to solve.

I tell you I almost blew the whole deal. I was tempted to remind Remington they should not do that, but then there would be no problem for us to solve. And that was that.

Except I learned what will absolutely amaze you. These 20mm cartridges were coming out of the plant at about $1.00 each. Mind you, this was 1971, but that was still cheap.

Wait, there’s more. Remington took us around to see the machine making 7.62mm ammunition. It was a sight to behold. There was a lot of chugging going on inside, and there was a chute at one end, and out that chute flowed a river of 30-06 cartridges. A river that never stopped. And I believe my memory is correct, but they told us these were being produced for a penny a piece. Shooting enthusiasts, eat your hearts out.

Life Under Quarantine

How to win an argument with your wife

There will likely be a single installment of this series.

So, we are cooped up with not much to do. Things get edgy from time to time. Barbara signed up for these Great Courses on the Internet. It’s streaming video you can watch on your Roku box or whatever. So she insisted I watch this one on nutrition, and I said sure. A few weeks late she recommended I watch the one on nutrition. I was beginning to get the message.

I clicked the box on, and up came a large screen of choices. Great Courses. Where are the Great Courses? Barbara came to help. Right there (and she did not add “idiot”). So I clicked on the frame, and up came a menu of chapters—First, Second, etc.

But she said she didn’t think it would be possible for me to watch  Chapter 1, because she had already watched to Chapter 7, and the site would not allow be able to play Chapter 1 while Chapter 7 was playing.

I said it would be no problem. She said she thought there would be a problem. I insisted, no problem. She continued to express skepticism. I decided it was time to pull rank and settle the argument.

“Which of us has two United States and foreign patents on video streaming technology?”

Yeah, you don’t want to do that very often as long as you both need to live under the same roof.

Quiz Question

Number 263 of a series

See the diagram above. The top figure shows a steel bar supported at its ends. It is one inch thick, and it will support 6000 pounds.

The contractor does not have any one-inch-thick bars, so he stacks two 1/2-inch-thick bars instead. How much weight will this arrangement support?

Post your answer in the comments section below. Extra points if you explain your answer.

The Red Phone

Revisiting a Tale from the Past

I was reviewing a movie from 1975, and it featured a place that brought back memories. It came about this way.

Twenty-six years ago I was looking for a job, and I hired on at a company in Richardson, Texas. It was an interesting bit of enterprise. It was a wholly-owned subsidiary of Chrysler Corporation, and it did military contracts. They were in a rush to get their software done, and they were scrambling to fill in some slots.

I worked that project to death, and this forced my employer to either fire me or to find something to keep my hands busy while they looked for someplace to put me. They told me, “Why don’t you go over and work on the Secure Digital Switch (SDS) project.” I knew the company had this contract, and it was a different kind of work. It was 100% telecommunications. Some elaboration.

Your government does not content itself to operate on the nation’s commercial phone system. they have their own, especially for talk that involves national secrets. So decades ago they re-invented the T1 line, what commercial phone systems have been using since 1962. Since Alexander Graham Bell developed the Bell System in the 19th century voice had traveled over wire in analog form. Your voice is a train of air pressure waves, and for nearly a century telephone sets always converted these pressure waves into electric waves, the peaks and valleys of the electrical waves mimicking the pressure waves of your voice. T1 and later versions in the series carry sounds as trains of numbers, each number representing the value of the pressure wave. A T1 line carries 24 separate voice links along a single wire.

What the United States Government did was to add another channel to carry signaling information. Yeah, there was no way you could tap a commercial line into an SDS wire and make that work. Anyhow, the SDS incorporated a features to not only encrypt the communication channels, but to control which phones could participate in which conversations. If some Air Force majors were holding a conference call with their secret clearance, and the general barged in with his top secret clearance, the switch would drop all phones not cleared for top secret from the conversation.

And that all worked nicely, and my employer had the contract to manufacture and maintain the switches. They also made the phones. See the image above. They are called “red phones” for no good reason, because they are as you can see.

But there was a problem, and I’m guessing nobody else wanted to work on it. And that’s where this place comes in.

That’s the Allied Forces Southern Europe command center in Naples, Italy, and they had one or more of our switches. Secure phone links ran from here to various other bases, and they had a method for testing the links. They would have somebody at the opposite end of a link, e.g., in Germany, break a link and feed it back to Naples. Then they would send out stuff from Naples, and determine the same stuff came back. It’s called a loop-back test. And when the test was completed they would undo what they had done, and the link was usable again. Only there was a problem.

If, for example, the general was talking on the phone to Germany when somebody ran the test he would lose his connection momentarily. Then it would come back and the general would continue talking with a puzzled look on his face.

And sometimes not. Sometimes the disconnect and reconnect would interrupt a control signalling packet, and the switch on the other end would never get it. And the communication link would lock up. Permanently. Have you ever seen a speechless general?

Anyhow, they said, “Fix it.” And I said, “I think I might need some help, like where is the code for the switch, and not only that, where is the code for the line multiplexers?” They said, “Here are some copies of the source code, and, by the way, the code for the switch runs on a Motorola 6803, and it’s in assembly language, and the code for the multiplexer runs on a Motorola 68000, and it’s written in C. And also, there is this guy named Dave on the third floor who used to support this code, but he’s not available to help you, because we don’t have the budget to pay him. You’re on your own.”

The switch had VME boards, which you could pull out and put on an extender so you could get at the circuits while the switch was running. It was necessary to clamp a logic analyzer onto the pins of the processor and track the execution of the code to see what went wrong when the link locked up.

And that’s what occupied the next six months of my life, and that’s why the Southern Command in Naples will always have a dear place in my heart. So when I was watching the movie The Human Factor, and I saw where the George Kennedy and John Mills characters worked I nearly fell out of my seat.

To wrap up the story, I eventually worked out a fix, and I tested it, and it worked. When the connection was broken and reconnected, the new software detected what had happened and fixed things up. The fix required changes to the switch software and the software on two kinds of multiplexer boards. That done, I realized the phones would need to continue to work while people were switching out the software in the switches and multiplexers, so I had to make changes in the phone software. That’s how I got to see the inside of the phone that sits on the President’s desk. Rather, one just like it. The neat thing about these phones is you don’t need to take one apart to change the software. The software is changed by essentially calling up the phone and sending it some special signals along with the new code.

Years later I was doing a visitor’s tour of the Pentagon, and I saw one of the phones on somebody’s desk. I resisted the temptation to pick up the unit and see the company name on the bottom.

The picture is not all that pretty. Before I finished with the phone software I got a better offer from another company, so I dropped by my boss’s desk and gave him my 30-day notice. He assigned another guy to complete the work, and I worked mightily to bring him up to speed. Not only was he too inexperienced, but he had zero fascination for the work. He was, himself, shopping around for another job. I do not know to this day whether the phone software got fixed.

Quiz Question

Number 188 of a series

Suppose you have a bar of metal, and you know it weighs more than 15 pound and less than 20 pounds. You have three scales (see above), and each has a maximum capacity of 5 pounds. Can you weigh the bar using the three scales? Hint: you can’t cut the bar into pieces.

Post your answer in the comments section below.

Update and Solution

Greg has already provided a workable solution. See the comment below. Here is mine. See the diagram.

The rules don’t say anything about employing extra equipment, so I have added a support block on the left and two wedge-shaped bars. I line the three scales one behind the other on the right and bridge them with a wedge. I place the other wedge on the support and lay the bar to be weighed as shown. Make sure the same amount of the bar overlaps on each end, and now the three scales support half the weight of the bar. Add the readings of the three scales to get half the weight of the bar. Account for the extra weight of the wedge.

If the bar is not uniform in thickness, then reverse the bar and do a second weighing. Sum all six scale measurements, accounting for the weight of the wedge, to get the weight of the bar.

Quiz Question

One of a continuing series

Airliner crosses Vineland Avenue North Hollywood while landing at Burbank Airport

This is the kind of question that sometimes comes up in engineering.

An engineer is tasked with designing a new airplane, with two requirements. The airplane must be able to carry 8 passengers, and the design must use engine model A3-28, made by the boss’s company.

The engineer completes a design, and then does some calculations. The plane will not fly with a single engine of that model, but it will fly with two engines. The engineer’s boss tells him to modify the design and use two of the engines.

The engineer knows this is a bad idea.


Post your answer in the comments section below.

Quiz Question

One of a continuing series


There was a previous Quiz Question involving stress concentration in structural members. That got me to thinking about strength of materials. Here is an interesting fact:

First, modulus of elasticity is a measure of the amount of stretch per cross-sectional area for a given load. For example, the modulus of elasticity of structural steel is in the order of 200 GPa. For specially-treated tool steel the modulus is about 207 GPa—not much better. Yet the tool steel will take ten times the load before rupturing. Does this make sense, and why?

Post your responses in the comments section below.

Update and answer

Greg has the right answer. Hardened steel is nor more rigid than structural steel. It just stretches farther before yielding. It’s counter intuitive that something like a hardened tool bit is just as pliable as an untreated steel bar.

Quiz Question

One of a continuing series


The illustration above shows two structural steel rods. The rod on the left is three inches in diameter. It will pull apart at 254,000 pounds. The rod on the left is the same, except the ends are enlarged to five inches diameter. When you pull on the ends of the rod on the right it will pull apart at measurably less than 254,000 pounds.


Post your answer in the comments section below.

Update and answer

Greg provided the correct answer, which is “stress concentration.” In the configuration at the left the stress is uniformly distributed, but on the right the stress is concentrated along the outer edge. Some background.

Stress is load concentration, mechanically equivalent to pressure. It is, for example, pounds per square inch. Strain is an objects response to stress. Strain is deformation induced by stress. Strain is a dimensionless quantity, such as inches per inch. It is deformation in inches per total length in inches.

It is not stress that results in failure of a mechanical component, but ultimately strain. For a material, structural steel for example, as you exert a force to pull the sample apart it stretches. The effect is more pronounced in objects made of rubber, and the resulting strain of a steel part may not be apparent. A solid steel bar stretches just like a spring when you pull on the ends, usually not enough for you to notice. Unless you pull really hard. As you pull harder, eventually the steel stops acting like a spring and ceases to offer additional resistance the more you pull. While the load stays constant the steel continues to stretch. The steel has entered into the plastic deformation range.

If you continue to pull you will pull the steel bar apart. This is called rupture, and it’s the failure mode in tension for materials like steel.

When you pull on the sample on the right what you might not notice is that the strain in the center of the bar is not as much as the strain around the outer regions. That is because the extra thickness provided by the shoulder keeps the region adjacent to the narrow section from moving in response to the load. In the shoulder region the center is pulled down farther than the outer region. Within the thin section of the rod the outer region adjacent to the shoulder now stretches more. The strain is greater. The sample on the right, in this example, will start to rupture before the load reaches 254,000 pounds. When the outer region starts to rupture the load shifts to the inner region, and the bar pulls apart before the load reaches 254,000 pounds.

What you see in aircraft structures and in other structures that operate near the limits of materials is great care to reduce stress concentration. To the extent possible, sharp concave corners are eliminated. Structural members that neck down to smaller dimensions do so in a gradual manner.

Quiz Question

One of a continuing series


When you want to turn on the stair lights while going up the stairs, and you want to turn them off once you get to the top, you need this bit of minor technology. The lights are controlled by two switches. One switch is at the bottom of the stairs, and the other switch is at the top. The switches are “double throw” type. That means the switch is connected to two circuits, and the switch has two positions. When you toggle the switch it turns off one circuit and turns on the other. If the light was on, then throwing the switch turns the light off. If the light was off, then throwing the switch turns the light on. Neat.

Now suppose you have a three-story house, and you want to turn the stair lights on when starting up, and you want to turn the lights off when you get to the second floor, and also off when you get to the third floor if you are going that far. How are you going to be able to achieve that? Do you need a new kind of switch?

What if you have a 15-story house?

Post your answer in the comments below.


Some comments have been received, and it’s apparent clarification is needed. This Quiz Question involves single-pole, double-throw switches. Here is how a SPDT switch works:


Update and Solution

The two-switch feature can be extended to more than two switches, but the configuration I had in mind does not work. I had to go to Wikipedia for a workable solution. First, here is how the two-switch configuration works.




Switch 1 and Switch 2 are SPDT switches. In the first configuration no power is supplied to the load, which is typically a lamp. In the second configuration power is supplied to the lamp, and it turns on.

It is trivial to extrapolate from this and determine that flipping either switch turns on an off-lamp and turns off an on-lamp.

To extend this idea to more than two switch requires a different kind of switch, but still a mechanical switch. The following are from Wikipedia:

Readers are invited to visit the Wikipedia article, following which they will be able to install multi-way lighting switches for their five-story condo.

Quiz Question

One of a continuing series


Steve and Greg, hold off answering this week’s Quiz Question until some others have had a crack at it.

When you go into Home Depot and purchase some electrical wire, you will notice it comes in different sizes. Wire diameter is specified by its gauge. The deal is the smaller the gauge the thicker the wire. You may not also know that a similar gauge system is used for sheet metal. 8 gauge sheet is getting toward boiler plate thickness. 32 gauge is some thin stuff.

When it comes to shotguns, a gauge system is used to specify the bore. The very common 410 shotgun is not a gauge measure. I could be wrong, but I think a 410 has a 0.410-inch bore. The only common shotgun gauges I know are 10-gauge and 12-gauge. Doesn’t matter.

This week’s Quiz Question is, how is a shotgun gauge determined?

Provide your answer in the comments section below. No need to post your answer on Facebook. I always do that when I post the answers.

Quiz Question

One of a continuing series


Here’s something that came up a few years ago. It has to do with GPS technology, but you don’t need to be GPS-savvy to appreciate it. It goes like this.

GPS employs 32 satellites, whose position is at all times precisely known. Each satellite broadcasts to Earth continuously. The signal contains a lot of stuff, but the critical information from each satellite is:

  • I am here.
  • The time is …

A GPS navigation receiver doesn’t need to know the direction the signal is coming from. All that is necessary to determine your position is the preceding information from each of three or four (four is best) satellites.

From the information received, a navigator can determine where all satellites were at the same time. And it can determine how long it took each satellite’s signal to reach the receiver. Knowing the speed of propagation of the radio signal, the receiver can compute the distance to each of three (or four) known points in space and therefore compute its own position in 3-D space. If it knows the speed of propagation of the radio signal.

The problem is the speed of propagation through the atmosphere to the receiver is not constant. It varies due to the presence of free electrons in the atmosphere. There are two solutions to this difficulty. One is to incorporate an atmospheric model into the receiver’s computation, and this is done. It’s called the Klobuchar model, after the person who developed the mode. It’s not very accurate.

For extreme accuracy, the atmospheric delay can be measured directly. To do this, a second transmission channel is incorporated.

The two satellite transmission channels are called L1 and L2. All receivers can use L1. L2 is encrypted. You have to have a secret key, available only to the U.S. government, to use the L2 channel. The two channels operate on somewhat different frequencies, and the atmosphere delays each channel differently.

And that’s all you need to know if you can receive both L1 and L2. You do not need to know in advance how the atmosphere delays each channel. The receiver can deduce the atmospheric delay from each satellite, and from that it can compute the position of the receiver to very high degree of accuracy.

When I first encountered this it was obvious to me there was not enough information to compute the atmospheric delay. So I asked a guy working on the project how this was supposed to work, and he stopped what he was doing and explained it to me. I still didn’t understand it, but I took my notes back to my cube and looked at it some more. It was an “oh shit” moment. “Of course, dummy.”

And that’s this week’s quiz question. How can a GPS receiver compute the atmospheric delay from the information given, using L1 and L2?

Post your answer as a comment below. I’m going to give this a few days and then post a hint.

Update and hint

I’ve had no activity on this Quiz Question all week. It’s time to provide a hint. Look at the problem again.

You have two radio signals originating from the same location at the same time and arriving at the receiver at different times. Because of ionospheric delay, you don’t know how long it took either signal to traverse the unknown distance to the transmitter. How can you use the information available to determine the distance to the transmitter. Here is the hint.

The satellite is moving. In the order of miles per second. Its distance from the receiver changes from one transmission to the next. How can you use multiple measurements to compensate for the ionospheric delay?

Update and solution

Time’s up. I need to post the solution to last week’s Quiz Question, because tomorrow’s question is going to be related to compensating for ionospheric delay. I’m not going to do the math. Instead, I’m going to pose the question in a different way that will make the solution obvious. It goes like this:

Forget satellites. There are two rail lines running parallel for miles over the horizon. You’re standing at a point along the rail lines waiting for two trains (call them A and B) to arrive. The two trains are going to start at the same time from the same location, and they are going to come at you at different speeds. You don’t know what the speeds are, but you know the speeds of A and B are different, and they are constant.

Trains A and B arrive. A arrives shortly before B. You note the time difference. You don’t have enough information to determine how far away the station (starting point) is. You move down the line a few miles, carefully noting how far you move.

Two more trains, also labeled A and B head your way from the station. Same as before. A arrives, then B arrives later. You record the time difference. Of course the difference is greater, because you are farther from the station, so the trains have had longer to diverge.

Now you ask yourself this question. “How far do I have to walk toward the direction the trains came from for the difference to be zero?” That’s the distance to the station.

In the case of GPS with channels L1 and L2 it’s the satellite that moves, and since the satellite is always telling you where it is, you know how much farther (or closer) it has moved from you between two measurements.

There is obviously more to it, so if anybody still has questions, post a comment and extend the dialogue.

Adventures In Hyperspace

Examine the following:


That’s pretty dull. It is something familiar to any school child, even those not majoring in math or science. The horizontal line is the x-axis of a coordinate system, and the vertical line is the y-axis. They are said to be orthogonal. They are orthogonal in two senses of the word: they form a right angle, and they are mathematically orthogonal. In the second sense measurements along the x-axis are independent of measurements along the y-axis. You can move all you want in the x-direction without affecting your position in the y-direction.

There’s more. For example, suppose x and y represent east and north. Then up can be represented by z. Now we have a system of three coordinates, and they are mutually orthogonal. Movement in the up direction does not affect your position in the east and north directions.

You may need to close your eyes to imagine the next part, but you can add a fourth orthogonal coordinate to this representation of space, and you will have a four-dimensional space. I can’t draw it, so I have to deal with it in a purely mathematical manner. The principles of geometry that hold for three-dimensional space can be extended to higher-dimensional spaces. And that’s what I did.

Next look at this image.


The curve comes down from the left, reaches a low point and then continues upward to the right. The task is to locate the low point of the curve. You want to do it by an automated process for reasons that will be made clear later. The straight line is tangent to the curve as shown, and the short vertical line is the x-coordinate at the point of tangency. If you have a mathematical function for the line you can compute the derivative of the function, and the derivative is the slope of the tangent line. You can see that the slope of the tangent line will be zero at the low point, so if you find the point at which the slope is zero, then you have determined, mathematically, the x-coordinate of the low point—the minimum value of the function.

See the diagram.


The problem of finding the minimum point of a function devolves into finding the point at which another function, the derivative, is zero. There is a mechanical process for finding the zero of a function, and it’s called the Newton-Raphson method, after Isaac Newton and Joseph Raphson. The utility of this method is it can be performed by a computer.

Now suppose that what you have is not a line function but a surface function. My Microsoft Excel was not able to draw such a surface, so I obtained this one from Wikipedia.


You can find the low point (minimum) of this surface by a method similar to the one above. And that’s what I had to do. There was a project I worked on, no government secrets involved, and we were flying a Convair transport plane carrying multiple imaging systems. We collected visible, infra-red, and laser radar images, and when we got them all back to the lab we needed to determine what the system was looking at at for each image. To do this we needed to know where the airplane was at the time the images were made. As accurately as possible.

We had multiple sources of information. We had an inertial guidance system (INS) and a transponder locater system. And we had more. The problem was the sources of information were in disagreement about where the airplane was with respect to time. It was going to be necessary to apply corrections to the various inputs to minimize the error.

Without getting into the details of how I spent three months of my life, I developed an error function based on the data inputs just mentioned, and my goal was to apply corrections to the input data in order to minimize the error function. See where this fits in? I needed to compute the minimum of a function.

But this was a function in multiple dimensions. Ultimately it grew to a function in ten dimensions. I needed to minimize a function in ten dimensions.

Inspiration came from the surface function. You can use the Newton method to compute the minimum of a surface if you follow this approach, and if you have a well-behaved function.

Start with one axis, for example the x-axis. Compute the minimum for a given value of the y-axis. That is, move along the x-direction while holding y constant. Compute the minimum of the curve defined by the x-values alone. Once you have done that, switch to computing the minimum along the y-axis, using the x-value for the minimum just computed. Repeat until you have finally reached the minimum of the surface.

What I figured would work was to just continue the process into the higher dimensions. Take each axis in turn, holding the other coordinates constant, and compute the minimum. Then go to the next dimension and the next and the next until you have gone through all the dimensions of the error function. Repeat until the solution does not get any better. You have computed the minimum of a function in multiple dimensions.

There was one small hitch. I did not have math functions for the data, just values from a table. To make this computable I needed to supply math functions, and to get math functions I needed to fit curves to the data points. And that’s another story, which I will delve into in another post.

We ran this problem on a VAX computer, which was no slouch of a system in those days, but which would be in the shade of the laptop computer I’m now using to describe all this. And the VAX chugged through solution after solution and computed the position on the ground the cameras were looking at, and when we pulled up the images associated with well-surveyed points, there were the objects that were supposed to be there. To a certain degree of accuracy. It was never perfect. But that’s the way it is in engineering.

Wait, there’s more. After I did all this I learned of an even better approach. It was in a book I already had on my shelf but had not read from cover to cover. It’s a method by Nelder and Mead, and code is available from the book:

We give in §10.4 a somewhat neglected downhill simplex method due to Nelder and Mead. (This use of the word “simplex” is not to be confused with the simplex method of linear programming This method just crawls downhill in a straightforward fashio that makes almost no special assumptions about your function This can be extremely slow, but it can also, in some cases, be ex­tremely robust. Not to be overlooked is the fact that the code is concise and completely self-contained: a general N-dimensional minimization program in under 100 program lines! This method is most useful when the minimization calculation is only an inci­dental part of your overall problem. The storage requirement is of order N2, and derivative calculations are not required.

[Press, William H., et al: Numerical Recipes in C, Cambridge University Press. 1988 p 292]

Quiz Question

One of a continuing series

One of the last useful things I did during my Navy Reserve tour was work in the Sidewinder shop at NAS Dallas. My first encounter with a Sidewinder was educational. There was one on a work stand, and I looked it over. One thing I noticed was that each of the rear stabilizing fins featured a curious mechanism. See the photos. I have scrounged up three so make sure people can get a good view of what I’m talking about.

On the trailing edge of each rear fin, at the outer corner, is a hinged fixture. The fixture is a flat plate with a solid brass disk enclosed in the plate so that the outer edge of the disk is exposed to the wind stream. The edge of the disk is serrated, and the disk is mounted so it can spin freely on its axis. The air stream spins the brass disk at high speeds. The flat plate is attached to the fin along its leading edge by a hinge so it can freely swing to either side.


An AIM-9 Sidewinder Missile installed on an F-14 Tomcat. The AIM-9 is a short range, heat seeking air-to-air missile.

An AIM-9 Sidewinder Missile installed on an F-14 Tomcat. The AIM-9 is a short range, heat seeking air-to-air missile.


So, when the missile is fired, the brass disk is spinning very rapidly, and it’s mounted in the flat plate, which can swing from side to side. And here is the Quiz Question.

What does this arrangement do? If you are an engineer or a physicist looking at this you will figure it out immediately. Engineers and physicists are invited to have a go at this immediately. Post your answers in the comments section below.


Jim Medding has provided the correct answer that these tabs are used for roll stabilization. He left it for me to provide the mechanism.

This was over 50 years ago, but at the time I first examined this mechanism I was a full time engineering student and a part time Aviation Ordnanceman in the Navy Reserve. About five seconds, and it dawned on me. The tabs work this way:

The outer edge of each brass disk sticks out into the wind, causing the disk to rotate. Applying some basic principles of physics, If the missile rolls (to the right for example), then each disk will be rotated to the right. Because of the direction it’s spinning, the disk will apply torque on the hinged tab and force it to swing to the right, into the air stream on the right side of the fin it’s mounted on. That will produce an aerodynamic force to resist the roll in that direction. Similarly if the missile rolls to the left. These tabs with their rotting disks are an automatic roll stabilization mechanism with a built in control mechanism and requiring no power from the missile control system, which is located way forward on the missile body, anyhow.

It was so slick, I never forgot about it in all this time, and I tip my hat to the engineer who came up with the concept.

Quiz Question

One of a continuing series

See the diagram below. This is how my thermostat works.


When the temperature reaches 76° the cooling comes on. The room starts to cool. See the next.


When the temperature reaches 74° the cooling shuts off. The room will now start to warm up, but the cooling will not come back on again until the temperature reaches 76° again. This feature prevents the cooling system from cycling on and off frequently around narrow changes in temperature. The feature is called hysteresis. The Quiz Question for this week is this:

What does this have to do with women?

Post your answer as a comment below. I will update the post with the answer on Friday.

Quiz Question

One of a continuing series

This one may be too easy. Here it goes anyhow.


In 1962 an Atlas rocket launched from Cape Canaveral went off course and had to be destroyed. The problem was traced to a snippet of FORTRAN code. Here it is:

DO 55 J = 1.100

What’s wrong with this code? What was it supposed to do, and what did it actually do?

People who’ve been programming for more than 50 years are not allowed to answer this question. Give the newcomers a cut at it first. I will update this post with the answer if there is no correct response by Wednesday.


Steve provided the correct answer. With a comma this is the beginning of a DO loop. With a period it becomes an assignment. FORTRAN programmers should know that the FORTRAN compiler throws away all spaces. The space character is meant only for human eyes. Here’s how the above code appears to the FORTRAN compiler:


The compiler responds by creating a new variable named DO55J and assigns it a value of 1.1. No loop is created, and the rocket is lost.

Quiz Question

One of a continuing series

Racers aren’t allowed to answer this one.

The item pictured below is a carburettor jet.

Cycle Pro Pilot Jet for Keihin Carb

Cycle Pro Pilot Jet for Keihin Carb

Before just about everything went to fuel injection, there were carburettors. Carburettors supply a mixture of air and fuel to the intake ports of piston engines. They work this way.

On the intake stroke of an engine, the piston moves down, drawing air into the cylinder. Air flows rapidly into the cylinder, passing first through the carburettor. The air stream through the carburettor, because of its forward motion, exerts reduced pressure against the side walls of the port. The carburettor jet connects the air stream to a supply of fuel in a float bowl, a small reservoir of fuel in the carburettor body. The reduced pressure causes fuel in the float bowl to be forced through the opening in the jet and into the air stream. The fuel mixes as a spray with the air stream and is carried into the combustion chamber.

The carburettor jet has a measured opening for the fuel. A larger opening will allow more fuel to flow into the air stream. Here’s the question. A motorcycle racer (for example) arriving at the track in the morning observes it’s a warm and humid day. He opens up his race kit box and selects a set of jets with larger openings and installs them in all the carburettors in his engine.

Why? Why does the racer know he’s going to need a larger jet?

Provide your answer as a comment below. If nobody provides the correct answer by Friday I will post it here.


The answer to the Quiz Question is that warm air and moist are are less dense. The equation shows the relationship between pressure (p) and density (ρ) for incompressible flow. I’m using this, since no compression or expansion of the air takes place inside the carburettor throat.


The velocity of the airflow is v. The remaining terms are g and z, the acceleration of gravity and the altitude, neither of which figure into the carburettor operation, all other things being equal. For a given velocity, p and ρ must be proportional. If ρ goes down, p must go down. When the air is less dense the pressure must go down. You need a larger opening in the jet to allow the proper amount of fuel into the air stream, else the cylinder will burn too lean. The result would be a burned piston.

Stand by for another Quiz Question on Monday. And keep reading.

Quiz Question

One of a continuing series

An automobile engine, as everybody has experienced, can develop a maximum amount of power at the drive shaft. This is to be expected. The chemical energy available from fuel and air is fixed for a given flow rate, and an automobile engine reaches a maximum flow rate.

How about a rocket engine? Amazingly, rocket engines don’t have this limitation. Here’s an illustration:


Exhaust gases exit the rear of a rocket at a velocity v (lower case v). The thrust accelerates the rocket body in the opposite direction. At any instant it has a forward velocity V (capital V). The thrust produced by the escaping exhaust gases is constant, no matter how fast the rocket is moving.

The power produced by the rocket motor is given by:

W = fV

The power, W, produced by the rocket motor is the thrust, f, multiplied by the forward velocity, V.

How can this be? The rate of chemical energy expended is constant, controlled by the binding energies of the reactant components. These should not be dependent on forward velocity. Yet, as the rocket goes faster more power is produced. Is this a paradox? If so, what’s the resolution of the paradox?

Post your answer in the comments section below. I will provide the resolution by Friday if nobody posts a solution by then.


Time’s up. Nobody has been addressing this week’s Quiz Question recently, so I’m posting the answer.

This Quiz Question is a good illustration of a property of energy, kinetic energy in particular. Kinetic energy is dependent on the frame of reference. Revisit the illustration above. In a particular inertial frame of reference the rocket has zero kinetic energy, even several seconds after firing the propellant charge. At any instant in any particular inertial frame of reference the chemical energy of the fuel is being converted to kinetic energy: kinetic energy of the rocket and kinetic energy of the exhaust. At any instant the energy conversion is divided between the rocket and the exhaust. Here are two examples. The frame of reference is the one in which the rocket has zero velocity at the time the propellant charge is fired:

  • At the moment the propellant charge is fired the rocket is not moving. All the chemical energy from the rocket fuel is feeding into the exhaust gases. The rocket motor is developing zero power.
  • Some time later, the rocket is moving. Some of the energy conversion is going into the rocket, and the remainder is going into the exhaust gases. The total is constant. It is the rate of conversion of chemical energy. The rate at which kinetic energy is added to the rocket is the amount of work done on the rocket. This is the definition of the power of the rocket motor. It is the thrust of the rocket motor multiplied by the velocity of the rocket in the frame of reference defined above.

If  any of these points need additional explanation, paste a comment below.

Next Monday, a new Quiz Question. Some people are going to know the answer immediately.

Quiz Question

Forty-five years ago I worked for an engineering consulting company. We did design and development for companies that did not have their own engineers.

This was at the dawn of self-service gas stations, and new companies were getting into the business. One had a chain of stations called Fill-Em-Fast. It was Autotronics out of Houston. What they wanted was to get sales information on a daily basis. This was before the days of the Internet and instant sales reports. What they wanted us to do was to electronically record sales information, gallons and dollars, from each pump. At night, when phone rates were low, the home office would phone each station in turn and retrieve the sales information from the station’s box. We designed that.

This Quiz Question regards a problem involving the retrieval of sales information from pumps. These were the mechanical pumps of your grandfather’s day. There was a mechanical display operated by gears as the fuel was dispensed. We figured all we needed to do was to hook into the rotation of the gear shafts and read the revolutions, or increments of same. That’s where the following image comes in.


We would fit an extra spur gear on the shaft we wanted to read off and just count the gear teeth as they went by. Don Ninke was the EE in charge of this, and he came up with a design that counted teeth with an optical interrupter. An LED would send out light, and a photo-diode would receive it. Gear teeth would interrupt the beam, and we would count the pulses.

It didn’t work. It counted too many teeth. And that’s the Quiz Question. Why didn’t this work? Why was this design counting too many teeth?

Part two of the Quiz Question: How did Don fix the problem and count the correct number of teeth?

As always, post your answers in the comment box below. I will provide the answer Saturday, or before.


Mike has provided the answer:

Backlash. If you have two sensors, you can tell the direction of motion.
Used this technique on the automobile odometer cable for a time-speed-distance car rally computer.

Mike obviously has had some engineering experience. This is the solution Don Ninke came up with. The applicable term is “quadrature.” Set the two sensors out of phase by 90°. If the gear backs up a tooth, one is subtracted from the count. See the diagram.




Counter rotation of the gear shaft typically occurs when the mechanism stops. There’s not much problem when the pump is running, and the shaft is turning continuously. Discounting spurious pulses has two benefits:

  • You don’t over charge the customer for an extra tooth’s worth of gas.
  • At the end of the day you don’t have have the accumulated error of these extra counts, which would screw up the accounting. There were separate shafts for the dispensed gas and dollars charged. They really need to match at the end of the day.

Interesting thing to note: The only computer used in the system was a Data General Nova 1200 mini-computer. That was installed in the home office in Houston, and Wayne van Citters and I did the software for the Nova.

The electronic box that Don Ninke designed employed no processors. It was all series 7400 logic chips from Texas Instruments. It counted pulses and recorded sales from the pumps, accepted calls over a phone line, and spewed out the sales data for the day over an RS-232 link.

About this time (early 1972) we learned there was a company developing a computer on a chip. We requested and obtained a spec sheet dated late 1971 from Intel. I still have it—two Xeroxed sheets on the 8008 microprocessor. It was an amazing time.

Quiz Question

One of a continuing series

See the diagram below.

For about eight years I worked for a company that made document processing systems. One of the company’s inventions was a high-capacity ink jet printer. It worked as shown.


There was a nozzle that spit out 105,000 ink drops per second. A variable voltage was applied to the nozzle, which charge was retained by each ink drop as it exited the nozzle. The voltage was changed for each drop.

The drops passed between two charged plates. Drops with differing charges were deflected in different directions by an amount proportional to their charge. It was a touchy situation. The voltage needed to be something like 5000 volts between the two plates. Not enough voltage, and the drops would not be deflected enough. Too much voltage, and electricity would arc between the plates. I spent weeks getting a configuration that would work. Ink drops were properly deflected, and there was no arcing.

We installed our systems in major banking and financial centers around the world. Then I asked a question. “Do we have any customers in Denver?”

And the quiz question is this. Why did I ask that question?


Mike apparently saw the answer right away. I asked him to hold off before posting his comment. And here it is.

From high school physics we know that dry air breaks down at 25,000 Volts per inch. That’s dry air at sea level. When the air gets thinner at higher altitudes it breaks down at lower voltages. This arrangement featured two charged plates operating on the verge of breakdown. That was one of the big problems, as noted in the statement of the problem.

It was obvious when we finally got this thing to working that it wouldn’t take much to tip the balance and induce arcing. An increase of one mile in altitude would surely do it.

As it turns out we didn’t have any systems installed in Denver, La Paz or any other troublesome locations.

Provide your responses in the comments below.

Quiz Question

One of a continuing series

Here is a photo from a nearby service station. Note the price of diesel.


The first question is:

1. Why does diesel fuel cost more? That is to say, why are drivers, especially big truckers, willing to pay more?

The second question is for after you answer the first question. It will be revealed after you answer the first question:

2. Why?


There have a few responses, at least one that accounted for some of diesel’s advantage. Prasad commented:

Diesel is denser and longer hydro-carbon chains than gasoline, which is lighter and more volatile. Hence gasoline has less energy per gallon than a gallon of diesel.

Since it can make cars/trucks go farther with the same volume of fuel it is still economical to buy diesel at a higher price than gasoline (for the same volume.)

I guess they are charging it by energy content.

Here are the facts concerning relative energy content:

As of 2010, the density of petroleum diesel is about 0.832 kg/L (6.943 lb/US gal), about 11.6% more than ethanol-free petrol (gasoline), which has a density of about 0.745 kg/L (6.217 lb/US gal). About 86.1% of the fuel mass is carbon, and when burned, it offers a net heating value of 43.1 MJ/kg as opposed to 43.2 MJ/kg for gasoline. However, due to the higher density, diesel offers a higher volumetric energy density at 35.86 MJ/L (128,700 BTU/US gal) vs. 32.18 MJ/L (115,500 BTU/US gal) for gasoline, some 11% higher, which should be considered when comparing the fuel efficiency by volume.

That’s an 11% advantage over gasoline. Since the fuels are priced by volume this gives diesel a slight advantage with the prices shown in the photograph, which shows diesel costing 10% more. In order to get a price advantage that would make it worth while to drive diesel over gasoline, some other considerations need to be taken into account. These would involve the way diesel engines operate compared to gasoline engines.

Gasoline engines throttle the intake air. Diesel engines do not. A diesel engine would not work if you throttled the air intake. Operation of a diesel engine requires a full cylinder of intake air on the compression stroke in order to generate the ignition temperature. Diesel engines don’t use spark plugs. Each cylinder has a glow plug to ignite the fuel when starting the engine. After that the engine relies on injecting fuel into the hot, compressed air in the cylinder.

Diesel engines run at leaner fuel mixtures when the pedal is not pressed all the way down. The throttle is a fuel throttle, not an air throttle. Backing off on the throttle decreases the fuel injected into the cylinder, but not the air.

If you run a gasoline engine lean the combustion temperature goes up, resulting in melted pistons and burned valves. Not so with a diesel engine. Leaning the mixture in the cylinder only decreases the amount of fuel in the combustion and does not raise the combustion temperature.

Also, for comparable reasons, diesel engines typically run at higher compression ratios than gasoline engines. A 12:1 compression ratio is a racing engine for gasoline. Diesel engine compression ratios start at 12:1 and go up from there. Typical would be 14:1. Some engines run at 18:1. Basic principles of thermodynamics produce better fuel economy (more mechanical work from comparable chemical energy) for higher compression ratios.

Diesel vehicles may be making a comeback. Diesel engines are more fuel-efficient and have more low-end torque than similar-sized gasoline engines, and diesel fuel contains roughly 10% to 15% more energy than gasoline. So, diesel vehicles can often go about 20% to 35% farther on a gallon of fuel than their gasoline counterparts. Plus, today’s diesel vehicles are much improved over diesels of the past.

Given this, the 10% hit on fuel price does not look so bad.