Brazil is scheduled to send a scientist aboard a U.S. space shuttle in 1987, but while they are waiting scientists here have pushed ahead with their own space program.

On Nov. 21 they launched a seven-ton, two-stage ballistic rocket with a 625-mile range, which puts them behind India in the developing world's space race.

Brazil also has begun construction of what it plans to be a "spaceport for Latin America" on the Equator, which will have a six-mile landing strip for the space shuttle and launch ramps for rockets of the European Space Agency's Ariane type.

The successful launch of the $1.3 million solid-fuel Sonda IV rocket from the Barreira de Inferno ("Gates of Hell") testing range in Brazil's Northeast is a milestone. Officials of the military-controlled space program plan to put up their own weather and observation satellites in 1989, using an upgraded version of this rocket. By the year 2003, they plan to launch communications satellites with their own liquid-fueled rockets to replace the Canadian-built satellite that Brazil is to acquire in February.

The Sonda IV's trajectory 150 miles out into the Atlantic Ocean with a 1,100-pound payload of instruments was also closely watched by Brazil's neighbors, who are fearful that the nation is quietly pursuing development of a nuclear device and the means to launch it.

"If a country has a nuclear energy program, it can always be converted to military ends, just as a space program can be turned into a ballistic program," said Col. Lauro Eduardo de Souza Pinto, director of the Air Force's space institute that supervised the launching.

"But in a military sense the Sonda IV is not a ballistic system because it doesn't have any accuracy, and with a present range of 174 miles it would not have much future as a military rocket. Our plan is just to develop a satellite launcher," he said in an interview at the space institute's headquarters in Sao Jose dos Campos.

In Brazil's space program the armed forces are responsible for developing the rockets and launch pads, while the civilian science and technology institute builds the satellite payloads.

Many Brazilians have asked if the debt-laden country can afford the costly dream of space now, when so many basic problems remain unresolved for its 130 million inhabitants. With the transfer of power to civilian hands next March, it is unclear whether the military momentum behind the space program will vanish.

"The repercussions of a military nature are obvious, and the Congress has been told very little about this. Next year we intend to summon those involved in the program to testify before the congressional committee on national security," said opposition deputy Flavio Bierrenbach.

"Though everything tells us Brazil doesn't have the material or the intention to make a nuclear device, it has the technology and the skills to do so, and the satellite launcher could be used with a military payload," he said in a telephone interview.

Since Brazil began rocket development in 1965, almost all the technology in special steels, fuel and explosives developed by the space institute has been passed to the fast-growing weapons industry.

A plant has been built that is capable of producing up to 18 tons a day of solid fuel for rockets, far more than the civil program requires. Military missiles based on the Sonda series have sold well abroad and have been deployed with success in the Persian Gulf war.

The Sonda IV was the latest of about 2,000 test rockets launched from the Barreira de Inferno since 1965 and is the result of extensive cooperation with NASA and the European Space Agency.

Brazil has a contract to assist in tracking Ariane launches from the nearby ESA launch site at Kourou in French Guiana using its French-made equipment, and has even sold back its small test rockets to NASA. It also receives support from the U.S. Air Force geophysics laboratory.

But installations at the base will be too small to accommodate the satellite launcher, whose trajectory could affect international shipping in the Atlantic.

Therefore Brazil has begun to construct a new base on a remote peninsula close to the historic city of Alcantara, midway between the old center and the European Space Agency base in Guiana. Alcantara is across the Caribbean from Cape Canaveral.

Because Alcantara is close to the Equator, launches will offer a 25 percent fuel savings over those from Florida, and the Brazilians expect to offer launch services to other nations, especially in Latin America.

The first stage of the Alcantara base will be ready in 1986 to test Brazil's satellite launcher, and an area has been reserved for the infrastructure for manned space flights, including a six-mile-long landing strip for space shuttles.

"It might seem strange that we're thinking so ambitiously with today's economic situation, but we're certain we don't have the right to ignore this. We believe we'll have our own industries in space around the year 2050," said Col. Jose Armando Monteiro of the space institute, responsible for construction of the base.

But although he said Brazil was interested in supplying commercial services to other nations and could take advantage of an eventual withdrawal of the European Space Agency from Guiana, it has no manned space program of its own or the means even to dream of one.

The invitation for Brazil to take part in NASA's shuttle program was made by President Reagan on a visit here in 1982 and formalized by Secretary of State George P. Shultz this year. A group of potential Brazilian participants already has been selected, and one among them will be chosen to train in the United States for the shuttle flight. The Brazilian's mission aboard the shuttle will be to test a special camera developed here for use in weather satellites.