UltraScan III
us_simparms.h
Go to the documentation of this file.
1 #ifndef US_SIM_PARAMS_H
3 #define US_SIM_PARAMS_H
4 
5 #include <QtCore>
6 #include "us_extern.h"
7 #include "us_dataIO.h"
8 #include "us_db2.h"
9 
11 
13 {
14  public:
15 
17  enum MeshType { ASTFEM, CLAVERIE, MOVING_HAT, USER, ASTFVM };
18 
20  enum GridType { FIXED, MOVING };
21 
22  class SpeedProfile;
23 
25 
33  void initFromData( US_DB2*, US_DataIO::RawData&, bool = true,
34  QString = "", QString = "");
35 
41  void initFromData( US_DB2*, US_DataIO::EditedData&, bool = true );
42 
49  void setHardware( US_DB2* = NULL, QString = "0", int = 0, int = 0 );
50 
56  void setHardware( QString = "0", int = 0, int = 0 );
57 
62  int load_simparms( QString );
63 
68  int save_simparms( QString );
69 
75  static int get_simparms( US_SimulationParameters&, QString );
76 
82  static int put_simparms( US_SimulationParameters&, QString );
83 
89  static int readSpeedSteps( QString, QString, QVector< SpeedProfile >& );
90 
94  static void computeSpeedSteps( QVector< US_DataIO::Scan >*, QVector< SpeedProfile >& );
95 
99  static void speedstepFromXml( QXmlStreamReader&, SpeedProfile& );
100 
104  static void speedstepToXml( QXmlStreamWriter&, SpeedProfile* );
105 
111  static int speedstepsFromDB( US_DB2*, int, QVector< SpeedProfile >& );
112 
118  static int speedstepToDB( US_DB2*, int, SpeedProfile* );
119 
121  void debug( void );
122 
123 
125  QVector< double > mesh_radius;
126 
134  QVector< SpeedProfile > speed_step;
136 
137  int simpoints;
141  double meniscus;
143  double bottom;
147  double temperature;
148  double rnoise;
149  double tinoise;
150  double rinoise;
152  double band_volume;
153  double bottom_position;
155  QString rotorCalID;
156  double rotorcoeffs[ 2 ];
157 
160 
161  int cp_sector;
162  double cp_pathlen;
163  double cp_angle;
164  double cp_width;
165 
168  {
169  public:
170 
171  SpeedProfile();
172 
174  double delay_minutes;
175  double w2t_first;
176  double w2t_last;
177  double avg_speed;
178  double speed_stddev;
182  int time_last;
183  int scans;
186  int set_speed;
188  };
189 };
190 
191 #endif