PLplot  5.10.0
qsastime.h
Go to the documentation of this file.
00001 #ifndef _QSASTIME_H_
00002 #define _QSASTIME_H_
00003 //
00004 // This software originally contributed under the LGPL in January 2009 to
00005 // PLplot by the
00006 // Cluster Science Centre
00007 // QSAS team,
00008 // Imperial College, London
00009 // Copyright (C) 2009 Imperial College, London
00010 //
00011 // This file is part of PLplot.
00012 //
00013 // PLplot is free software; you can redistribute it and/or modify
00014 // it under the terms of the GNU Library General Public License as published
00015 // by the Free Software Foundation; either version 2 of the License, or
00016 // (at your option) any later version.
00017 //
00018 // PLplot is distributed in the hope that it will be useful,
00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 // GNU Library General Public License for more details.
00022 //
00023 // You should have received a copy of the GNU Library General Public License
00024 // along with PLplot; if not, write to the Free Software
00025 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00026 //
00027 //
00028 
00029 // MJD measures from the start of 17 Nov 1858
00030 
00031 // These utilities use the Gregorian calendar after 4 Oct 1582 (Julian) i.e. from 15 Oct 1582 Gregorian
00032 // Note C libraries use Gregorian only from 14 Sept 1752
00033 // More detailed discussion can be found at http://aa.usno.navy.mil/data/docs/JulianDate.php
00034 // These routines have been compared with the results of the US Naval Observatory online converter.
00035 // Modified Julian Date (MJD) = Julian Date (JD) - 2400000.5
00036 //
00037 // In all routines, specifying a day, hour, minute or second field greater than would be valid is
00038 // handled with modulo arithmetic and safe.
00039 // Thus 2006-12-32 00:62:00.0 will safely, and correctly, be treated as 2007-01-01 01:02:00.0
00040 //
00041 //
00042 
00043 #include <stdio.h>
00044 #include <stdlib.h>
00045 #include <string.h>
00046 // include header file for dll definitions
00047 #include "qsastimedll.h"
00048 
00049 struct QSASConfigStruct;
00050 typedef struct QSASConfigStruct   QSASConfig;
00051 
00052 // externally accessible functions
00053 QSASTIMEDLLIMPEXP void configqsas( double scale, double offset1, double offset2, int ccontrol, int ifbtime_offset, int year, int month, int day, int hour, int min, double sec, QSASConfig **qsasconfig );
00054 
00055 QSASTIMEDLLIMPEXP void closeqsas( QSASConfig **qsasconfig );
00056 
00057 QSASTIMEDLLIMPEXP int ctimeqsas( int year, int month, int day, int hour, int min, double sec, double * ctime, QSASConfig *qsasconfig );
00058 
00059 QSASTIMEDLLIMPEXP void btimeqsas( int *year, int *month, int *day, int *hour, int *min, double *sec, double ctime, QSASConfig *qsasconfig );
00060 
00061 QSASTIMEDLLIMPEXP size_t strfqsas( char * buf, size_t len, const char *format, double ctime, QSASConfig *qsasconfig );
00062 
00063 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines