diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2004-10-05 03:57:31 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2004-10-05 03:57:31 +0000 |
commit | 9811ae1a95c020c4f15d57a5efd7a971a08b6df1 (patch) | |
tree | d3c4e09d031b64dd88698326d65f05cc614766a2 /display.c | |
parent | a31d7a0cfa433ad6c84b6c4a94a9097cf4f92c22 (diff) | |
download | gpsd-9811ae1a95c020c4f15d57a5efd7a971a08b6df1.tar.gz |
Make sure all files that need config.h inclusion have it.
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -3,10 +3,7 @@ #include "gps.h" -#define XCENTER (double)(width/2) -#define YCENTER (double)(height/2) -#define SCALE (double)(diameter/2) -#define DEG2RAD (3.1415926535897931160E0/180.0) +#define DEG2RAD (PI/180.0) #define RM 20 #undef min @@ -56,8 +53,8 @@ static void pol2cart(double azimuth, double elevation, double *xout, double *you #else elevation = ((90.0 - elevation) / 90.0); #endif - *xout = XCENTER + sin(azimuth) * elevation * SCALE; - *yout = YCENTER - cos(azimuth) * elevation * SCALE; + *xout = (width/2) + sin(azimuth) * elevation * (diameter/2); + *yout = (height/2) - cos(azimuth) * elevation * (diameter/2); } static void draw_arc(int x, int y, int diam) |