To figure out precisely which fabric, even which fabric dye, would make the most aerodynamic ski suit possible, the aerospace engineer and high-performance director for the U.S. ski and snowboard team put a sensor on Bode Miller to gather more than a million data points as he swooped down the mountain.

“It’s the same technology used in missile guidance systems,” Troy Flanagan, the engineer, told Outside Magazine.

Olympic Figure Skating Stymied by Body’s Limits

Certain fabrics can increase speed as can the way they are layered, Flanagan said. Apparel sponsor Spyder took the data into the design room and incorporated the tech with some patriotic inspiration.

“What’s patriotic, but also fast and dynamic?” Matt Strackbein, Spyder’s production manager, told the Baltimore Sun. “The Star-Spangled Banner. The Olympics are a time when people are not afraid to literally wear the flag.”

Olympics: How U.S. Athletes Fool Their Bodies

The team unveiled the white and, yes, star-spangled, one-piece suits during training runs. They’ll make their competition debut when men’s downhill starts on Sunday.

The skintight, flexible suits feature stitching along the back to reduce drag. The tightness enhances compression in order to reduce muscle fatigue and soreness.

“We test these ski suits in wind tunnels, the same way they test cars,” Strackbein said. The skiers “get in a tucked position and we turn the wind up to 75 miles an hour.”

Photo: U.S. skier Bode Miller takes part in a Men’s Alpine Skiing Downhill training session at the Rosa Khutor Alpine Center on Feb. 6, 2014, before the start of the Sochi Winter Olympics. Credit Olivier Morin