|
Last change
on this file since 2063 was 1371, checked in by ansari, 25 years ago |
|
MAJ documentation, Makefile, ... - Reza 5/1/2001
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [1371] | 1 | // Geometry handling class
|
|---|
| 2 | // B. Revenu, R. Ansari , G. Le Meur 2000
|
|---|
| 3 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
|---|
| 4 |
|
|---|
| [764] | 5 | #ifndef LONGLAT_H_SEEN
|
|---|
| 6 | #define LONGLAT_H_SEEN
|
|---|
| 7 |
|
|---|
| [1371] | 8 | #include "machdefs.h"
|
|---|
| [764] | 9 | #include <math.h>
|
|---|
| 10 | #include <iostream.h>
|
|---|
| 11 | #include <stdio.h>
|
|---|
| 12 | #include <string.h>
|
|---|
| 13 | #include "utilgeom.h"
|
|---|
| 14 |
|
|---|
| 15 | /*
|
|---|
| 16 | passage des coordonnees longitude, latitude en theta,phi
|
|---|
| 17 | longitude=phi
|
|---|
| 18 | latitude=Pi/2-theta
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| [1371] | 21 | namespace SOPHYA {
|
|---|
| 22 |
|
|---|
| [764] | 23 | class LongLat
|
|---|
| 24 | {
|
|---|
| 25 |
|
|---|
| 26 | public:
|
|---|
| 27 |
|
|---|
| 28 | LongLat();
|
|---|
| 29 | LongLat(double longitude, double latitude);
|
|---|
| 30 | LongLat(double x, double y, double z);
|
|---|
| 31 | LongLat(const LongLat&);
|
|---|
| 32 |
|
|---|
| 33 | void Set(double longitude, double latitude);
|
|---|
| 34 | double Longitude() const {return _lon;}
|
|---|
| 35 | double Phi() const {return _lon;}
|
|---|
| 36 | double Latitude() const {return _lat;}
|
|---|
| 37 | double Theta() const {return pi_over_2-_lat;}
|
|---|
| 38 |
|
|---|
| 39 | void Print(ostream& os) const;
|
|---|
| 40 |
|
|---|
| 41 | private:
|
|---|
| 42 |
|
|---|
| 43 | double _lon; // lambda
|
|---|
| 44 | double _lat; // beta
|
|---|
| 45 |
|
|---|
| 46 | };
|
|---|
| 47 |
|
|---|
| 48 | inline ostream& operator<<(ostream& s, const LongLat& ll)
|
|---|
| 49 | {
|
|---|
| 50 | ll.Print(s);
|
|---|
| 51 | return s;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| [1371] | 54 | } // namespace SOPHYA
|
|---|
| 55 |
|
|---|
| [764] | 56 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.