This is a Royal Naval Air Service visor cap with and without its khaki cap cover.
RNAS officers were ordered to remove their caps’ wire stiffeners in 1917 as they interfered with ships’ compasses, according to Christopher Campbell, author of Aces and Aircraft of World War I.
You can see more examples of original artifacts of early aviation at The Aero Conservancy.