bufr2synop
0.24.0
src
libraries
metcommon.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (C) 2004-2022 by Guillermo Ballester Valor *
3
* gbv@ogimet.com *
4
* *
5
* This file is part of bufr2synop *
6
* *
7
* Ogimet is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* Ogimet is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
19
* *
20
***************************************************************************/
21
/*!
22
\file metcommon.h
23
\brief Main header file for common report structures
24
*/
25
#ifndef METCOMMON_H
26
#define METCOMMON_H
27
28
/*! \struct report_date_ext
29
\brief contains extensions, not in wmo. Date/time UTC information
30
*/
31
struct
report_date_ext
32
{
33
char
YYYY
[6];
/*!< Year four digits */
34
char
MM
[4];
/*!< Month, two digits 01..12 */
35
char
DD
[4];
/*!< Day of the month, two digits 01..31 */
36
char
HH
[4];
/*!< Hour (UTC) 00..23 */
37
char
mm
[4];
/*!< Minute 00..59 */
38
char
ss
[4];
/*!< Second 00..59 */
39
};
40
41
/*!
42
* \struct wigos_id
43
* \brief WIGOS station identifier
44
*/
45
struct
wigos_id
46
{
47
uint8_t
series
;
/*!< WIGOS identifier series. IN 2022 still only 0 in use */
48
uint16_t
issuer
;
/*!< Issuer of identifier */
49
uint16_t
issue
;
/*!< Issue numbre */
50
char
local_id
[24];
/*!< Local identifier */
51
};
52
53
#ifndef MET_DATETIME
54
#define MET_DATETIME
55
/*!
56
\struct met_datetime
57
\brief stores date and time reference of a report, commonly the observation time
58
*/
59
struct
met_datetime
60
{
61
time_t
t
;
/*!< Unix instant for report date/time reference */
62
struct
tm
tim
;
/*!< struct tm with report date/time info (UTC) */
63
char
datime
[16];
/*!< date/time reference (UTC) as string with YYYYMMDDHHmm[ss] format */
64
};
65
#endif
66
67
68
69
#endif
met_datetime
stores date and time reference of a report, commonly the observation time
Definition:
metcommon.h:60
met_datetime::datime
char datime[16]
Definition:
metcommon.h:63
met_datetime::tim
struct tm tim
Definition:
metcommon.h:62
met_datetime::t
time_t t
Definition:
metcommon.h:61
report_date_ext
contains extensions, not in wmo. Date/time UTC information
Definition:
metcommon.h:32
report_date_ext::ss
char ss[4]
Definition:
metcommon.h:38
report_date_ext::mm
char mm[4]
Definition:
metcommon.h:37
report_date_ext::HH
char HH[4]
Definition:
metcommon.h:36
report_date_ext::DD
char DD[4]
Definition:
metcommon.h:35
report_date_ext::MM
char MM[4]
Definition:
metcommon.h:34
report_date_ext::YYYY
char YYYY[6]
Definition:
metcommon.h:33
wigos_id
WIGOS station identifier.
Definition:
metcommon.h:46
wigos_id::issue
uint16_t issue
Definition:
metcommon.h:49
wigos_id::issuer
uint16_t issuer
Definition:
metcommon.h:48
wigos_id::series
uint8_t series
Definition:
metcommon.h:47
wigos_id::local_id
char local_id[24]
Definition:
metcommon.h:50
Generated by
1.9.5