Petty Officer 1st Class Clarence Ilijic teaches Seaman Eden Boyd how to operate a sextant on the amphibious dock landing ship USS Rushmore in 2014. The Naval Academy has also resumed the training after a 10-year hiatus. (Mass Communication Specialist 2nd Class Amanda R. Gray/U.S. Navy)

Peter Hogan was surprised at how heavy the sextant felt in his hand when he squinted through its eyeglass this week, the first time he had ever held one. For centuries, sailors used sextants to plot their location on the trackless sea, lining up stars in the sky to find their own place on Earth.

Hogan is a sailor, too — a midshipman at the U.S. Naval Academy in Annapolis, surrounded by some of the most advanced geolocation technology ever devised. But even though GPS can pinpoint Hogan and his shipmates on the most remote oceans on the planet, the Navy is once again teaching them the ancient art of celestial navigation.

The U.S. Naval Academy brought celestial navigation, a means to find your way at sea without technological support, back to their curriculum after a decade-long hiatus. Find out why and watch a class in action. (Jhaan Elker/The Washington Post)

That’s because batteries run out, systems get hacked, and even advanced technology can be balky. In a pinch — or in a war — sailors need something to fall back on. And stars and sextants have been working pretty well for hundreds of years.

So the Naval Academy started teaching its sailors how to navigate ships by looking to the heavens again this academic year. The training was dropped altogether in 2006.

“I thought that we had computers and all that for navigation,” Hogan, 20, a Charleston, S.C., native said this week during a class on the subject.

But amid concerns about cyberattacks and new weapons that can shut off the electricity of a ship or a plane, the Naval Academy made celestial navigation a requirement for third-year students.

“Redundancy is the best policy,” said Lt. Alex Reardon, who taught three sections of the class. Especially because, when it comes to a Navy ship on the open seas, “we’re typically alone in what we do.”

That could be a major problem in the event of a cyberattack, said Salvatore Mercogliano, an assistant professor focused on naval history at Campbell University and a former merchant mariner.

“The big concern the Navy has is that some sort of event takes out the GPS system — that somehow a nefarious group or nation is able to disrupt it — and all of the sudden you have no means to cross the Atlantic or the Pacific because the system that you’ve come to rely on doesn’t work anymore,” Mercogliano said.

The fear of cyberattacks did not factor into the decision to resume celestial navigation training at the Naval Academy, said Lt. Commander Kate Meadows, a naval public affairs officer. But Reardon cited such risks as one of the reasons why students need the class.

Those students clearly had those threats in mind: When Reardon opened his class by asking them why they thought the Naval Academy brought celestial navigation training back, one said cyberattacks and another EMPs — electromagnetic pulses that could be weaponized to knock out power.

“Especially if you’re in a wartime scenario, maybe the GPS or the satellites are shot down — radar isn’t working or jammed — and you’re forced to go dark, so you can’t use your electronics,” then celestial navigation might become invaluable to a ship needing to figure out its location, Hogan said.

But it’s not just that sort of nightmare scenario that could cause a ship’s high-tech gear to stop working, Reardon said. During one of his recent tours out at sea, flooding in his vessel’s generators caused the whole ship to lose power — and while some systems had battery backups, they don’t last forever, he said.

“It was a little bit scary not being very comfortable with celestial navigation and being in that situation,” Reardon said.

Of course, power problems aren’t limited to the Navy, noted David Raymond, the deputy director of Virginia Tech’s IT Security Lab. He recalled when he was deployed in Iraq with the Army back in 2005, his base had regular power outages — sometimes just because people forgot to put fuel in the generators. So they always made sure to have paper maps tracking operations pinned to the walls in addition to the digital ones projected onto screens.

“You just couldn’t always trust you were going to have power — and if you lose power, you lose all of your computers,” said Raymond, a former West Point instructor.

A power loss on the open waters could be even more consequential because Navy ships are generally isolated at sea. A wrong turn could mean the difference between sailing in safe waters or those owned by Iran or North Korea.

In fact, over-reliance on emerging navigation tech has resulted in Navy disasters in the past. In 2013, a naval minesweeper called the USS Guardian went aground on a World Heritage site coral reef near the Philippines thanks in part to a digital chart that misplaced the obstacle and its navigation team relying “exclusively on electronic fixes derived from GPS” to guide them while failing to heed lighthouses, according to a Navy report on the incident.

Such problems, as well as the threat of losing access to high-tech tools altogether, are why basic celestial navigation training is important for sailors, said Mercogliano, the Campbell University professor. “We shouldn’t get too comfortable with our technology — there should always be an ability to double check,” he said.

Indeed, for much of human history, seafarers long looked to the sky for guidance. Even Homer’s Odyssey referenced using the stars to stay on course, with the goddess Calypso telling Odysseus to keep “the Bear” — the constellation Ursa Major — on his left-hand side during part of his voyage in the fictional epic.

In the 1700s, sailors started using a device known as a sextant to track their position using the heavens. Sextants use a series of mirrors and a sliding arm to help measure the angle between celestial bodies and the horizon. Those measurements, the precise time they were taken, nautical almanacs, and a series of complex calculations, allow sailors to triangulate their location even when far out at sea.

Newer technologies have all but replaced the humble sextant. During World War II, the U.S. began using land-based radio beacons known as the LORAN system to help guide ships. And the space race helped further celestial navigation’s decline: The Navy sponsored the development of the first operational satellite navigation system, dubbed TRANSIT, which went into active service in 1964 — providing navigation assistance for naval submarines and surface vessels. But TRANSIT was retired in the mid-’90s after the Air Force completed the modern GPS system, which uses dozens of satellites circling the globe.

GPS pinpoints a location by measuring how long it takes for messages from at least three of the satellites to arrive at a receiver — almost akin to an automatic version of the sextant measurements and calculations navigators once did by hand, but using satellites instead of the stars. And GPS can nail down an exact spot within meters, while even a skilled celestial navigator may be off by several miles, Reardon said.

GPS remains one of the most critical tools on the high-tech bridges of Navy ships. And given the limited training in the Naval Academy course — three hours of lectures and classroom exercises — the midshipmen who go through Reardon’s class probably won’t be plotting courses via the stars right away.

“These classes teach you the theory behind it very well,” said Hogan, but actually using a sextant out in the field would be another set of challenges. “I think you could go through a whole year of class just trying to learn that.”

The Navy at large also stopped training its fleet on celestial navigation in 2006 but restored lessons for navigator and assistant navigator officers in 2011, said Meadows, the naval public affairs officer. It’s in the process of rebuilding a curriculum for some enlisted ranks, she said, as well as setting up pilot courses within some ROTC programs.

And there may be at least one other fringe benefit for sailors: It may give them extra appreciation for the nighttime views when out at sea.

“You just have stars from horizon to horizon — there’s really nothing like it,” Reardon said.