summaryrefslogtreecommitdiff
path: root/gpsd.php
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2008-03-01 07:30:51 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2008-03-01 07:30:51 +0000
commit7c23dbb3aa2391514cc333518dd99075b9a99dc8 (patch)
tree3c033c6d4d030e910455b28c2ef6bf3b21849a45 /gpsd.php
parent57500ef19287a096078b88dd2aaeed0f33b0b04a (diff)
downloadgpsd-7c23dbb3aa2391514cc333518dd99075b9a99dc8.tar.gz
allow the SBAS diamond icons to be filled...
...if they're used in the navigation solution rather than making them be circles.
Diffstat (limited to 'gpsd.php')
-rw-r--r--gpsd.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/gpsd.php b/gpsd.php
index 523bc943..deb668d9 100644
--- a/gpsd.php
+++ b/gpsd.php
@@ -1,5 +1,6 @@
<?php
+# $Id$
#$CSK: gpsd.php,v 1.39 2006/11/21 22:31:10 ckuethe Exp $
# Copyright (c) 2006 Chris Kuethe <chris.kuethe@gmail.com>
@@ -171,13 +172,15 @@ function splot($im, $sz, $C, $e){
imageString($im, 3, $x+4, $y+4, $sv, $C['black']);
if ($u)
- imageFilledArc($im, $x, $y, $r, $r, 0, 360, $color, 0);
+ if ($sv > 32)
+ imageFilledDiamond($im, $x, $y, $r, $color);
+ else
+ imageFilledArc($im, $x, $y, $r, $r, 0, 360, $color, 0);
else
- if ($sv > 32) {
+ if ($sv > 32)
imageDiamond($im, $x, $y, $r, $color);
- } else {
+ else
imageArc($im, $x, $y, $r, $r, 0, 360, $color);
- }
}
function imageDiamond($im, $x, $y, $r, $color){
@@ -193,6 +196,16 @@ function imageDiamond($im, $x, $y, $r, $color){
imagepolygon($im, $vx, 4, $color);
}
+function imageFilledDiamond($im, $x, $y, $r, $color){
+ $t = $r/2;
+ while($t){
+ $vx = array ( $x+$t, $y, $x, $y+$t, $x-$t, $y, $x, $y-$t );
+ imagepolygon($im, $vx, 4, $color);
+ $t -= 0.5;
+ }
+}
+
+
function elevation($im, $sz, $C, $a){
$b = 90 - $a;
$a = $sz * 0.95 * ($a/180);