P is for Practical  
PerlMonks 
Perl and Solving Trig/Converting GPS to x,y Cordsby Pizentios (Scribe) 
on Jan 08, 2013 at 19:36 UTC ( #1012321=perlquestion: print w/replies, xml )  Need Help?? 
Pizentios has asked for the
wisdom of the Perl Monks concerning the following question:
Hi monks! I have a problem that i know can be solved by using trig. However i am at a loss on how to go about it in perl. Bit of backstory: Here's the code i've used:
This ofcourse returns angles to the lines from 0 degrees (strait north) Using this information i am able to use the law of sines and the law of cosines (and some addition/subtraction to get the angle from line AB to line AC and line BC) to figure out the length of the sides that are made to my test point on the x,y graph (on paper but it should translate to perl code fairly easy). I am however at a loss on how to proceed further....
I have constants on a x,y grid that are as follows: I am trying to caculate the x,y cords for a point that i would like to map. My thoughts are to find the intersection of two circles, as i know the radius of each circle (from my math on paper, one centered on Point A and the other centered on Point B). Circle at Point A's radius: 781.5815 Circle at Point B's radius: 431.2683009 Can somebody please give me some tips or suggestions on how to proceed to solve this problem in perl? Code examples would be greatly appreciated....This is the first time i've had to do any kind of higher level math in perl. It doesn't have to be solved using intersection of two circles if sombody out there has a better method of figuring it out...and i must admit my trig skills are very rusty as i haven't used em much since high school.
Pizentios
Back to
Seekers of Perl Wisdom

