MISR Toolkit  1.5.1
bar.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = bar =
4 = =
5 =============================================================================
6 
7  Jet Propulsion Laboratory
8  MISR
9  MISR Toolkit
10 
11  Copyright 2005, California Institute of Technology.
12  ALL RIGHTS RESERVED.
13  U.S. Government Sponsorship acknowledged.
14 
15 ============================================================================*/
16 
17 #include "MisrToolkit.h"
18 #include "MisrError.h"
19 #include <stdio.h>
20 
21 int bar( double lat, double lon ) {
22 
23  MTKt_status status;
24  int pathcnt;
25  int *pathlist;
26  int i, j;
27  int orbitcnt;
28  int *orbitlist;
29  /* YYYY-MM-DDThhmmssZ */
30  char *starttime = "2002-02-02T02:00:00Z"; /* 2002-02-02 02:00:00 UTC */
31  char *endtime = "2002-05-02T02:00:00Z"; /* 2002-05-02 02:00:00 UTC */
32 
33  printf("starttime = %s\nendtime = %s\n", starttime, endtime);
34 
35  status = MtkLatLonToPathList(lat, lon, &pathcnt, &pathlist);
36  if (status != MTK_SUCCESS) return 1;
37 
38  printf("Pathlist = ");
39  for (i = 0; i < pathcnt; i++) {
40  printf("%d ", pathlist[i]);
41  }
42  printf("\n");
43 
44  for (i = 0; i < pathcnt; i++) {
45  status = MtkPathTimeRangeToOrbitList(pathlist[i], starttime, endtime,
46  &orbitcnt, &orbitlist);
47  if (status != MTK_SUCCESS) return 1;
48  printf("Orbitlist for Path %d = ", pathlist[i]);
49  for (j = 0; j < orbitcnt; j++) {
50  printf("%d ", orbitlist[j]);
51  }
52  printf("\n");
53  }
54  return 0;
55 }
MTKt_status MtkPathTimeRangeToOrbitList(int path, const char *start_time, const char *end_time, int *orbitcnt, int **orbitlist)
Given path and time range return list of orbits on path.
int bar(double lat, double lon)
Definition: bar.c:21
MTKt_status MtkLatLonToPathList(double lat_dd, double lon_dd, int *pathcnt, int **pathlist)
Get list of paths that cover a particular latitude and longitude.
MTKt_status
Definition: MisrError.h:11

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51