OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ChirpParameters.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<<"swath:"<<data._swath.c_str()<<std::endl;
32 
33  os<<"polar:"<<data._polar.c_str()<<std::endl;
34 
35  os<<"chirp_width:"<<data._chirp_width<<std::endl;
36 
37  os<<"chirp_sidelobe:"<<data._chirp_sidelobe<<std::endl;
38 
39  os<<"chirp_islr:"<<data._chirp_islr<<std::endl;
40 
41  os<<"chirp_peak_loc:"<<data._chirp_peak_loc<<std::endl;
42 
43  os<<"re_chirp_power:"<<data._re_chirp_power<<std::endl;
44 
45  os<<"elev_chirp_power:"<<data._elev_chirp_power<<std::endl;
46 
47  os<<"chirp_quality_flag:"<<data._chirp_quality_flag<<std::endl;
48 
49  os<<"ref_chirp_power:"<<data._ref_chirp_power<<std::endl;
50 
51  os<<"normalisation_source:"<<data._normalisation_source.c_str()<<std::endl;
52 
53  for (int i = 0 ; i<352; i++) {
54  os<<"cal_pulse_info["<<i<<"]:"<<data._cal_pulse_info[i]<<std::endl;
55  }
56 
57  return os;
58 
59  }
60 
62  {
63  // char buf64[65];
64  // buf64[64] = '\0';
65  // char buf32[33];
66  // buf32[32] = '\0';
67  // char buf27[28];
68  // buf27[27] = '\0';
69  // char buf20[21];
70  // buf20[20] = '\0';
71  char buf16[17];
72  buf16[16]='\0';
73  // char buf15[16];
74  // buf15[15] = '\0';
75  // char buf14[15];
76  // buf14[14] = '\0';
77  // char buf13[14];
78  // buf13[13] = '\0';
79  char buf12[13];
80  buf12[12] = '\0';
81  // char buf11[12];
82  // buf11[11] = '\0';
83  // char buf10[11];
84  // buf10[10] = '\0';
85  // char buf9[10];
86  // buf9[9] = '\0';
87  // char buf8[9];
88  // buf8[8] = '\0';
89  char buf7[8];
90  buf7[7] = '\0';
91  // char buf6[7];
92  // buf6[6] = '\0';
93  // char buf5[6];
94  // buf5[5] = '\0';
95  char buf4[5];
96  buf4[4] = '\0';
97  char buf3[4];
98  buf3[3] = '\0';
99  // char buf2[3];
100  // buf2[2] = '\0';
101 // char buf1[1]; // not used avoid warning
102 
103  is.read(buf12,12);
104  data._zero_doppler_time = buf12;
105 
106  is.read((char*)&(data._attach_flag),1);
107 
108  is.read(buf3,3);
109  data._swath = buf3;
110 
111  is.read(buf3,3);
112  data._polar = buf3;
113 
114  is.read((char*)&(data._chirp_width),4);
115  data.SwitchEndian(data._chirp_width);
116 
117  is.read((char*)&(data._chirp_sidelobe),4);
118  data.SwitchEndian(data._chirp_sidelobe);
119 
120  is.read((char*)&(data._chirp_islr),4);
121  data.SwitchEndian(data._chirp_islr);
122 
123  is.read((char*)&(data._chirp_peak_loc),4);
124  data.SwitchEndian(data._chirp_peak_loc);
125 
126  is.read((char*)&(data._re_chirp_power),4);
127  data.SwitchEndian(data._re_chirp_power);
128 
129  is.read((char*)&(data._elev_chirp_power),4);
130  data.SwitchEndian(data._elev_chirp_power);
131 
132  is.read((char*)&(data._chirp_quality_flag),1);
134 
135  is.read((char*)&(data._ref_chirp_power),4);
136  data.SwitchEndian(data._ref_chirp_power);
137 
138  is.read(buf7,7);
139  data._normalisation_source = buf7;
140 
141  is.read(buf4,4);
142 
143  for (int i = 0; i<352; i++) {
144  is.read((char*)&(data._cal_pulse_info[i]),4);
145  data.SwitchEndian(data._cal_pulse_info[i]);
146  }
147 
148  is.read(buf16,16);
149 
150  return is;
151 
152  }
153 
155  EnvisatAsarRecord(rhs),
156  _zero_doppler_time(rhs._zero_doppler_time),
157  _attach_flag(rhs._attach_flag),
158  _swath(rhs._swath),
159  _polar(rhs._polar),
160  _chirp_width(rhs._chirp_width),
161  _chirp_sidelobe(rhs._chirp_sidelobe),
162  _chirp_islr(rhs._chirp_islr),
163  _chirp_peak_loc(rhs._chirp_peak_loc),
164  _re_chirp_power(rhs._re_chirp_power),
165  _elev_chirp_power(rhs._elev_chirp_power),
166  _chirp_quality_flag(rhs._chirp_quality_flag),
167  _ref_chirp_power(rhs._ref_chirp_power),
168  _normalisation_source(rhs._normalisation_source)
169  {
170  for (int i = 0; i<352; i++) {
171  _cal_pulse_info[i] = rhs._cal_pulse_info[i];
172  }
173  }
174 
175 
177  {
180  _swath = rhs._swath;
181  _polar = rhs._polar;
184  _chirp_islr = rhs._chirp_islr;
191 
192  for (int i = 0; i<352; i++) {
193  _cal_pulse_info[i] = rhs._cal_pulse_info[i];
194  }
195 
196  return *this;
197  }
198 }
199 
float _chirp_sidelobe
chirp_sidelobe
float _chirp_peak_loc
chirp_peak_loc
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
float _ref_chirp_power
ref_chirp_power
std::string _normalisation_source
normalisation_source
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 ChirpParameters record.
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
float _elev_chirp_power
elev_chirp_power
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
bool _chirp_quality_flag
chirp_quality_flag
This class is the base class of all the Envisat ASAR record classes.
float _cal_pulse_info[352]
cal_pulse_info[352]
ChirpParameters & operator=(const ChirpParameters &rhs)
Copy operator.
virtual ~ChirpParameters()
Destructor.
float _re_chirp_power
re_chirp_power
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23