Changeset 1452 for trunk/external/atnf/pks
- Timestamp:
- 11/19/08 20:41:16 (16 years ago)
- Location:
- trunk/external/atnf/pks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external/atnf/pks/makefile
r1325 r1452 1 # $Id: makefile,v 19.0 2003 /07/16 03:33:47 aips2adm Exp $1 # $Id: makefile,v 19.0 2003-07-16 03:33:47 aips2adm Exp $ 2 2 3 3 # Use the generic AIPS++ class implementation makefile. -
trunk/external/atnf/pks/pks_maths.cc
r1427 r1452 2 2 //# pks_maths.cc: Mathematical functions for Parkes single-dish data reduction 3 3 //#--------------------------------------------------------------------------- 4 //# Copyright (C) 1994-200 64 //# Copyright (C) 1994-2008 5 5 //# Associated Universities, Inc. Washington DC, USA. 6 6 //# … … 27 27 //# 28 28 //# Original: Mark Calabretta 29 //# $Id: pks_maths.cc,v 1. 5 2006-05-19 00:12:35 mcalabreExp $29 //# $Id: pks_maths.cc,v 1.6 2008-10-17 02:36:16 cal103 Exp $ 30 30 //---------------------------------------------------------------------------- 31 31 … … 295 295 //----------------------------------------------------------------------- azel 296 296 297 // Convert (ra,dec) to (az,el), from 298 // http://aa.usno.navy.mil/faq/docs/Alt_Az.html. Position as a Cartesian 299 // triplet in m, UT1 in MJD form, and all angles in radian. 297 // Convert (ra,dec) to (az,el). Position as a Cartesian triplet in m, UT1 in 298 // MJD form, and all angles in radian. 300 299 301 300 void azel(const Vector<Double> position, Double ut1, Double ra, Double dec, 302 301 Double &az, Double &el) 303 302 { 304 // Get g ocentric longitude and latitude (rad).303 // Get geocentric longitude and latitude (rad). 305 304 Double x = position(0); 306 305 Double y = position(1); … … 318 317 319 318 // Azimuth and elevation (rad). 320 az = atan2(cos(dec)*sin(ha), cos(dec)*sin(lat)*cos(ha) - sin(dec)*cos(lat)); 319 az = atan2(-cos(dec)*sin(ha), 320 sin(dec)*cos(lat) - cos(dec)*sin(lat)*cos(ha)); 321 el = asin(sin(dec)*sin(lat) + cos(dec)*cos(lat)*cos(ha)); 322 321 323 if (az < 0.0) az += C::_2pi; 322 el = asin(cos(dec)*cos(lat)*cos(ha) + sin(dec)*sin(lat));323 324 } 324 325
Note:
See TracChangeset
for help on using the changeset viewer.