OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
SQ_ADSR.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #include <EnvisatAsar/SQ_ADSR.h>
13 
14 namespace ossimplugins
15 {
17  {
18  }
19 
21  {
22  }
23 
24 
25 
27  {
28  os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl;
29 
30  os<<"attach_flag:"<<data._attach_flag<<std::endl;
31 
32  os<<"input_mean_flag:"<<data._input_mean_flag<<std::endl;
33 
34  os<<"input_std_dev_flag:"<<data._input_std_dev_flag<<std::endl;
35 
36  os<<"input_gaps_flag:"<<data._input_gaps_flag<<std::endl;
37 
38  os<<"input_missing_lines_flag:"<<data._input_missing_lines_flag<<std::endl;
39 
40  os<<"dop_cen_flag:"<<data._dop_cen_flag<<std::endl;
41 
42  os<<"dop_amb_flag:"<<data._dop_amb_flag<<std::endl;
43 
44  os<<"output_mean_flag:"<<data._output_mean_flag<<std::endl;
45 
46  os<<"output_std_dev_flag:"<<data._output_std_dev_flag<<std::endl;
47 
48  os<<"chirp_flag:"<<data._chirp_flag<<std::endl;
49 
50  os<<"missing_data_set_flag:"<<data._missing_data_set_flag<<std::endl;
51 
52  os<<"invalid_downlink_flag:"<<data._invalid_downlink_flag<<std::endl;
53 
54  os<<"thres_chirp_broadening:"<<data._thres_chirp_broadening<<std::endl;
55 
56  os<<"thresh_chirp_sidelobe:"<<data._thresh_chirp_sidelobe<<std::endl;
57 
58  os<<"thresh_chirp_islr:"<<data._thresh_chirp_islr<<std::endl;
59 
60  os<<"thresh_input_mean:"<<data._thresh_input_mean<<std::endl;
61 
62  os<<"exp_input_mean:"<<data._exp_input_mean<<std::endl;
63 
64  os<<"thresh_input_std_dev:"<<data._thresh_input_std_dev<<std::endl;
65 
66  os<<"exp_input_std_dev:"<<data._exp_input_std_dev<<std::endl;
67 
68  os<<"thresh_dop_cen:"<<data._thresh_dop_cen<<std::endl;
69 
70  os<<"thresh_dop_amb:"<<data._thresh_dop_amb<<std::endl;
71 
72  os<<"thresh_output_mean:"<<data._thresh_output_mean<<std::endl;
73 
74  os<<"exp_output_mean:"<<data._exp_output_mean<<std::endl;
75 
76  os<<"thresh_output_std_dev:"<<data._thresh_output_std_dev<<std::endl;
77 
78  os<<"exp_output_std_dev:"<<data._exp_output_std_dev<<std::endl;
79 
80  os<<"thresh_input_missing_lines:"<<data._thresh_input_missing_lines<<std::endl;
81 
82  os<<"thresh_input_gaps:"<<data._thresh_input_gaps<<std::endl;
83 
84  os<<"lines_per_gaps:"<<data._lines_per_gaps<<std::endl;
85 
86  os<<"input_mean[0]:"<<data._input_mean[0]<<std::endl;
87  os<<"input_mean[1]:"<<data._input_mean[1]<<std::endl;
88 
89  os<<"input_std_dev[0]:"<<data._input_std_dev[0]<<std::endl;
90  os<<"input_std_dev[1]:"<<data._input_std_dev[1]<<std::endl;
91 
92  os<<"num_gaps:"<<data._num_gaps<<std::endl;
93 
94  os<<"num_missing_lines:"<<data._num_missing_lines<<std::endl;
95 
96  os<<"output_mean[0]:"<<data._output_mean[0]<<std::endl;
97  os<<"output_mean[1]:"<<data._output_mean[1]<<std::endl;
98 
99  os<<"output_std_dev[0]:"<<data._output_std_dev[0]<<std::endl;
100  os<<"output_std_dev[1]:"<<data._output_std_dev[1]<<std::endl;
101 
102  os<<"tot_errors:"<<data._tot_errors<<std::endl;
103 
104  return os;
105 
106  }
107 
109  {
110  // char buf64[65];
111  // buf64[64] = '\0';
112  // char buf32[33];
113  // buf32[32] = '\0';
114  // char buf27[28];
115  // buf27[27] = '\0';
116  // char buf20[21];
117  // buf20[20] = '\0';
118  char buf16[17];
119  buf16[16]='\0';
120  char buf15[16];
121  buf15[15] = '\0';
122  // char buf14[15];
123  // buf14[14] = '\0';
124  // char buf13[14];
125  // buf13[13] = '\0';
126  char buf12[13];
127  buf12[12] = '\0';
128  // char buf11[12];
129  // buf11[11] = '\0';
130  // char buf10[11];
131  // buf10[10] = '\0';
132  // char buf9[10];
133  // buf9[9] = '\0';
134  // char buf8[9];
135  // buf8[8] = '\0';
136  char buf7[8];
137  buf7[7] = '\0';
138  // char buf6[7];
139  // buf6[6] = '\0';
140  // char buf5[6];
141  // buf5[5] = '\0';
142  // char buf4[5];
143  // buf4[4] = '\0';
144  // char buf3[4];
145  // buf3[3] = '\0';
146  // char buf2[3];
147  // buf2[2] = '\0';
148 // char buf1[1]; // not used avoid warning
149 
150  is.read(buf12,12);
151  data._zero_doppler_time = buf12;
152 
153  is.read((char*)&(data._attach_flag),1);
154 
155  is.read((char*)&(data._input_mean_flag),1);
156 
157  is.read((char*)&(data._input_std_dev_flag),1);
158 
159  is.read((char*)&(data._input_gaps_flag),1);
160 
161  is.read((char*)&(data._input_missing_lines_flag),1);
162 
163  is.read((char*)&(data._dop_cen_flag),1);
164 
165  is.read((char*)&(data._dop_amb_flag),1);
166 
167  is.read((char*)&(data._output_mean_flag),1);
168 
169  is.read((char*)&(data._output_std_dev_flag),1);
170 
171  is.read((char*)&(data._chirp_flag),1);
172 
173  is.read((char*)&(data._missing_data_set_flag),1);
174 
175  is.read((char*)&(data._invalid_downlink_flag),1);
176 
177  is.read(buf7,7);
178 
179  is.read((char*)&(data._thres_chirp_broadening),4);
181 
182  is.read((char*)&(data._thresh_chirp_sidelobe),4);
184 
185  is.read((char*)&(data._thresh_chirp_islr),4);
186  data.SwitchEndian(data._thresh_chirp_islr);
187 
188  is.read((char*)&(data._thresh_input_mean),4);
189  data.SwitchEndian(data._thresh_input_mean);
190 
191  is.read((char*)&(data._exp_input_mean),4);
192  data.SwitchEndian(data._exp_input_mean);
193 
194  is.read((char*)&(data._thresh_input_std_dev),4);
196 
197  is.read((char*)&(data._exp_input_std_dev),4);
198  data.SwitchEndian(data._exp_input_std_dev);
199 
200  is.read((char*)&(data._thresh_dop_cen),4);
201  data.SwitchEndian(data._thresh_dop_cen);
202 
203  is.read((char*)&(data._thresh_dop_amb),4);
204  data.SwitchEndian(data._thresh_dop_amb);
205 
206  is.read((char*)&(data._thresh_output_mean),4);
208 
209  is.read((char*)&(data._exp_output_mean),4);
210  data.SwitchEndian(data._exp_output_mean);
211 
212  is.read((char*)&(data._thresh_output_std_dev),4);
214 
215  is.read((char*)&(data._exp_output_std_dev),4);
217 
218  is.read((char*)&(data._thresh_input_missing_lines),4);
220 
221  is.read((char*)&(data._thresh_input_gaps),4);
222  data.SwitchEndian(data._thresh_input_gaps);
223 
224  is.read((char*)&(data._lines_per_gaps),4);
225  data.SwitchEndian(data._lines_per_gaps);
226 
227  is.read(buf15,15);
228 
229  is.read((char*)&(data._input_mean[0]),4);
230  data.SwitchEndian(data._input_mean[0]);
231 
232  is.read((char*)&(data._input_mean[1]),4);
233  data.SwitchEndian(data._input_mean[1]);
234 
235  is.read((char*)&(data._input_std_dev[0]),4);
236  data.SwitchEndian(data._input_std_dev[0]);
237  is.read((char*)&(data._input_std_dev[1]),4);
238  data.SwitchEndian(data._input_std_dev[1]);
239 
240  is.read((char*)&(data._num_gaps),4);
241  data.SwitchEndian(data._num_gaps);
242 
243  is.read((char*)&(data._num_missing_lines),4);
244  data.SwitchEndian(data._num_missing_lines);
245 
246  is.read((char*)&(data._output_mean[0]),4);
247  data.SwitchEndian(data._output_mean[0]);
248  is.read((char*)&(data._output_mean[1]),4);
249  data.SwitchEndian(data._output_mean[1]);
250 
251  is.read((char*)&(data._output_std_dev[0]),4);
252  data.SwitchEndian(data._output_std_dev[0]);
253 
254  is.read((char*)&(data._output_std_dev[1]),4);
255  data.SwitchEndian(data._output_std_dev[1]);
256 
257  is.read((char*)&(data._tot_errors),4);
258  data.SwitchEndian(data._tot_errors);
259 
260  is.read(buf16,16);
261 
262  return is;
263 
264  }
265 
267  EnvisatAsarRecord(rhs),
268  _zero_doppler_time(rhs._zero_doppler_time),
269  _attach_flag(rhs._attach_flag),
270  _input_mean_flag(rhs._input_mean_flag),
271  _input_std_dev_flag(rhs._input_std_dev_flag),
272  _input_gaps_flag(rhs._input_gaps_flag),
273  _input_missing_lines_flag(rhs._input_missing_lines_flag),
274  _dop_cen_flag(rhs._dop_cen_flag),
275  _dop_amb_flag(rhs._dop_amb_flag),
276  _output_mean_flag(rhs._output_mean_flag),
277  _output_std_dev_flag(rhs._output_std_dev_flag),
278  _chirp_flag(rhs._chirp_flag),
279  _missing_data_set_flag(rhs._missing_data_set_flag),
280  _invalid_downlink_flag(rhs._invalid_downlink_flag),
281  _thres_chirp_broadening(rhs._thres_chirp_broadening),
282  _thresh_chirp_sidelobe(rhs._thresh_chirp_sidelobe),
283  _thresh_chirp_islr(rhs._thresh_chirp_islr),
284  _thresh_input_mean(rhs._thresh_input_mean),
285  _exp_input_mean(rhs._exp_input_mean),
286  _thresh_input_std_dev(rhs._thresh_input_std_dev),
287  _exp_input_std_dev(rhs._exp_input_std_dev),
288  _thresh_dop_cen(rhs._thresh_dop_cen),
289  _thresh_dop_amb(rhs._thresh_dop_amb),
290  _thresh_output_mean(rhs._thresh_output_mean),
291  _exp_output_mean(rhs._exp_output_mean),
292  _thresh_output_std_dev(rhs._thresh_output_std_dev),
293  _exp_output_std_dev(rhs._exp_output_std_dev),
294  _thresh_input_missing_lines(rhs._thresh_input_missing_lines),
295  _thresh_input_gaps(rhs._thresh_input_gaps),
296  _lines_per_gaps(rhs._lines_per_gaps),
297  _num_gaps(rhs._num_gaps),
298  _num_missing_lines(rhs._num_missing_lines),
299  _tot_errors(rhs._tot_errors)
300  {
301  _input_mean[0] = rhs._input_mean[0];
302  _input_mean[1] = rhs._input_mean[1];
303 
304  _input_std_dev[0] = rhs._input_std_dev[0];
305  _input_std_dev[1] = rhs._input_std_dev[1];
306 
307  _output_mean[0] = rhs._output_mean[0];
308  _output_mean[1] = rhs._output_mean[1];
309 
310  _output_std_dev[0] = rhs._output_std_dev[0];
311  _output_std_dev[1] = rhs._output_std_dev[1];
312 
313  }
314 
316  {
327  _chirp_flag = rhs._chirp_flag;
346  _num_gaps = rhs._num_gaps;
348  _tot_errors = rhs._tot_errors;
349 
350  _input_mean[0] = rhs._input_mean[0];
351  _input_mean[1] = rhs._input_mean[1];
352 
353  _input_std_dev[0] = rhs._input_std_dev[0];
354  _input_std_dev[1] = rhs._input_std_dev[1];
355 
356  _output_mean[0] = rhs._output_mean[0];
357  _output_mean[1] = rhs._output_mean[1];
358 
359  _output_std_dev[0] = rhs._output_std_dev[0];
360  _output_std_dev[1] = rhs._output_std_dev[1];
361 
362  return *this;
363  }
364 }
bool _input_std_dev_flag
input_std_dev_flag
Definition: SQ_ADSR.h:359
float _input_std_dev[2]
input_std_dev[2]
Definition: SQ_ADSR.h:467
float _num_missing_lines
num_missing_lines
Definition: SQ_ADSR.h:475
bool _missing_data_set_flag
missing_data_set_flag
Definition: SQ_ADSR.h:391
std::string _zero_doppler_time
zero_doppler_time
Definition: SQ_ADSR.h:341
bool _dop_cen_flag
dop_cen_flag
Definition: SQ_ADSR.h:371
float _exp_output_mean
exp_output_mean
Definition: SQ_ADSR.h:439
float _exp_input_std_dev
exp_input_std_dev
Definition: SQ_ADSR.h:423
float _output_mean[2]
output_mean[2]
Definition: SQ_ADSR.h:479
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
unsigned int _tot_errors
tot_errors
Definition: SQ_ADSR.h:487
This class is able to read the ASAR SQ_ADSR record.
Definition: SQ_ADSR.h:24
SQ_ADSR & operator=(const SQ_ADSR &rhs)
Copy operator.
Definition: SQ_ADSR.cpp:315
float _thresh_input_std_dev
thresh_input_std_dev
Definition: SQ_ADSR.h:419
float _output_std_dev[2]
output_std_dev[2]
Definition: SQ_ADSR.h:483
float _thresh_chirp_sidelobe
thresh_chirp_sidelobe
Definition: SQ_ADSR.h:403
bool _chirp_flag
chirp_flag
Definition: SQ_ADSR.h:387
bool _input_missing_lines_flag
input_missing_lines_flag
Definition: SQ_ADSR.h:367
SQ_ADSR()
Constructor.
Definition: SQ_ADSR.cpp:16
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
float _thresh_input_gaps
thresh_input_gaps
Definition: SQ_ADSR.h:455
float _thresh_chirp_islr
thresh_chirp_islr
Definition: SQ_ADSR.h:407
bool _input_mean_flag
input_mean_flag
Definition: SQ_ADSR.h:355
float _thresh_dop_amb
thresh_dop_amb
Definition: SQ_ADSR.h:431
float _input_mean[2]
input_mean[2]
Definition: SQ_ADSR.h:463
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
bool _invalid_downlink_flag
invalid_downlink_flag
Definition: SQ_ADSR.h:395
unsigned int _lines_per_gaps
lines_per_gaps
Definition: SQ_ADSR.h:459
float _thresh_input_mean
thresh_input_mean
Definition: SQ_ADSR.h:411
float _exp_output_std_dev
exp_output_std_dev
Definition: SQ_ADSR.h:447
float _thresh_input_missing_lines
thresh_input_missing_lines
Definition: SQ_ADSR.h:451
float _thres_chirp_broadening
thres_chirp_broadening
Definition: SQ_ADSR.h:399
float _thresh_output_mean
thresh_output_mean
Definition: SQ_ADSR.h:435
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
bool _output_mean_flag
output_mean_flag
Definition: SQ_ADSR.h:379
bool _attach_flag
attach_flag
Definition: SQ_ADSR.h:351
This class is the base class of all the Envisat ASAR record classes.
float _thresh_output_std_dev
thresh_output_std_dev
Definition: SQ_ADSR.h:443
float _num_gaps
num_gaps
Definition: SQ_ADSR.h:471
float _exp_input_mean
exp_input_mean
Definition: SQ_ADSR.h:415
virtual ~SQ_ADSR()
Destructor.
Definition: SQ_ADSR.cpp:20
bool _output_std_dev_flag
output_std_dev_flag
Definition: SQ_ADSR.h:383
float _thresh_dop_cen
thresh_dop_cen
Definition: SQ_ADSR.h:427
bool _dop_amb_flag
dop_amb_flag
Definition: SQ_ADSR.h:375
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
bool _input_gaps_flag
input_gaps_flag
Definition: SQ_ADSR.h:363