Instead of tying a piece of line to the halyard, use 100 foot measuring tape. Attach the end to the halyard, raise the halyard and read the measurement to the deck. Add 3 feet for anything attached to the masthead. May be slightly more accurate than a stretchy piece of line. Then to measure the distance to the waterline, use a plumb line or something similar (don’t get the tape measure wet) draped over the boom close to where it crosses the deck edge when you swing the boom over the water. Let out the line until the weight touches the water. Tie it off, swing the boom back inboard and measure. add that dimension to the overall mast height, subtract the measurement from the boom to the deck. Takes longer to explain than it does to do.