OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
printnav.c
Go to the documentation of this file.
1 /* -------------------------------------------------------------------- */
2 /* printnav - prints formatted report based on scene navigation info */
3 /* */
4 /* ---------------------------------------------------------------------*/
5 
6 #include <stdio.h>
7 #include <time.h>
8 #include "swl0_proto.h"
9 
10 void printnav(swl0scene *scene) {
11  int i;
12  time_t utime;
13 
14  if (scene->nscan <= 0) {
15  printf("Scene has no valid scan lines.\n");
16  return;
17  }
18 
19  printf("\nScene Navigation Summary Report\n");
20  printf("Lines in scene: %d\n", scene->nscan);
21  printf("Data Type: %d\n", scene->mnftype);
22  utime = (time_t) scene->stime;
23  printf("Start Time: %s", asctime(gmtime(&utime)));
24  utime = (time_t) scene->etime;
25  printf("End Time: %s", asctime(gmtime(&utime)));
26  printf("Start Node: %s\n", scene->start_node);
27  printf("End Node: %s\n", scene->end_node);
28  printf("Node Longitude: %0.2f\n", scene->node_lon);
29  utime = (time_t) scene->node_time;
30  printf("Node Time: %s", asctime(gmtime(&utime)));
31  printf("Orbit Number: %d\n", scene->orbnum);
32 
33  printf("start center lon = %10.2f\n", scene->start_center_lon);
34  printf("start center lat = %10.2f\n", scene->start_center_lat);
35  printf("end center lon = %10.2f\n", scene->end_center_lon);
36  printf("end center lat = %10.2f\n", scene->end_center_lat);
37  printf("northern lat = %10.2f\n", scene->northern_lat);
38  printf("southern lat = %10.2f\n", scene->southern_lat);
39  printf("western lon = %10.2f\n", scene->western_lon);
40  printf("eastern lon = %10.2f\n", scene->eastern_lon);
41 
42  printf("\nNumber of tilt states in scene: %5d\n", scene->ntilts);
43  for (i = 0; i < scene->ntilts; i++) {
44  printf("Tilt %2d -\n", i);
45  printf(" Start Scan = %10d\n", scene->tilt_ranges[i][0]);
46  printf(" End Scan = %10d\n", scene->tilt_ranges[i][1]);
47  printf(" Tilt Flag = %10d\n", scene->tilt_flags[i]);
48  }
49  printf("\n\n");
50 
51  return;
52 }
53 
54 
55 
56 
void printnav(swl0scene *scene)
Definition: printnav.c:10
int i
Definition: decode_rs.h:71