1
0
Fork 0

Example commit for character height error.

This spams to console:
%giza - Warning - giza_set_character_height: Invalid character height, character height not set

This commit silences it, but resizes the fonts poorly.
To be undone.

	modified:   README.md
	new file:   img/skymap-giza-8.png
	modified:   skymap.c
giza
Jeff Moe 2022-07-27 22:38:00 -06:00
parent acfe29f877
commit a7fc9e2268
3 changed files with 26 additions and 7 deletions

View File

@ -43,6 +43,17 @@ SatNOGS TLE loads and renders.
![skymap-giza rev 7](img/skymap-giza-7.png)
There is an error that spams out to the console:
```
%giza - Warning - giza_set_character_height: Invalid character height, character height not set
```
The character heights are set to various values, typically `0.6`, `0.8`, and
`1.0`. Only `1.0` doesn't produce the error. But it renders much larger...
This has no errors, but looks bad. Overall need new font.
![skymap-giza rev 8](img/skymap-giza-8.png)
# Works
Testing/dev in Debian Bookworm (testing), with `giza` version `1.3.2`.
@ -70,6 +81,7 @@ Testing/dev in Debian Bookworm (testing), with `giza` version `1.3.2`.
* FOV.
* Small window size with giza.
* Check license status of `sgdp4.c` and `sgdp4h.h`.
* Font.
# Color

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -499,7 +499,8 @@ void plot_xyz(double mjd0,char *filename)
cpgsci(3);
cpgpt1(s.rx,s.ry,17);
cpgsch(0.6);
//cpgsch(0.6);
cpgsch(1.0);
cpgtext(s.rx,s.ry," xyz");
cpgsch(1.0);
cpgsci(1);
@ -940,7 +941,8 @@ void plot_visibility(float h)
cpgcont(cont,nx,ny,1,nx,1,ny,c,nc,tr);
// Label contours
cpgsch(0.8);
//cpgsch(0.8);
cpgsch(1.0);
for (i=0;i<nc;i++) {
sprintf(state,"%.0f",c[i]);
cpgconl(cont,nx,ny,1,nx,1,ny,c[i],tr,state,300,18);
@ -1755,19 +1757,22 @@ void skymap_plotsatellite(char *filename,int satno,double mjd0,double dt)
// Plot satellites
if (flag==0) {
cpgsch(0.8);
//cpgsch(0.8);
cpgsch(1.0);
if (s.age<25)
cpgpt1(x,y,17);
else if (s.age<50)
cpgpt1(x,y,4);
else
cpgpt1(x,y,6);
cpgsch(0.6);
//cpgsch(0.6);
cpgsch(1.0);
// Print name if in viewport
if (fabs(x)<1.5*m.w && fabs(y)<m.w && x<1.32*m.w && y<0.96*m.w && m.pflag==1)
cpgtext(x,y,norad);
cpgsch(isch);
//cpgsch(isch);
cpgsch(1.0);
cpgmove(x,y);
flag=1;
} else {
@ -2428,7 +2433,8 @@ int plot_skymap(void)
// Top left string
cpgsch(0.8);
//cpgsch(0.8);
cpgsch(1.0);
cpgsci(128);
mjd2date(m.mjd,m.nfd);
sprintf(text,"%s UTC; %s (%04d) [%+.4f\\u\\(2218)\\d, %+.4f\\u\\(2218)\\d, %.0fm]",m.nfd,m.observer,m.site_id,m.lat,m.lng,m.alt*1000.0);
@ -3235,7 +3241,8 @@ void plot_iod(char *filename)
float x,y;
cpgsci(2);
cpgsch(0.8);
//cpgsch(0.8);
cpgsch(1.0);
file=fopen(filename,"r");
// Read data
while (fgets(line,LIM,file)!=NULL) {