WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
UpaRawinData.h
1#ifndef _WINC_UPARAWINDATA
2#define _WINC_UPARAWINDATA
3
4#include <WXP/Date.h>
5#include <WXP/EarthPoint.h>
6#include <WXP/StrLib.h>
7#include <WXP/UpaLevel.h>
8
9namespace WXP {
11 public:
12 static const int max_man = 25;
13 static const int max_sig = 250;
14 static const int max_wnd = 150;
15 private:
16 char id[11]; /* Station identifier */
17 char area[11]; /* Regional identifier */
18 char wmo[6]; /* WMO station number */
19 int type; /* Observation type */
20 Date date; /* Full date */
21 float lat; /* Station latitude */
22 float lon; /* Station longitude */
23 float elev; /* Station elevation */
24
25 UpaLevel man[max_man]; /* Mandatory level information */
26 int num_man; /* Number of mandatory levels */
27 int sfc; /* Index of surface level */
28 int maxwnd; /* Index of max wind level */
29 int trop; /* Index of tropopause level */
30
31 UpaLevel sig[max_sig]; /* Significant level information */
32 int num_sig; /* Number of significant levels */
33
34 UpaLevel wnd[max_wnd]; /* Wind level information */
35 int num_wnd; /* Number of wind levels */
36
37 public:
39 int init();
40 int setType( int rtype );
41 inline int getType(){ return type; };
42 int setDate( Date rdate );
43 inline Date getDate(){ return date; };
44 int getTime();
45 int setId( const char *rid );
46 int setId( const char *rid, const char*rwmo, float rlat, float rlon );
47 inline const char *getId(){ return id; };
48 int setArea( const char *rarea );
49 inline const char *getArea(){ return area; };
50 inline int setWmo( const char *rwmo ){ StrLib::copy( wmo, 6, rwmo ); return 1; };
51 inline const char *getWmo(){ return wmo; };
52 inline int setLat( float rlat ){ lat = rlat; return 1; };
53 inline int setLon( float rlon ){ lon = rlon; return 1; };
54 int setLoc( float rlat, float rlon );
55 int getLoc( float &rlat, float &rlon );
56 inline float getLat(){ return lat; };
57 inline float getLon(){ return lon; };
58 EarthPoint getLoc();
59 int setElev( float relev );
60 inline float getElev(){ return elev; };
61
62 int setSfc( int rsfc );
63 int getSfc();
64 int setTrop( int rtrop );
65 int getTrop();
66 int setMaxWnd( int rmaxwnd );
67 int getMaxWnd();
68
69 inline int getNumMan(){ return num_man; };
70 int setMan( int ind, UpaLevel rlevel );
71 int addMan( UpaLevel rlevel );
72 float getManPr( int i );
73 UpaLevel getMan( int i );
74
75 inline int getNumSig(){ return num_sig; };
76 int setSig( int ind, UpaLevel rlevel );
77 int addSig( UpaLevel rlevel );
78 float getSigPr( int i );
79 UpaLevel getSig( int i );
80
81 inline int getNumWnd(){ return num_wnd; };
82 int setWnd( int ind, UpaLevel rlevel );
83 int addWnd( UpaLevel rlevel );
84 float getWndHt( int i );
85 UpaLevel getWnd( int i );
86
87 int sort();
88 int print();
89
90 friend class UpaTool;
91 };
92}
93#endif
This class stores date and time information.
Definition Date.h:8
static int copy(char *s1, int len1, const char s2)
Definition StrLib.cc:506
This class stores upper air sounding data by type (mandatory, significant, wind levels)
Definition UpaRawinData.h:10
UpaRawinData()
Definition UpaRawinData.cc:22
int init()
Definition UpaRawinData.cc:29
This class is a set of tools to decode and manage upper air data.
Definition UpaTool.h:10
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines earth point values (lat, lon, elev)
Definition EarthPoint.h:5
This struct contains data for a specific upper air level.
Definition UpaLevel.h:5