OK… Now the next challenge in the programming world. I have a compass rose with 8 LED’s, and I need to work out which LED to light up if a plane is in that direction. Sound simple? Well, it is mostly. Except that the device telling my poor microprocessor what to do is giving relative headings, and not bearings. So I need to find a simple way to convert from the northings and eastings to an angle.
So I can hear you saying ‘Just use the TAN function’, but the issue here is that the tan function does not exist on this device. Besides in computer speak, I really want the TAN2 function which allows the northing and easting as seperate paramaters so I do not need to divide by zero.
I think I have a work around… I will cheat… I will assume that targets other than the primary one will be only needing an indication, meaning that I can cheat and only use four of the compass points. That will reduce the CPU intensity until I can at least work out a better way to do things.
I am still waiting on Telstra to churn my ADSL to WestNet. How hard can it be for them? Stupid question… Do not try to answer that one.