1 #ifndef DBALLE_MSG_WRIMPORTER_BASE_H
2 #define DBALLE_MSG_WRIMPORTER_BASE_H
4 #include <dballe/msg/wr_codec.h>
5 #include <dballe/msg/msg.h>
25 int ye, mo, da, ho, mi, se;
28 virtual void run() = 0;
73 static constexpr
double missing = std::numeric_limits<double>::max();
79 bool height_sensor_seen;
80 bool swell_wave_group;
90 int time_period_offset;
91 bool time_period_seen;
107 const Level& clcmch();
129 bool is_unsupported()
const;
141 std::unique_ptr<wreport::Var>
var;
163 virtual void set_sensor_height(
const LevelContext& ctx) = 0;
164 virtual void set_barometer_height(
const LevelContext& ctx) = 0;
172 void set_sensor_height(
const LevelContext& ctx)
override;
173 void set_barometer_height(
const LevelContext& ctx)
override;
181 void set_sensor_height(
const LevelContext& ctx)
override;
182 void set_barometer_height(
const LevelContext& ctx)
override;
187 template<
typename ...Args>
188 std::unique_ptr<Interpreted> create_interpreted(
bool simplified, Args&& ...args)
193 return std::unique_ptr<Interpreted>(
new InterpretedPrecise(std::forward<Args>(args)...));
206 std::vector<Interpreted*> queued;
212 void set_gen_sensor(
const wreport::Var& var,
int shortcut);
213 void set_baro_sensor(
const wreport::Var& var,
int shortcut);
214 void set_past_weather(
const wreport::Var& var,
int shortcut);
216 void set_wind_max(
const wreport::Var& var,
int shortcut);
220 void set(std::unique_ptr<Interpreted> val);
226 void init()
override;
Check if the current context state of BUFR information is something that we currently cannot handle...
Definition: base.h:125
unsigned level_deviation
Distance from the standard level to the real one.
Definition: base.h:152
Storage for related physical data.
Definition: msg.h:70
Level level
Interpreted level.
Definition: base.h:143
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:587
Keep track of level context changes.
Definition: base.h:71
Vertical level or layer.
Definition: types.h:532
Keep track of the current cloud metadata.
Definition: base.h:103
Keep track of time range context changes.
Definition: base.h:87
Trange trange
Interpreted time range.
Definition: base.h:145
std::unique_ptr< wreport::Var > var
Interpreted value being built.
Definition: base.h:141
Struct used to build an interpreted value.
Definition: base.h:138
Base class for synop, ship and other importer with synop-like data.
Definition: base.h:199
MsgType
Source of the data.
Definition: msg.h:41
Interpreted(int shortcut, const wreport::Var &var)
Beging building using a copy of var, and level and timerange from shortcut.