This was for a bet I had with my brother. He bet me $25 bucks I couldn't come up with a simpler solution than his or find out where his solution failed. On that second part, I gave up. Look at what his equation was:
=IF(A2<IF(A2+180>360,A2+180-360,A2+180),IF(AND(B2>A2,K2<IF(A2+180>360,A2+180-360,A2+180)),O2,-O2),IF(OR(B2>A2,B2<IF(A2+180>360,A2+180-360,A2+180)),O2,-O2))
Even if it's right, it's wrong. A kludge is a kludge. A and B are the same, but what the heck is O? LOL...stupid is what stupid does.
The above calculates the apparent wind direction on the ship if the ship is motionless. The next step of complexity is to then add speeds to both the wind and the ship. That requires some vector calculus. But I'm not doing anything until he posts the terms.
|