– For much of Wednesday, a small group of volunteers and researchers walked in and out of the surf testing a new form of surveillance on the biggest killer of beach swimmers — rip currents.

Again and again, the researchers toted 3-foot yellow-and-green contraptions fashioned from foam, plastic sewer pipe, gym weights and cheap GPS units into the surf, then walked along the beach to wherever the odd devices washed up and retrieved them under the gaze of puzzled sunbathers.

Rip currents are thought to be responsible for 80 percent of all U.S. surf rescues and are by far the most common reason that coastal swimmers drown.

"It's really frightening for swimmers because it's like an endless treadmill for them," said Simon Sanders, an ocean-rescue supervisor who was part of the research team.

The vast majority of his lifeguards' rescues, he said, were because of rip currents. The guards who know how to deal with the currents often use them to zip out more quickly to swimmers in trouble.

The nature of perilous currents is straightforward: Water piles up between the beach and an offshore sandbar, then finds a low point in the bar and rushes back out to sea, sometimes carrying swimmers.

But scientists have only recently begun figuring out the life-or-death nuances of the currents. The 22 "data-logging drifters" that the team on the beach deployed Wednesday up the center of a weak rip current are thought to be the first ever used on the East Coast.

The team hopes the research will lead to more accurate ways of predicting rip currents and also, perhaps, better methods of escaping them.

The gadgets float along as swimmers would and let researchers precisely and repeatedly track where the rip currents take them. They also gather other data on the currents' behavior, said Spencer Rogers, coastal erosion and construction specialist from North Carolina Sea Grant.

Sea Grant, which sponsors research, education and outreach on coastal issues, paid for the drifters and is partnering on the project with the National Weather Service, the Center for Marine Science at the University of North Carolina-Wilmington and several local lifeguard programs.

Last week, the surf was relatively calm and the likelihood of dangerous rip currents was at the lowest of three risk levels that the National Weather Service uses for predictions. The group had set up right in front of a rip current that had been seen in the same location for weeks.

The rip current clearly was happening, but the current was weak, and several swimmers and surfers bobbed cheerfully right in the middle of it.

The lack of danger actually underlined one reason why the research that could improve forecasting rip currents is important: They are unpredictable.

The currents develop constantly, but a given stretch of beach in North Carolina may develop the right combination of conditions to create lethally strong ones only five to 10 days a year, Rogers said.

"They're almost never dangerous, but when they are, Michael Phelps couldn't keep up with one," he said.