|
Last change
on this file since 3055 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
|
| Line | |
|---|
| 1 | // Angles/geometrie 3D
|
|---|
| 2 | // B. Revenu 2000
|
|---|
| 3 | // R. Ansari 2006
|
|---|
| 4 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
|---|
| 5 |
|
|---|
| 6 | #ifndef LONGLAT_H_SEEN
|
|---|
| 7 | #define LONGLAT_H_SEEN
|
|---|
| 8 |
|
|---|
| 9 | #include "machdefs.h"
|
|---|
| 10 | #include <math.h>
|
|---|
| 11 | #include <iostream>
|
|---|
| 12 | #include <stdio.h>
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 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 |
|
|---|
| 24 | namespace SOPHYA {
|
|---|
| 25 |
|
|---|
| 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&);
|
|---|
| 35 |
|
|---|
| 36 | //! Set the longitude/latitude coordinates (in radians)
|
|---|
| 37 | void Set(double longitude, double latitude);
|
|---|
| 38 | //! Return the longitude value (in radians)
|
|---|
| 39 | double Longitude() const {return _lon;}
|
|---|
| 40 | //! Return the phi value (in radians)
|
|---|
| 41 | double Phi() const {return _lon;}
|
|---|
| 42 | //! Return the latitude value (in radians)
|
|---|
| 43 | double Latitude() const {return _lat;}
|
|---|
| 44 | //! Return the theta value (in radians)
|
|---|
| 45 | double Theta() const {return pi_over_2-_lat;}
|
|---|
| 46 |
|
|---|
| 47 | //! print the object (ascii representation) on stream os
|
|---|
| 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 |
|
|---|
| 63 | } // namespace SOPHYA
|
|---|
| 64 |
|
|---|
| 65 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.