I am trying to create an on the fly image of runway layouts but am hitting a brick wall.

I have both the starting and ending coordinates of each runway, it's length, as well as it's angle of direction (heading).

I can draw one runway without any problem, but where I am falling short is how to 'scale', if that is the right word, the other runway(s) to display properly in a 500x500px image

function imagepolarline($image,$x1,$y1,$length,$angle,$color)
        $x2 = $x1 + cos( deg2rad($angle-90)) * $length;
        $y2 = $y1 + sin( deg2rad($angle-90)) * $length;
        imageline($image, $x1,$y1,$x2,$y2, $color);     

//'base' coords


//if first runway
if ($d==0) {$xbase=abs($lon1);$ybase=abs($lat1);}
//for all others

Here is some test data if that would help:

Any suggestions would be most appreciated.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to