source: Sophya/trunk/SophyaLib/Samba/longlat.h@ 726

Last change on this file since 726 was 262, checked in by ansari, 26 years ago

Ajout de fichiers de calcul de geometrie Vector3d, UnitVector, Circle, de Benoit Revenu Reza 23/04/99

File size: 837 bytes
Line 
1#ifndef LONGLAT_H_SEEN
2#define LONGLAT_H_SEEN
3
4#include <math.h>
5#include <iostream.h>
6#include <stdio.h>
7#include <string.h>
8#include "utilgeom.h"
9
10/*
11 passage des coordonnees longitude, latitude en theta,phi
12 longitude=phi
13 latitude=Pi/2-theta
14*/
15
16class LongLat
17{
18
19 public:
20
21 LongLat();
22 LongLat(double longitude, double latitude);
23 LongLat(double x, double y, double z);
24 LongLat(const LongLat&);
25
26 void Set(double longitude, double latitude);
27 double Longitude() const {return _lon;}
28 double Phi() const {return _lon;}
29 double Latitude() const {return _lat;}
30 double Theta() const {return pi_over_2-_lat;}
31
32 void Print(ostream& os) const;
33
34 private:
35
36 double _lon; // lambda
37 double _lat; // beta
38
39};
40
41inline ostream& operator<<(ostream& s, const LongLat& ll)
42{
43 ll.Print(s);
44 return s;
45}
46
47#endif
Note: See TracBrowser for help on using the repository browser.