John Peter Hagen, 82, the former head of the Vanguard rocket satellite program at the Naval Research Laboratory, died of heart ailments Aug. 26 at a hospital in Las Vegas. A resident of State College, Pa., he was visiting his son when he became ill.

As director of the Vanguard Project in the late 1950s, Dr. Hagen oversaw development of what the United States intended as Earth's first man-made satellite.

But the Soviet Union achieved that distinction with the launching of Sputnik in the fall of 1957, almost six months before the first Vanguard satellite was launched into space March 17, 1958, after two earlier failures.

The first Vanguard satellite, a grapefruit-size globe, is now the oldest man-made object in space and is expected to continue orbiting for centuries. Two other satellites were successfully launched by the Vanguard Project.

Dr. Hagen was born in Halifax, Nova Scotia. He graduated from Boston University and received a doctorate in radio astronomy at Georgetown University.

He joined the Naval Research Laboratory in 1935. During World War II he worked on radar development. He was awarded a Distinguished Service Medal and a Presidential Certificate of Merit for this work.

In 1959 Dr. Hagen founded the Vanguard division of the National Aeronautics and Space Administration. He remained at NASA until 1962, when he left to join the faculty at Pennsylvania State University. He was a professor of astronomy and chairman of the astronomy department until retiring in 1976.

Survivors include his wife of 54 years, Edith W. Hagen of State College; a son, Edward C. Hagen of Las Vegas; three sisters, Marjorie and Ruth Hagen, both of Boston, and Jean Meggison of Boothbay Harbor, Maine; and three grandchildren.