ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/lev0/apps/test_get_image_location.c
Revision: 1.2
Committed: Tue Mar 15 21:09:30 2011 UTC (12 years, 6 months ago) by carl
Content type: text/plain
Branch: MAIN
CVS Tags: Ver_6-0, Ver_6-1, Ver_6-2, Ver_6-3, Ver_6-4, Ver_9-1, Ver_5-14, Ver_5-13, Ver_LATEST, Ver_9-3, Ver_9-41, Ver_9-2, Ver_8-8, Ver_8-2, Ver_8-3, Ver_8-0, Ver_8-1, Ver_8-6, Ver_8-7, Ver_8-4, Ver_8-5, Ver_7-1, Ver_7-0, Ver_9-5, Ver_9-4, Ver_8-10, Ver_8-11, Ver_8-12, Ver_9-0, HEAD
Changes since 1.1: +1 -2 lines
Log Message:
#332 -Remove assert()

File Contents

# Content
1 #ident "$Header: /home/cvsuser/cvsroot/JSOC/proj/lev0/apps/test_get_image_location.c,v 1.1 2010/07/28 22:14:04 carl Exp $"
2 /*############################################################################
3 # Name: test_get_image_location.c #
4 # Description:Used to unit test get_image_location.c #
5 # Author: Carl #
6 # Date: Move from EGSE to JSOC software environment on July 28, 2010 #
7 ############################################################################*/
8
9 /******************** includes ******************************************/
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <time.h>
14 #include <sys/stat.h>
15 #include <unistd.h>
16 #include <stdarg.h>
17 #include "drms.h"
18 #include "drms_names.h"
19 #include "jsoc_main.h"
20 #include <printk.h>
21 #include "get_image_location.c"
22
23 /************* modules definitions **************************************/
24 ModuleArgs_t module_args[] =
25 {
26 {ARG_STRING, "src", "Not Specified", "day file source"},
27 {ARG_STRING, "in", "Not Specified", "full path to day file"},
28 {ARG_STRING, "out", "Not Specified", "Series name"},
29 {ARG_FLAG, "p", "0", "print values of keywords to standard out"},
30 {ARG_END}
31 };
32 ModuleArgs_t *ggModArgs=module_args;
33 char* module_name = "test_get_image_location";
34
35
36 /*************************************************************************
37 * DoIT *
38 * FUNCTION: DoIt(void *
39 * DESCRIPTION: Use function to create jsoc module *
40 *************************************************************************/
41 int DoIt(void)
42 {
43 /* variables */
44 int i=1;
45 int ncnt=1;
46 int rstatus;
47 Image_Location *p_imageloc;
48 Image_Location imageloc[10];
49 /* set environment variables */
50 printf("test_get_image_location() ran!!\n");
51
52 // Obs time TIME tobs;
53
54 // For AIA:1,2,3,4. For HMI:1 or 2 int camera;
55
56 // For AIA:SDO/AIA. For HMI:SDO/HMI char telescope[GMP_MAX_TELESCOPE_STR];
57
58 //wavelength int wavelength;
59
60 //Now fill in info for call to Carl's get_image_location()
61 for(i=0; i < ncnt; i++)
62 {
63 //imageloc[i].tobs =1648159234; //"2010-03-24T22:00:00Z";
64 //time_convert time=2010-04-09T20:00:00Z o=jsoc ->1049918434
65 imageloc[i].tobs =1049918434;
66 imageloc[i].camera = 1;
67 imageloc[i].wavelength=0;
68 strcpy(imageloc[i].telescope,"SDO/HMI");
69 }
70 p_imageloc = imageloc;
71 rstatus = get_image_location(drms_env, ncnt, &p_imageloc);
72
73 printf("rstatus is %d\n", rstatus);
74 printf("x is %f\n", p_imageloc->x);
75 printf("y is %f\n", p_imageloc->y);
76 printf("instrot is %f\n", p_imageloc->instrot);
77 printf("imscale is %f\n", p_imageloc->imscale);
78 printf("yinrtb is %f\n", p_imageloc->yinrtb);
79 printf("zinrtb is %f\n", p_imageloc->zinrtb);
80
81 return(0);
82
83 }
84
85