A civil engineer by training, Hartley is best remembered for the Pluto pipeline; during the Second World War he was seconded to the government where he was involved in the development of the bombsight which sank the Tirpitz, the Operation Pluto pipeline project and the fog investigation and dispersion system (FIDO). He also made a significant contribution during the First World War, having qualified as a fighter pilot Hartley joined the armaments section of the Air Board. He and Bertram Hopkinson was responsible for the Air Board's development of George Constantinescu's interrupter gear which allowed a machine gun to be fired through the propeller blades of an aircraft without danger of damage. Between the wars, Hartley worked as a consulting engineer for five years. He then joined the Anglo-Persian Oil Company in 1924 as assistant manager of its engineering division and then of the supply department. From 1932 to 1934 he was seconded to the Iraq Petroleum Company, on his return being appointed chief engineer. The company became the Anglo-Iranian Oil Company in 1935.