OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
AttitudeData.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 
12 
13 #include "AttitudeData.h"
14 
15 namespace ossimplugins
16 {
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  os<<"npoint:"<<data._npoint<<std::endl;
29  for (int i=0;i<20;i++)
30  {
31  os<<"att_vect["<<i<<"]:"<<data._att_vect[i]<<std::endl;
32  }
33  os<<"pitch_bias:"<<data._pitch_bias<<std::endl;
34  os<<"roll_bias:"<<data._roll_bias<<std::endl;
35  os<<"yaw_bias:"<<data._yaw_bias<<std::endl;
36  return os;
37 }
38 
40 {
41  char buf[6503];
42  buf[6502] = '\0';
43 
44  is.read(buf,4);
45  buf[4] = '\0';
46  data._npoint = atoi(buf);
47 
48  for (int i=0;i<20;i++)
49  {
50  is>>data._att_vect[i];
51  }
52  is.read(buf,14);
53  buf[14] = '\0';
54  data._pitch_bias = atof(buf);
55 
56  is.read(buf,14);
57  buf[14] = '\0';
58  data._roll_bias = atof(buf);
59 
60  is.read(buf,14);
61  buf[14] = '\0';
62  data._yaw_bias = atof(buf);
63 
64  is.read(buf,6502);
65 
66  return is;
67 }
68 
70  RadarSatRecord(rhs)
71 {
72  _npoint = rhs._npoint;
73  for (int i=0;i<20;i++)
74  {
75  _att_vect[i] = rhs._att_vect[i];
76  }
78  _roll_bias = rhs._roll_bias;
79  _yaw_bias = rhs._yaw_bias;
80 }
81 
83 {
84  _npoint = rhs._npoint;
85  for (int i=0;i<20;i++)
86  {
87  _att_vect[i] = rhs._att_vect[i];
88  }
90  _roll_bias = rhs._roll_bias;
91  _yaw_bias = rhs._yaw_bias;
92  return *this;
93 }
94 }
double _pitch_bias
Pitch bias (degrees)
Definition: AttitudeData.h:141
This class is the base class of all the record classes.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
double _roll_bias
Roll bias (degrees)
Definition: AttitudeData.h:145
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
double _yaw_bias
Yaw bias (degrees)
Definition: AttitudeData.h:149
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
int _npoint
Number of data points.
Definition: AttitudeData.h:126
AttitudeData & operator=(const AttitudeData &rhs)
Copy operator.
This class is able to read a Attitude data record.
Definition: AttitudeData.h:28
DataPointDataRecord _att_vect[20]
Data points
Definition: AttitudeData.h:137
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23