OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
DopplerCentroidParameters.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 
13 
14 namespace ossimplugins
15 {
17  {
18  }
19 
21  {
22  }
23 
24 
26  {
27  os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl;
28 
29  os<<"attach_flag:"<<data._attach_flag<<std::endl;
30 
31  os<<"slant_range_time:"<<data._slant_range_time<<std::endl;
32 
33  os<<"dop_coef[0]:"<<data._dop_coef[0]<<std::endl;
34  os<<"dop_coef[1]:"<<data._dop_coef[1]<<std::endl;
35  os<<"dop_coef[2]:"<<data._dop_coef[2]<<std::endl;
36  os<<"dop_coef[3]:"<<data._dop_coef[3]<<std::endl;
37  os<<"dop_coef[4]:"<<data._dop_coef[4]<<std::endl;
38 
39  os<<"dop_conf:"<<data._dop_conf<<std::endl;
40 
41  os<<"dop_conf_below_thresh_flag:"<<data._dop_conf_below_thresh_flag<<std::endl;
42 
43  os<<"delta_dopp_coeff[0]:"<<data._delta_dopp_coeff[0]<<std::endl;
44  os<<"delta_dopp_coeff[1]:"<<data._delta_dopp_coeff[1]<<std::endl;
45  os<<"delta_dopp_coeff[2]:"<<data._delta_dopp_coeff[2]<<std::endl;
46  os<<"delta_dopp_coeff[3]:"<<data._delta_dopp_coeff[3]<<std::endl;
47  os<<"delta_dopp_coeff[4]:"<<data._delta_dopp_coeff[4]<<std::endl;
48 
49  return os;
50 
51  }
52 
54  {
55  // char buf64[65];
56  // buf64[64] = '\0';
57  // char buf32[33];
58  // buf32[32] = '\0';
59  // char buf27[28];
60  // buf27[27] = '\0';
61  // char buf20[21];
62  // buf20[20] = '\0';
63  // char buf16[17];
64  // buf16[16]='\0';
65  // char buf15[16];
66  // buf15[15] = '\0';
67  // char buf14[15];
68  // buf14[14] = '\0';
69  // char buf13[14];
70  // buf13[13] = '\0';
71  char buf12[13];
72  buf12[12] = '\0';
73  // char buf11[12];
74  // buf11[11] = '\0';
75  // char buf10[11];
76  // buf10[10] = '\0';
77  // char buf9[10];
78  // buf9[9] = '\0';
79  // char buf8[9];
80  // buf8[8] = '\0';
81  // char buf7[8];
82  // buf7[7] = '\0';
83  // char buf6[7];
84  // buf6[6] = '\0';
85  // char buf5[6];
86  // buf5[5] = '\0';
87  // char buf4[5];
88  // buf4[4] = '\0';
89  char buf3[4];
90  buf3[3] = '\0';
91  // char buf2[3];
92  // buf2[2] = '\0';
93 // char buf1[1]; // Not used avoid warning
94 
95  is.read(buf12,12);
96  data._zero_doppler_time = buf12;
97 
98  is.read((char*)&(data._attach_flag),1);
99 
100  is.read((char*)&(data._slant_range_time),4);
101  data.SwitchEndian(data._slant_range_time);
102 
103  for (int i = 0; i <5; i++) {
104  is.read((char*)&(data._dop_coef[i]),4);
105  data.SwitchEndian(data._dop_coef[i]);
106  }
107 
108  is.read((char*)&(data._dop_conf),4);
109  data.SwitchEndian(data._dop_conf);
110 
111  is.read((char*)&(data._dop_conf_below_thresh_flag),1);
112 
113  for (int i = 0; i <5; i++) {
114  is.read((char*)&(data._delta_dopp_coeff[i]),2);
115  data.SwitchEndian(data._delta_dopp_coeff[i]);
116  }
117 
118  is.read(buf3,3);
119 
120  return is;
121 
122  }
123 
125  EnvisatAsarRecord(rhs),
126  _zero_doppler_time(rhs._zero_doppler_time),
127  _attach_flag(rhs._attach_flag),
128  _slant_range_time(rhs._slant_range_time),
129  _dop_conf(rhs._dop_conf),
130  _dop_conf_below_thresh_flag(rhs._dop_conf_below_thresh_flag)
131  {
132  for (int i = 0; i <5; i++) {
133  _dop_coef[i] = rhs._dop_coef[i];
134  }
135  for (int i = 0; i <5; i++) {
137  }
138  }
139 
140 
142  {
146  _dop_conf = rhs._dop_conf;
148 
149  for (int i = 0; i <5; i++) {
150  _dop_coef[i] = rhs._dop_coef[i];
151  }
152  for (int i = 0; i <5; i++) {
154  }
155 
156  return *this;
157  }
158 }
bool _dop_conf_below_thresh_flag
dop_conf_below_thresh_flag
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
DopplerCentroidParameters & operator=(const DopplerCentroidParameters &rhs)
Copy operator.
signed short _delta_dopp_coeff[5]
delta_dopp_coeff[5]
std::string _zero_doppler_time
zero_doppler_time
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
This class is able to read the ASAR DopplerCentroidParameters record.
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
This class is the base class of all the Envisat ASAR record classes.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23