Well, what you ask is not a simple task. If you are not in the mast engineering and design business I suggest you contact an organization that specializes in this application.
If you ambitious, see the following document:
Guide Specifications for the Design of Metal Flagpoles FP 100-07 --> FP1001-07 (1).pdf