Changeset 2256
- Timestamp:
- 08/01/11 11:35:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2255 r2256 1880 1880 vector< vector<double> > ASDMReader::pointingDir( PointingRow *row ) 1881 1881 { 1882 vector< vector<Angle> > a Dir = row->getTarget() ;1882 vector< vector<Angle> > aTar = row->getTarget() ; 1883 1883 vector< vector<Angle> > aOff = row->getOffset() ; 1884 unsigned int n = aDir.size() ; 1884 vector< vector<Angle> > aDir = row->getPointingDirection() ; 1885 vector< vector<Angle> > aEnc = row->getEncoder() ; 1886 unsigned int n = aTar.size() ; 1885 1887 vector< vector<double> > dir( n ) ; 1886 double factor = 1.0 / cos( a Dir[0][1].get() ) ;1888 double factor = 1.0 / cos( aTar[0][1].get() ) ; 1887 1889 for ( unsigned int i = 0 ; i < n ; i++ ) { 1888 1890 dir[i].resize( 2 ) ; 1889 1891 /** 1890 * This is approximate way to add offset 1892 * This is approximate way to add offset taking tracking error 1893 * into account 1891 1894 * 1892 1895 * az = dir[0][0] = target[0][0] + offset[0][0] / cos(el) 1896 * + encorder[0][0] - direction[0][0] 1893 1897 * el = dir[0][1] = target[0][1] + offset[0][1] 1898 * + encorder[0][1] - direction[0][1] 1894 1899 **/ 1895 dir[i][0] = aDir[i][0].get() + factor * aOff[i][0].get() ; 1896 dir[i][1] = aDir[i][1].get() + aOff[i][1].get() ; 1900 dir[i][0] = aTar[i][0].get() + factor * aOff[i][0].get() ; 1901 + aEnc[i][0].get() - aDir[i][0].get() ; 1902 dir[i][1] = aTar[i][1].get() + aOff[i][1].get() ; 1903 + aEnc[i][1].get() - aDir[i][1].get() ; 1897 1904 } 1898 1905 return dir ;
Note:
See TracChangeset
for help on using the changeset viewer.