Last change
on this file since 3858 was 2973, checked in by ansari, 19 years ago |
1/ Nettoyage+commentaires/doxygen ds Vector3d, UnitVector, LongLat,
SphereCoordSys ...
2/ Ajout de la classe angle pour faciliter les conversions rad<>deg<>arcmin
dans le fichier vector3d.h .cc
3/ nettoyage/uniformisation methodes print pour pixelmap, ajout de la
methode PixelMap<T>::Show()
4/ Ajout methodes SphericalMap<T>::HasSymThetaSlice() et
GetSymThetaSliceIndex(int_4 idx) et leurs implementations pour
SphereHEALPix et SphereThetaPhi en vue de l'optimisation du calcul
transforme Ylm
5/ Ajout methode ResolToSizeIndex ds SphereThetaPhi , SphereHEALPix et
SphereECP
Reza , 20 Juin 2006
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2973] | 1 | // Angles/geometrie 3D
|
---|
| 2 | // B. Revenu 2000
|
---|
| 3 | // R. Ansari 2006
|
---|
[1371] | 4 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
---|
| 5 |
|
---|
[764] | 6 | #ifndef LONGLAT_H_SEEN
|
---|
| 7 | #define LONGLAT_H_SEEN
|
---|
| 8 |
|
---|
[1371] | 9 | #include "machdefs.h"
|
---|
[764] | 10 | #include <math.h>
|
---|
[2322] | 11 | #include <iostream>
|
---|
[764] | 12 | #include <stdio.h>
|
---|
[2973] | 13 |
|
---|
| 14 |
|
---|
[764] | 15 | #include <string.h>
|
---|
| 16 | #include "utilgeom.h"
|
---|
| 17 |
|
---|
| 18 | /*
|
---|
| 19 | passage des coordonnees longitude, latitude en theta,phi
|
---|
| 20 | longitude=phi
|
---|
| 21 | latitude=Pi/2-theta
|
---|
| 22 | */
|
---|
| 23 |
|
---|
[1371] | 24 | namespace SOPHYA {
|
---|
| 25 |
|
---|
[764] | 26 | class LongLat
|
---|
| 27 | {
|
---|
| 28 |
|
---|
| 29 | public:
|
---|
| 30 |
|
---|
| 31 | LongLat();
|
---|
| 32 | LongLat(double longitude, double latitude);
|
---|
| 33 | LongLat(double x, double y, double z);
|
---|
| 34 | LongLat(const LongLat&);
|
---|
[2973] | 35 |
|
---|
| 36 | //! Set the longitude/latitude coordinates (in radians)
|
---|
[764] | 37 | void Set(double longitude, double latitude);
|
---|
[2973] | 38 | //! Return the longitude value (in radians)
|
---|
[764] | 39 | double Longitude() const {return _lon;}
|
---|
[2973] | 40 | //! Return the phi value (in radians)
|
---|
[764] | 41 | double Phi() const {return _lon;}
|
---|
[2973] | 42 | //! Return the latitude value (in radians)
|
---|
[764] | 43 | double Latitude() const {return _lat;}
|
---|
[2973] | 44 | //! Return the theta value (in radians)
|
---|
[764] | 45 | double Theta() const {return pi_over_2-_lat;}
|
---|
| 46 |
|
---|
[2973] | 47 | //! print the object (ascii representation) on stream os
|
---|
[764] | 48 | void Print(ostream& os) const;
|
---|
| 49 |
|
---|
| 50 | private:
|
---|
| 51 |
|
---|
| 52 | double _lon; // lambda
|
---|
| 53 | double _lat; // beta
|
---|
| 54 |
|
---|
| 55 | };
|
---|
| 56 |
|
---|
| 57 | inline ostream& operator<<(ostream& s, const LongLat& ll)
|
---|
| 58 | {
|
---|
| 59 | ll.Print(s);
|
---|
| 60 | return s;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
[1371] | 63 | } // namespace SOPHYA
|
---|
| 64 |
|
---|
[764] | 65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.