Analysis of atmospheric gamma-ray flashes detected in near space with allowance for the transport of photons in the atmosphere