1
0
Fork 0

Process satid with GNU indent

spacecruft
Jeff Moe 2022-08-20 16:16:06 -06:00
parent 905e7eca2f
commit e8e821d040
1 changed files with 27 additions and 24 deletions

View File

@ -63,7 +63,7 @@ void reverse (double ra0, double de0, double x, double y, double *ra,
double *de); double *de);
struct sat apparent_position (double mjd); struct sat apparent_position (double mjd);
int giza_open_device_size_float (const char *, const char *, float, float, int giza_open_device_size_float (const char *, const char *, float, float,
int); int);
void void
plot_satellites (char *tlefile, struct image img, long satno, double mjd0, plot_satellites (char *tlefile, struct image img, long satno, double mjd0,
@ -207,12 +207,13 @@ plot_satellites (char *tlefile, struct image img, long satno, double mjd0,
if (x > 0.0 && x < img.naxis1 && y > 0.0 && y < img.naxis2 if (x > 0.0 && x < img.naxis1 && y > 0.0 && y < img.naxis2
&& textflag == 0) && textflag == 0)
{ {
if (flag != 0) { if (flag != 0)
giza_draw_float (x, y); {
giza_move_float (x, y); giza_draw_float (x, y);
} giza_move_float (x, y);
}
giza_set_character_height_float (0.65); giza_set_character_height_float (0.65);
giza_set_colour_index (1); // Satellite names text color giza_set_colour_index (1); // Satellite names text color
giza_text_float (x, y, norad); giza_text_float (x, y, norad);
giza_set_character_height_float (isch); giza_set_character_height_float (isch);
giza_move_float (x, y); giza_move_float (x, y);
@ -311,24 +312,26 @@ main (int argc, char *argv[])
wx = img.naxis1 * sx / 3600.0; wx = img.naxis1 * sx / 3600.0;
wy = img.naxis2 * sy / 3600.0; wy = img.naxis2 * sy / 3600.0;
if (argc == 3) { if (argc == 3)
giza_open_device_size_float ("/png", "satid", 680, 680, 3); {
giza_set_colour_palette (1); giza_open_device_size_float ("/png", "satid", 680, 680, 3);
giza_set_font ("Helvetica"); giza_set_colour_palette (1);
giza_set_colour_representation_float (0, 0.0, 0.0, 0.0); giza_set_font ("Helvetica");
giza_draw_background (); giza_set_colour_representation_float (0, 0.0, 0.0, 0.0);
} giza_draw_background ();
else { }
giza_open_device_size_float ("/xs", "satid", 680, 680, 3); else
giza_set_colour_palette (1); {
giza_set_font ("Helvetica"); giza_open_device_size_float ("/xs", "satid", 680, 680, 3);
giza_set_colour_representation_float (0, 0.0, 0.0, 0.0); giza_set_colour_palette (1);
giza_draw_background (); giza_set_font ("Helvetica");
} giza_set_colour_representation_float (0, 0.0, 0.0, 0.0);
giza_draw_background ();
}
giza_set_viewport_float (0.1, 0.95, 0.1, 0.8); giza_set_viewport_float (0.1, 0.95, 0.1, 0.8);
giza_set_character_height_float (0.8); giza_set_character_height_float (0.8);
giza_set_colour_index (255); // White top date/COSPAR ID text giza_set_colour_index (255); // White top date/COSPAR ID text
sprintf (text, "UT Date: %.23s COSPAR ID: %04d", img.nfd + 1, img.cospar); sprintf (text, "UT Date: %.23s COSPAR ID: %04d", img.nfd + 1, img.cospar);
giza_annotate_float ("T", 6.0, 0.0, 0.0, text); giza_annotate_float ("T", 6.0, 0.0, 0.0, text);
sprintf (text, "R.A.: %10.5f (%4.1f'') Decl.: %10.5f (%4.1f'')", img.ra0, sprintf (text, "R.A.: %10.5f (%4.1f'') Decl.: %10.5f (%4.1f'')", img.ra0,
@ -337,9 +340,9 @@ main (int argc, char *argv[])
|| img.yrms / sy > 2.0) || img.yrms / sy > 2.0)
giza_set_colour_index (2); giza_set_colour_index (2);
else else
giza_set_colour_index (255); // R.A. text white giza_set_colour_index (255); // R.A. text white
giza_annotate_float ("T", 4.8, 0.0, 0.0, text); giza_annotate_float ("T", 4.8, 0.0, 0.0, text);
giza_set_colour_index (255); // White main text giza_set_colour_index (255); // White main text
sprintf (text, sprintf (text,
@ -363,7 +366,7 @@ main (int argc, char *argv[])
zmin, zmax, tr); zmin, zmax, tr);
giza_box ("BCTSNI", 0., 0, "BCTSNI", 0., 0); giza_box ("BCTSNI", 0., 0, "BCTSNI", 0., 0);
giza_set_text_background (255); // Satellite names text background color giza_set_text_background (255); // Satellite names text background color
// Environment variables // Environment variables
env = getenv ("ST_TLEDIR"); env = getenv ("ST_TLEDIR");