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