OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ErsSarPlatformPositionData.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 
15 namespace ossimplugins
16 {
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  os << "orbit_ele_desg:" << data._orbit_ele_desg.c_str() << std::endl;
29 
30  for (int i = 0; i < 6; i++)
31  {
32  os << "orbit_ele[" << i << "]:" << data._orbit_ele[i] << std::endl;
33  }
34 
35  os << "ndata:" << data._ndata << std::endl;
36 
37  os << "year:" << data._year << std::endl;
38 
39  os << "month:" << data._month << std::endl;
40 
41  os << "day:" << data._day << std::endl;
42 
43  os << "gmt_day:" << data._gmt_day << std::endl;
44 
45  os << "gmt_sec:" << data._gmt_sec << std::endl;
46 
47  os << "data_int:" << data._data_int << std::endl;
48 
49  os << "ref_coord:" << data._ref_coord.c_str() << std::endl;
50 
51  os << "hr_angle:" << data._hr_angle << std::endl;
52 
53  os << "alt_poserr:" << data._alt_poserr << std::endl;
54 
55  os << "crt_poserr:" << data._crt_poserr << std::endl;
56 
57  os << "rad_poserr:" << data._rad_poserr << std::endl;
58 
59  os << "alt_velerr:" << data._alt_velerr << std::endl;
60 
61  os << "crt_velerr:" << data._crt_velerr << std::endl;
62 
63  os << "rad_velerr:" << data._rad_velerr << std::endl;
64 
65  for (int i = 0; i < 64; i++)
66  {
67  os << "pos_vect[" << i << "]:" << data._pos_vect[i] << std::endl;
68  }
69 
70  return os;
71 }
72 
74 {
75  char buf[1207];
76  buf[1206] = '\0';
77 
78  is.read(buf, 32);
79  buf[32] = '\0';
80  data._orbit_ele_desg = buf;
81 
82  for (int i = 0; i < 6; i++)
83  {
84  is.read(buf, 16);
85  buf[16] = '\0';
86  data._orbit_ele[i] = atof(buf);
87  }
88 
89  is.read(buf, 4);
90  buf[4] = '\0';
91  data._ndata = atoi(buf);
92 
93  is.read(buf, 4);
94  buf[4] = '\0';
95  data._year = atoi(buf);
96 
97  is.read(buf, 4);
98  buf[4] = '\0';
99  data._month = atoi(buf);
100 
101  is.read(buf, 4);
102  buf[4] = '\0';
103  data._day = atoi(buf);
104 
105  is.read(buf, 4);
106  buf[4] = '\0';
107  data._gmt_day = atoi(buf);
108 
109  is.read(buf, 22);
110  buf[22] = '\0';
111  data._gmt_sec = atof(buf);
112 
113  is.read(buf, 22);
114  buf[22] = '\0';
115  data._data_int = atof(buf);
116 
117  is.read(buf, 64);
118  buf[64] = '\0';
119  data._ref_coord = buf;
120 
121  is.read(buf, 22);
122  buf[22] = '\0';
123  data._hr_angle = atof(buf);
124 
125  is.read(buf, 16);
126  buf[16] = '\0';
127  data._alt_poserr = atof(buf);
128 
129  is.read(buf, 16);
130  buf[16] = '\0';
131  data._crt_poserr = atof(buf);
132 
133  is.read(buf, 16);
134  buf[16] = '\0';
135  data._rad_poserr = atof(buf);
136 
137  is.read(buf, 16);
138  buf[16] = '\0';
139  data._alt_velerr = atof(buf);
140 
141  is.read(buf, 16);
142  buf[16] = '\0';
143  data._crt_velerr = atof(buf);
144 
145  is.read(buf, 16);
146  buf[16] = '\0';
147  data._rad_velerr = atof(buf);
148 
149  for (int i = 0; i < data._ndata; i++)
150  {
151  is >> data._pos_vect[i];
152  }
153 
154  return is;
155 }
156 
158  ErsSarRecord(rhs)
159 {
161 
162  for (int i = 0; i < 6; i++)
163  {
164  _orbit_ele[i] = rhs._orbit_ele[i];
165  }
166 
167  _ndata = rhs._ndata;
168 
169  _year = rhs._year;
170 
171  _month = rhs._month;
172 
173  _day = rhs._day;
174 
175  _gmt_day = rhs._gmt_day;
176 
177  _gmt_sec = rhs._gmt_sec;
178 
179  _data_int = rhs._data_int;
180 
181  _ref_coord = rhs._ref_coord;
182 
183  _hr_angle = rhs._hr_angle;
184 
185  _alt_poserr = rhs._alt_poserr;
186 
187  _crt_poserr = rhs._crt_poserr;
188 
189  _rad_poserr = rhs._rad_poserr;
190 
191  _alt_velerr = rhs._alt_velerr;
192 
193  _crt_velerr = rhs._crt_velerr;
194 
195  _rad_velerr = rhs._rad_velerr;
196 
197  for (int i = 0; i < 64; i++)
198  {
199  _pos_vect[i] = rhs._pos_vect[i];
200  }
201 
202 }
203 
205 {
207 
208  for (int i = 0; i < 6; i++)
209  {
210  _orbit_ele[i] = rhs._orbit_ele[i];
211  }
212 
213  _ndata = rhs._ndata;
214 
215  _year = rhs._year;
216 
217  _month = rhs._month;
218 
219  _day = rhs._day;
220 
221  _gmt_day = rhs._gmt_day;
222 
223  _gmt_sec = rhs._gmt_sec;
224 
225  _data_int = rhs._data_int;
226 
227  _ref_coord = rhs._ref_coord;
228 
229  _hr_angle = rhs._hr_angle;
230 
231  _alt_poserr = rhs._alt_poserr;
232 
233  _crt_poserr = rhs._crt_poserr;
234 
235  _rad_poserr = rhs._rad_poserr;
236 
237  _alt_velerr = rhs._alt_velerr;
238 
239  _crt_velerr = rhs._crt_velerr;
240 
241  _rad_velerr = rhs._rad_velerr;
242 
243  for (int i = 0; i < 64; i++)
244  {
245  _pos_vect[i] = rhs._pos_vect[i];
246  }
247 
248  return *this;
249 }
250 }
This class is able to read a Platform position data record.
ErsSarPositionVectorRecord _pos_vect[64]
Data point position/velocity.
double _crt_poserr
Cross track position error.
double _alt_poserr
Along track position error.
std::string _ref_coord
Reference coordinate system.
ErsSarPlatformPositionData & operator=(const ErsSarPlatformPositionData &rhs)
Copy operator.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
This class is the base class of all the record classes.
Definition: ErsSarRecord.h:27
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
std::string _orbit_ele_desg
Orbital elements designator.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
double _crt_velerr
Cross track velocity error.
double _alt_velerr
Along track velocity error.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23