OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
SRGRConversionParameters.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$
12 
13 namespace ossimplugins
14 {
15 
17  {
18  }
19 
21  {
22  }
23 
25  {
26  os<<"first_zero_doppler_time_day:"<<data._first_zero_doppler_time_day<<std::endl;
27 
28  os<<"first_zero_doppler_time_sec:"<<data._first_zero_doppler_time_sec<<std::endl;
29 
30  os<<"first_zero_doppler_time_microsec:"<<data._first_zero_doppler_time_microsec<<std::endl;
31 
32  os<<"attach_flag:"<<data._attach_flag<<std::endl;
33 
34  os<<"_slant_range_time:"<<data._slant_range_time<<std::endl;
35 
36  os<<"_ground_range_origin:"<<data._ground_range_origin<<std::endl;
37 
38  for (int i = 0; i<5; i++) {
39  os<<"_srgr_coef[i]:"<<data._srgr_coef[i]<<std::endl;
40  }
41 
42  return os;
43 
44  }
45 
47  {
48  char buf14[15];
49  buf14[14] = '\0';
50  // char buf12[13];
51  // buf12[12] = '\0';
52 
53 
54  is.read((char*)&(data._first_zero_doppler_time_day),4);
56 
57  is.read((char*)&(data._first_zero_doppler_time_sec),4);
59 
60  is.read((char*)&(data._first_zero_doppler_time_microsec),4);
62 
63  is.read((char*)&(data._attach_flag),1);
64 
65  is.read((char*)&(data._slant_range_time),4);
67 
68  is.read((char*)&(data._ground_range_origin),4);
70 
71  for (int i = 0; i<5; i++) {
72  is.read((char*)&(data._srgr_coef[i]),4);
73  data.SwitchEndian(data._srgr_coef[i]);
74  }
75 
76  is.read(buf14,14);
77 
78  return is;
79  }
80 
81 
83  EnvisatAsarRecord(rhs),
84  _first_zero_doppler_time_day(rhs._first_zero_doppler_time_day),
85  _first_zero_doppler_time_sec(rhs._first_zero_doppler_time_sec),
86  _first_zero_doppler_time_microsec(rhs._first_zero_doppler_time_microsec),
87  _attach_flag(rhs._attach_flag),
88  _slant_range_time(rhs._slant_range_time),
89  _ground_range_origin(rhs._ground_range_origin)
90  {
91  for (int i = 0; i<5; i++) {
92  _srgr_coef[i] = rhs._srgr_coef[i];
93  }
94  }
95 
97  {
103 
104  for (int i = 0; i<5; i++) {
105  _srgr_coef[i] = rhs._srgr_coef[i];
106  }
107 
108  return *this;
109  }
110 }
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
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 able to read the ASAR SRGRConversionParameters record.
This class is the base class of all the Envisat ASAR record classes.
unsigned int _first_zero_doppler_time_microsec
first_zero_doppler_time microsec
unsigned int _first_zero_doppler_time_sec
first_zero_doppler_time sec
SRGRConversionParameters & operator=(const SRGRConversionParameters &rhs)
Copy operator.
int _first_zero_doppler_time_day
first_zero_doppler_time day
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23