my solution has no problems with it, I get excellent range readings with the automatic mast height's inserted with my code. I don't understand what you're talking about now. It appears you're trying to re-invent the wheel of make something work that won't work

The range is set using the stadimeter (or the TDC range dial), the bearing/AOB/etc. are set using the TDC dials. So what's this proper thing you speak of?