Geometry Library: Using GeoLib April 2005. Overview Usage Typical Algorithm Examples: –For Mapping Instruments –For Non-mapping Instruments.

Slides:



Advertisements
Similar presentations
Question Bank. Explain the syntax of if else statement? Define Union Define global and local variables with example Concept of recursion with example.
Advertisements

Arrays.
C Language.
Digital Library Service – An overview Introduction System Architecture Components and their functionalities Experimental Results.
Review What is a virtual function? What can be achieved with virtual functions? How to define a pure virtual function? What is an abstract class? Can a.
Atlas III Improvements Expands on Atlas II capabilities – Faceted Navigation – counts are displayed next to selectable attribute – Lunar Map interface.
Rachel Klima (on behalf of the MASCS team) JHU/APL MASCS/VIRS Data Users’ Workshop LPSC 2014, The Woodlands, TX March 17,2014 MASCS/VIRS Data Record Structure.
Chapter 9 Imperative and object-oriented languages 1.
Query Evaluation. An SQL query and its RA equiv. Employees (sin INT, ename VARCHAR(20), rating INT, age REAL) Maintenances (sin INT, planeId INT, day.
Module 4: Creating Data Types and Tables. Overview Creating Data Types Creating Tables Generating Column Values Generating Scripts.
Data Management and File Organization
File processing with functions H&K Chapter 3 Instructor – Gokcen Cilingir Cpt S 121 (June 27, 2011) Washington State University.
Assemblers Dr. Monther Aldwairi 10/21/20071Dr. Monther Aldwairi.
Review Binary –Each digit place is a power of 2 –Any two state phenomenon can encode a binary number –The number of bits (digits) required directly relates.
Computer Science 1620 Multi-Dimensional Arrays. we used arrays to store a set of data of the same type e.g. store the assignment grades for a particular.
©2004 Brooks/Cole Chapter 8 Arrays. Figures ©2004 Brooks/Cole CS 119: Intro to JavaFall 2005 Sometimes we have lists of data values that all need to be.
Toward Automatic Processing and Indexing of Microfilm.
CSE1301 Computer Programming: Revision. Topics Type of questions What do you need to know? About the exam Exam technique Sample questions.
More Arrays Length, constants, and arrays of arrays By Greg Butler.
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
A Level Computing#BristolMet Session Objectives U2#S6 MUST identify different data types used in programming aka variable types SHOULD describe each data.
Survey Data Management and Combined use of DDI and SDMX DDI and SDMX use case Labor Force Statistics.
CIS Computer Programming Logic
CPS120: Introduction to Computer Science Arrays. Arrays: A Definition A list of variables accessed using a single identifier May be of any data type Can.
Array Processing Simple Program Design Third Edition A Step-by-Step Approach 7.
ESAC June R. Noschese G.Picardi, R. Orosei, A. Cicchetti, S. Giuppi, M. Cartacci.
Introduction to Arrays in Java Corresponds with Chapter 6 of textbook.
Introduction to Computer Programming Using C Session 23 - Review.
Welcome to SRT 2 Mr. Davis and Mr. Evans A1/B4 - B310.
Today’s lecture 2-Dimensional indexing Color Format Thread Synchronization within for- loops Shared Memory Tiling Review example programs Using Printf.
Computer Programming 12 Mr. Jean April 24, The plan: Video clip of the day Upcoming Quiz Sample arrays Using arrays More about arrays.
Module 3: Creating Data Types and Tables. Overview Working with Data Types Working with Tables Generating Column Values Generating Scripts.
Navigation and Ancillary Information Facility NIF Writing a CSPICE (C) Based Program November 2014.
DT249-Information Systems Research Practice Programming Revision Lecture 2 Lecturer: Patrick Browne.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Advanced Computer Science Lesson 4: Reviewing Loops and Arrays Reading User Input.
Overview of Previous Lesson(s) Over View  A program must be translated into a form in which it can be executed by a computer.  The software systems.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK January 2009.
CPS120: Introduction to Computer Science Lecture 15 Arrays.
Navigation and Ancillary Information Facility NIF Writing a CSPICE Based Program October 2007.
Integrating QDEC with Slicer3 Click to add subtitle.
1 CSC241: Object Oriented Programming Lecture No 25.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK November 2014.
Navigation and Ancillary Information Facility NIF SPICE System Development Plans March 2006.
Nh-j-lorri-2-jupiter-v2.0 nh-j-lorri-3-jupiter-v2.0 nh-x-lorri-2-launch-v2.0 nh-x-lorri-3-launch-v2.0 Matthew Knight PDS review 8/19/14.
1.  Introduction  The Benefits of the Report Writer Module ◦ For Detail and Summary Printing ◦ For Control Break Processing ◦ For Printing Headings.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
Overview of DCPDS Regional User’s Module The purpose of this module is to allow regional DCPDS users to download their regional transaction files. Any.
Navigation and Ancillary Information Facility NIF Using Module Headers April 2006.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK March 2006.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK November 2014.
COMP 3438 – Part I - Lecture 5 Character Device Drivers
Geometry Library: The Concept April Geometry Library: The Concept 2 Overview The Geometry Index –General Concept The ‘Line’ Concept Center and Number.
Programming for Geographical Information Analysis: Advanced Skills Lecture 3: Arc Data Framework Dr Andy Evans.
Arrays Chapter 7. MIS Object Oriented Systems Arrays UTD, SOM 2 Objectives Nature and purpose of an array Using arrays in Java programs Methods.
1 CSC103: Introduction to Computer and Programming Lecture No 27.
CSCI 6962: Server-side Design and Programming Shopping Carts and Databases.
REEM ALMOTIRI Information Technology Department Majmaah University.
Project 1 : Phase 1 22C:021 CS II Data Structures.
Arrays What is an array… –A data structure that holds a set of homogenous elements (of the same type) –Associate a set of numbers with a single variable.
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK June 2004.
Arrays – two dimensional Chapter 14 This chapter explains how to do the following with a two dimensional array: Declare, use indices, obtain size, pass.
Plate_renderer (optional) N. Hirata 1. plate_renderer Tool for simulating Hayabusa's observations developed by N. Hirata – Implementing a light scattering.
SAGExplore web server tutorial for Module III:
Text and Binary File Processing
Java Programming Review 1
INC 161 , CPE 100 Computer Programming
C Language B. DHIVYA 17PCA140 II MCA.
Files Chapter 8.
Presentation transcript:

Geometry Library: Using GeoLib April 2005

Overview Usage Typical Algorithm Examples: –For Mapping Instruments –For Non-mapping Instruments

GeoLib Usage: Geometry Index Generation User Modules and Routines CSPICE GeoLib Instrument Data Set SPICE Kernels Geometry Index Label File Geometry Index Table File Information about data products (time, data set name, etc.) Ancillary data to compute derived geometry quantities General PDS Keywords ( PDS_VERSION_ID, LABEL_REVISION_NOTE, etc.) INDEX_TABLE object Index Table File

Typical Algorithm For each data product, retrieve information about the measurements: –Start and End Time –Modes of Operation Generate the number of samples required: –Lines (start and end points) for mapping instruments –Time for non-mapping instruments Generate one index line (row) per sample: –Generic Parameters –Instrument Dependent Parameters (only for mapping instruments)

Example: Non-Mapping Instrument (I) /* This example shows how to compute, for a single product, the required lines of the geometry index file */ #include “SpiceUsr.h” #include “geolib.h”. /*Define the required variables */ FILE *F; FILE *LBL; SpiceChar targ[20]; SpiceDouble time; SpiceDouble ALT; SpiceDouble SDIST; SpiceDouble SLON; SpiceDouble LTST; SpiceDouble SSLAT; SpiceDouble SSLON; SpiceDouble SCLAT; SpiceDouble SCLON; SpiceDouble SSPOS[3]; SpiceDouble SSVEL[3]; SpiceDouble STPOS[3]; SpiceDouble STVEL[3]; SpiceInt ORBN; SpiceChar CARRAY[5]; SpiceInt IARRAY[5]; SpiceDouble DARRAY[36]; int nlines; int rlen; int clen[46]; /* Load the SPICE kernels */ furnsh_c(“geolib.ker”); /* Open Geometry Index table file for writing */ F = fopen( “MY_GEOIDX.TAB”, “w+” ); /* Get Observation time and all other relevant information (user defined module). This information is obtained form the data product label files: - Start and End times - Release/revision information - File/Path Name - Data Set/Product ID - Target */ /* Get the times of all the required samples (user defined module) */

Example: Non-Mapping Instrument (II) /* For each of the samples obtained in the previous step, compute all the required parameters, by calling the following routines */ FOR sample[0] to sample[n-1] { /* Compute all non-instrument related parameters, based on times */ orbit_number( time, &ORBN ); solar_longitude( time, targ, &SLON); sub_solar_point( time, targ, &SSLON, &SSLAT); sc_sun_distance( time, &SDIST ); sc_sun_state_vector( time, SSPOS, SSVEL ); sc_target_state_vector( time, targ, STPOS, STVEL); spacecraft_altitude( time, targ, &ALT); sub_spacecraft_point( time, targ, &SCLON, &SCLAT); local_true_solar_time( time, targ, SCLON, &LTSL); /* Assign the rest of the keywords to N/A and generate arrays required by writegln (user defined module): CARRAY: all character keywords; IARRAY: all integer keywords; DARRAY: all float keywords */ /* Write Index Line */ writegln( F, CARRAY, IARRAY, DARRAY ); } /* END of FOR loop */ /* Once processed all samples, write the Index Label file */ /* Remove blank columns, get number of lines of the index file, length of record and length of data columns */ clnblank( F, &nlines, &rlen, clen); /* Open the Geometry Index label file for writting */ LBL = fopen( “MY_GEOIDX.LBL”, “w”); /* Write the general PDS keywords and assign them the appropriate values (User defined module) */ /* Write the INDEX_TABLE object in the label file */ wrtidxobj( LBL, nlines, rlen, clen); /* Close both index and label files */ fclose( F ); fclose( LBL ); /* Unload the kernel pool */ unload_c(“geolib.ker”);

Example: Mapping Instrument (I) /* This example shows how to compute, for a single product, the required lines of the geometry index file */ #include “SpiceUsr.h” #include “geolib.h”. /*Define the required variables */ FILE *F; FILE *LBL; SpiceChar targ[20]; SpiceDouble time; SpiceDouble ALT; SpiceDouble SDIST; SpiceDouble SLON; SpiceDouble LTST; SpiceDouble SSLAT; SpiceDouble SSLON; SpiceDouble SCLAT; SpiceDouble SCLON; SpiceDouble SSPOS[3]; SpiceDouble SSVEL[3]; SpiceDouble STPOS[3]; SpiceDouble STVEL[3]; SpiceDouble LPT[2], RPT[2]; SpiceDouble CPT[2]; SpiceDouble SLANT; SpiceDouble PHASE, SOLAR, EMISSN; SpiceDouble NPOLE, SUBSC, SUBSUN; SpiceDouble HPS, VPS; SpiceInt ORBN; SpiceChar CARRAY[5]; SpiceInt IARRAY[5]; SpiceDouble DARRAY[36]; int nlines; int rlen; int clen[46]; /* Load the SPICE kernels */ furnsh_c(“geolib.ker”); /* Open Geometry Index table file for writing */ F = fopen( “MY_GEOIDX.TAB”, “w+” ); /* Get Observation time and all other relevant information (user defined module). This information is obtained form the data product label files: - Start and End times - Release/revision information - File/Path Name - Data Set/Product ID - Target */ /* Compute Footprint, corner points and time for each of the required lines (user defined module) */

Example: Mapping Instrument (II) /* For each of the ‘lines’ obtained in the previous step, compute all the required parameters, by calling the following routines */ FOR sample[0] to sample[n-1] { /* Compute all non-instrument related parameters, based on times */ orbit_number( time, &ORBN ); solar_longitude( time, targ, &SLON); sub_solar_point( time, targ, &SSLON, &SSLAT); sc_sun_distance( time, &SDIST ); sc_sun_state_vector( time, SSPOS, SSVEL ); sc_target_state_vector( time, targ, STPOS, STVEL); spacecraft_altitude( time, targ, &ALT); sub_spacecraft_point( time, targ, &SCLON, &SCLAT); /* Get lat/lon for central point of each line describing the footprint */ center_point( targ, time, LPT, RPT, CPT); /* Compute the LTST: CPT[0] = LON */ local_true_solar_time( time, targ, CPT[0], &LTSL); /* Compute Instrument Related Parameters */ illumination_angles( time, targ, CPT, &PHASE, &SOLAR, &EMISSION ); slant_distance( time, targ, CPT, &SLANT); /* The following parameters required the use of the IK; this file has to be load beforehand. */ azimuth_angles( targ, instr, CPT, time, &NPOLE, &SUBSC, &SUBSUN); pixel_scale( time, targ, instr, &HPS, &VPS); /* Generate arrays required by writegln (user defined module): CARRAY: all character keywords; IARRAY: all integer keywords; DARRAY: all float keywords */ /* Write Index Line */ writegln( F, CARRAY, IARRAY, DARRAY ); } /* END of FOR loop */

Example: Mapping Instrument (III) /* Once processed all samples, write the Index Label file */ /* Remove blank columns, get number of lines of the index file, length of record and length of data columns */ clnblank( F, &nlines, &rlen, clen); /* Open the Geometry Index label file for writting */ LBL = fopen( “MY_GEOIDX.LBL”, “w”); /* Write the general PDS keywords and assign them the appropriate values (User defined module) */ /* Write the INDEX_TABLE object in the label file */ wrtidxobj( LBL, nlines, rlen, clen); /* Close both index and label files */ fclose( F ); fclose( LBL ); /* Unload the kernel pool */ unload_c(“geolib.ker”);