Railroad deregulation legislation is apparently back on track.

The House sponsors of the bill prepared a new compromise package that yesterday won the strong backing of President Carter as well as a cosponsor's endorsement of an amendment that had threatened the bill's passage.

The measure has also been scheduled for House consideration on Sept. 4, a full six weeks after it was withdrawn from the House floor by its sponsors. The action followed House acceptance of a controversial amendment sharply limiting the railroads ability to raise freight rates without government interference.

President Carter's endorsement of the measure and his pledge to work hard for its passage was conveyed to sponsors of the measure who spent 15 minutes with the president at the White House yesterday. According to the bill's chief sponsor Rep. James J. Florio (D-N.J.), chairman of the House transportation and commerce subcommittee, Carter told them he regarded the measure as his highest legislative priority left this year. The president also agreed to make calls to chief executives of major shippers whose support is considered important.

Under the package outlined yesterday, the railroads' freedom to set rates without the threat of government involvement will be phased in over a four-year period. For the first year, the proposal retains Interstate Commerce Commission jurisdiction if a railroad increases its rates to a level more than 160 percent of its variable costs -- the out-of-pocket costs of actually transporting the goods. The second year, the threshold becomes 165 percent, the third year 170 percent, and the fourth year 175 percent or, if it is lower, a formula written into the bill that allows the recovery of fixed and variable costs. After that, the ICC will have no jurisdiction at all unless a rate goes above the cost-recovery formula. The amendment that was adopted by the House retained ICC jurisdiction for everything over the 160 percent level, a threshold considered too low by the Icc, the industry, and the sponsors of the bill.

"We feel strongly that it's appropriate that a railroad not be required to go to a regulatory agency to get a rate approved if the railroad isn't even earning enough to meet its costs," Florio said.

ICC involvement doesn't mean that a proposed rate won't go into effect; it only means that a shipper can file a protest with the agency contending that a rate is too high. Presumably the agency will allow the railroads to recover their variable costs plus a rate of return.

Florio and Madigan developed the compromise legislative package over the weekend after aides to the President asked them late last week not to give up yet on the near-moribund measure.