His work won him the Rumford Medal of the Royal Society in 1838 , and in 1843 he received its Royal Medal for a paper on the Transparency of the Atmosphere and the Laws of Extinction of the Sun 's Rays passing through it .