A former Royal Navy officer will face a court martial following the sinking of a New Zealand ship she was commanding.