The deal will see German planes operating from a Scottish airbase and increase co-operation on developing new equipment.