A temperature gauge to determine whether an Army exercise should continue was placed in the shade, giving incorrectly low readings the day a soldier died, an inquest heard.
Cpl Joshua Hoole, 26 from Ecclefechan, Dumfries and Galloway, died on a routine physical assessment in Brecon.
His death in July 2016 came three years after three reservists died during an SAS selection march there.
Another infantryman collapsed an hour before Cpl Hoole, the inquest heard.
Cpl Joshua Hoole, described as "fit, capable and determined", collapsed during an annual fitness test (AFT).
He had been 400m from the end of the 13km (eight mile) cross-country course, carrying 25kg (55lb).
Leading the march group, he rapidly fell back through the pack, complaining of "cramps" before collapsing. He was pronounced dead less than an hour later.
In total, 18 out of the 41 soldiers dropped out, collapsed or were withdrawn by the course directing staff on the day, including Cpl Hoole.
The inquest, being held in Birmingham, heard about a Ministry of Defence policy document worked up after the Iraq war to reduce heat injury and heat deaths in soldiers.
The coroner was told one of tools used to measure the heat soldiers could be exposed to was a device called a wet bulb globe test (WBGT).
However, the inquest was told by Prof George Havenith, a heat stress and heat strain expert from Loughborough University, that the WBGT meter produced an "erroneous" low result, as it was in the shade of the base's gym building.
Prof Havenith said as a result the temperature governing whether the AFT should go ahead had been an under-reading.
On his estimation of a correct temperature, it was "inevitably going to breach the limit", he said.
As a result of the heat, Cpl Hoole's "body temperature would have been rising substantially", he said, adding Cpl Hoole would be alive if the exercise had never taken place or been stopped.
Col Christopher Wright, a military doctor in emergency medicine, said heat illness could produce "a spectrum" of different symptoms ranging from mild to severe.
At the time, the guidance for any commander who identified heat injuries or illness was to "carry out a dynamic risk assessment and consider other control measures, including stopping the activity".
Col Wright told the inquest the collapse of the infantryman before Cpl Hoole "should have been treated as a suspected heat injury".
Asked what he would have expected to have happened following the policy guidance if a potential heat injury had been identified, Col Wright said "the exercise has to stop".
"The soldiers should be divested of equipment and clothing, placed in the shade, and the primary cooling method is tepid cooling, where water is poured over the patient," he added.
"The patient should proceed to further care and triage to the medical centre and, if necessary, hospital."
The inquest continues.