Westerman was initially employed on various coastal defence duties with the Royal Navy, according to Dennis Butts; Nigel Gossop does not mention this. He continued to write at full speed through the War, and possible for patriotic reasons, or perhaps just because he knew they would sell, many of his publications were concerned with the on-going war. A list of his titles from 1918 would make the point: To the Fore with the Tanks!, Under the White Ensign, The Fritz-Strafers (later re-issued as The Keepers of the Narrow Seas), Billy Barcroft R.N.A.S., A Lively Bit at the Front, The Secret Channel and Other Stories, The Submarine Hunters, With Beatty off Jutland, Wilmhust of the Frontier Force, and A Sub and a Submarine.
In that year, 1918, Westerman heard that the new Royal Air Force was forming a Marine Training Division. He applied for a commission. His son John recalled that, as he only had one good eye, he would have been turned down, except that he was able to memorise the eye-test chart when the doctor was called out of the room. He received his commission on 24 September 1918: his task was to teach marine navigation to flyers who had been shot down in France and lost their nerve. He was an Instructor of Navigation, with the rank of Flight Lieutenant, stationed at the RAF Marine Training Depot at Sandbanks in Dorset, and kept this position until he was demobilised on 1 April 1919.
My information is from Nigel Gossop, Tales of Pluck & Daring: The Life and World of Percy F. Westerman (Portsmouth Grammar School Monograph Series no. 24) (Portsmouth: Portsmouth Grammar School, 2012). The article on Westerman in the Oxford Dictionary of National Biography is by Dennis Butts.