(CNN) -- On a recent flight from San Francisco, California, to Atlanta, Georgia, Dr. Julie Gerberding was thrilled to get bumped up to first class. The thrill, however, quickly disappeared: As she did her victory walk to the front cabin, she noticed that the woman in the seat next to hers was hacking up a lung.
"She was on her cell phone, saying, 'I feel miserable. I just know I have swine flu,' " Gerberding remembered. "I thought to myself, 'Oh, great.' "
For the duration of her transcontinental flight, Gerberding played viral roulette as she sat shoulder-to-shoulder next to Ms. Sneezy in a confined space.
Gerberding, the former director of the Centers for Disease Control and Prevention, had a few strategies for avoiding this woman's germs, some of which you can use on planes, trains, automobiles and anywhere else if you get stuck next to Typhoid Mary -- or, in this case, H1N1 Mary.
Gerberding's first step was to point the air vent in the ceiling toward the sick woman and away from herself.
"That helped point the germs towards her and away from me," she said.
She then pivoted her body -- she was sitting on the aisle seat -- away from Ms. Sneezy.
"There wasn't much else I could do. At some point, I just crossed my fingers," Gerberding said.
Actually, Gerberding realized later there was one more thing she could have done.
"I could have approached a flight attendant and said, 'The person sitting next to me has swine flu. Could you please offer her a mask?' In retrospect, I wish I had done that."
On airplanes, you're most likely to catch an illness from the people sitting in your row and in the row behind you, according to researchers at Purdue University, who developed an animation showing how germs move around an airplane.
"The bad news is if you're in that strike zone, you're at risk," Gerberding said. "If someone sitting right near you has the flu, there's a pretty good chance you'll get it. Flu is very transmissible."
Gerberding adds that you probably won't catch the flu from someone sitting several rows away, since circulating air on planes goes through a HEPA filter. "
The good news is, if you're not right in that strike zone, you're probably at low risk," she said.
Whenever you're out in public, you can catch a germ from anyone within about six feet of you; that's how far some germs can travel, according to Dr. Rhonda Medows, commissioner of the Georgia Department of Community Health.
"Air droplet spray actually comes into your body. You're inhaling it. You're breathing those respiratory droplets," Medows said.
Another way you can catch a germ from someone is if you touch something a sick person has touched. For example, think about a busy escalator handrail.
"You and millions of others have touched it," Medows said. "And they could be sneezing, wiping their nose, coughing in their hands, and then they touch the handrail."
If you're healthy, your immune system should be able to fight off most of what's on a germy handrail, but even if you're in tip-top shape, chances are you have no immunity to the H1N1 virus, since it's so new.
Medows' strategy: After you touch something like a handrail, make a conscious effort not to touch your eyes, nose or mouth, and use hand sanitizer as soon as you can.
Charles Gerba, a microbiologist at the University of Arizona known as "Dr. Germ," says his research shows that another potential bastion of germs are water fountains. Some schools have actually shut down their water fountains for the duration of flu season.
But you don't have to avoid water fountains. Gerberding says that if you want to drink from a fountain, follow these simple steps: Don't let your lips touch the spout, and before taking a sip, let the water run for a few seconds to flush away germs. Also, wash or sanitize your hands afterward, since the bar or button that turns on the fountain has probably been touched by many other hands before yours.
You might be wondering why Gerberding didn't go back to her seat in coach or ask for another one when she saw she'd be sitting next to Ms. Sneezy in first class.
"It was a full flight ,so someone else would have had to sit next to her," she explained. "And I'm healthy, so I figured if someone had to be near her, better me than someone who's immune-compromised in some way."
By the way, Gerberding didn't get sick from Ms. Sneezy on that long flight from San Francisco to Atlanta. She says she doesn't know whether it's because of her germ-prevention strategies or just dumb luck.
CNN's Sabriya Rice, Caitlin Hagan, Sharisse Scineaux and Matt Sloane contributed to this report.