World Ocean Simulation System (WOSS) library
coordinates-definitions.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - federico@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This software has been developed by Federico Guerra and SIGNET lab,
24 * University of Padova, in collaboration with the NATO Centre for
25 * Maritime Research and Experimentation (http://www.cmre.nato.int ;
26 * E-mail: pao@cmre.nato.int), whose support is gratefully acknowledged.
27 */
28
29
40#ifndef WOSS_COORDINATES_DEFINITIONS_H
41#define WOSS_COORDINATES_DEFINITIONS_H
42
43
44#include <vector>
45#include <utility>
46#include <iostream>
47
48
49namespace woss {
50
51
52 class Coord;
53 class CoordZ;
54
58 typedef char UtmZoneChar;
59
64 typedef ::std::vector< CoordZ > CoordZVector;
65
69 typedef int Marsden;
70
76 typedef ::std::pair< int, int > MarsdenCoord;
77
81 typedef ::std::vector< Coord > CoordVector;
82
86 typedef ::std::vector< Marsden > MarsdenVector;
87
91 typedef ::std::vector< MarsdenCoord > MarsdenCoordVector;
92
93
97 #define COORD_NOT_SET_VALUE (-2000)
98
99
107 class Coord {
108
109 public:
110
111 static const double COORD_MIN_LATITUDE;
112
113 static const double COORD_MAX_LATITUDE;
114
115 static const double COORD_MIN_LONGITUDE;
116
117 static const double COORD_MAX_LONGITUDE;
118
119 static const double EARTH_RADIUS;
120
122 static const double EARTH_SEMIMAJOR_AXIS;
123
125 static const double EARTH_GRS80_POLAR_RADIUS;
126
128 static const double EARTH_WGS84_POLAR_RADIUS;
129
131 static const double EARTH_GRS80_ECCENTRICITY;
132
134 static const double EARTH_WGS84_ECCENTRICITY;
135
141 Coord( double lat = COORD_NOT_SET_VALUE, double lon = COORD_NOT_SET_VALUE );
142
147 Coord( const Coord& copy );
148
149 virtual ~Coord() { }
150
155 void setLatitude( double lat ) { latitude = lat; updateMarsdenCoord(); }
156
161 void setLongitude( double lon ) { longitude = lon; updateMarsdenCoord(); }
162
163
170
175 double getLatitude() const { return latitude; }
176
181 double getLongitude() const { return longitude; }
182
187 int getMarsdenSquare() const { return marsden_square; }
188
194
199 MarsdenCoord getMarsdenCoord() const { return( ::std::make_pair( marsden_square, marsden_one_degree) ); }
200
201
207 double getInitialBearing( const Coord& destination ) const ;
208
214 double getFinalBearing( const Coord& destination ) const ;
215
222 double getGreatCircleDistance( const Coord& destination, double depth = 0 ) const ;
223
224
234 static const Coord getCoordFromBearing( const Coord& start_coord, double bearing, double distance, double depth = 0.0 );
235
245 static const Coord getCoordAlongGreatCircle( const Coord& start_coord, const Coord& end_coord, double distance, double depth = 0.0 );
246
255 static const Coord getCoordFromUtmWgs84( double easting, double northing, double utm_zone_number, UtmZoneChar utm_zone_char );
256
257
263 Coord& operator=( const Coord& copy );
264
265
272 friend const Coord operator+( const Coord& left , const Coord& right ) ;
273
280 friend const Coord operator-( const Coord& left , const Coord& right ) ;
281
282
289 friend Coord& operator+=( Coord& left, const Coord& right );
290
297 friend Coord& operator-=( Coord& left, const Coord& right );
298
299
306 friend bool operator==( const Coord& left , const Coord& right ) ;
307
314 friend bool operator!=( const Coord& left , const Coord& right ) ;
315
316
323 friend bool operator>( const Coord& left , const Coord& right ) ;
324
331 friend bool operator<( const Coord& left , const Coord& right ) ;
332
339 friend bool operator>=( const Coord& left , const Coord& right ) ;
340
347 friend bool operator<=( const Coord& left , const Coord& right ) ;
348
349
356 friend ::std::ostream& operator<<( ::std::ostream& os, const Coord& instance );
357
358
359 protected:
360
364 double latitude;
365
369 double longitude;
370
371
376
381
382
386 void updateMarsdenCoord();
387
393 static bool isValidUtmZoneChar( UtmZoneChar utm_zone_char );
394
395 };
396
397
403 class CoordZ : public Coord {
404
405
406 public:
407
408 static const double COORDZ_MIN_DEPTH;
409
418 {
419 COORDZ_SPHERE = 0,
420 COORDZ_GRS80,
421 COORDZ_WGS84
422 };
423
430 public:
431
435 CartCoords();
436
444 CartCoords(double in_x, double in_y, double in_z, CoordZSpheroidType in_type);
445
450 double getX() const { return x; }
451
456 double getY() const { return y; }
457
462 double getZ() const { return z; }
463
468 CoordZSpheroidType getType() const { return type; }
469
476 friend ::std::ostream& operator<<( ::std::ostream& os, const CartCoords& instance );
477
478 protected:
479
480 double x;
481
482 double y;
483
484 double z;
485
487
488 };
489
496 CoordZ( double lat = COORD_NOT_SET_VALUE, double lon = COORD_NOT_SET_VALUE, double z = COORD_NOT_SET_VALUE );
497
503 explicit CoordZ( const Coord& coords, double depth = COORD_NOT_SET_VALUE );
504
509 CoordZ( const CoordZ& copy );
510
511 virtual ~CoordZ() { }
512
513
518 void setDepth( double d ) { depth = d; }
519
520
525 double getDepth() const { return depth; }
526
532 CartCoords getCartCoords(CoordZSpheroidType type = COORDZ_SPHERE) const;
533
539 double getCartX(CoordZSpheroidType type = COORDZ_SPHERE) const;
540
546 double getCartY(CoordZSpheroidType type = COORDZ_SPHERE) const;
547
553 double getCartZ(CoordZSpheroidType type = COORDZ_SPHERE) const;
554
559 double getSphericalRho() const;
560
565 double getSphericalTheta() const;
566
571 double getSphericalPhi() const;
572
573
579 double getCartDistance( const CoordZ& coords, CoordZSpheroidType type = COORDZ_SPHERE ) const;
580
585 double getCartRelZenith( const CoordZ& coords ) const;
586
591 double getCartRelAzimuth( const CoordZ& coords ) const;
592
593
602 static const CoordZ getCoordZAlongCartLine( const CoordZ& start, const CoordZ& end, double distance );
603
613 static const CoordZ getCoordZAlongGreatCircle( const CoordZ& start, const CoordZ& end, double distance );
614
623 static const CoordZ getCoordZFromCartesianCoords( double x, double y, double z, CoordZSpheroidType type = COORDZ_SPHERE);
624
630 static const CoordZ getCoordZFromCartesianCoords( const CartCoords& cart_coords );
631
639 static const CoordZ getCoordZFromSphericalCoords( double rho, double theta, double phi);
640
645 virtual bool isValid() const { return( Coord::isValid() && depth >= COORDZ_MIN_DEPTH ); }
646
647
653 CoordZ& operator=( const CoordZ& coordz );
654
655
662 friend const CoordZ operator+( const CoordZ& left , const CoordZ& right );
663
670 friend const CoordZ operator-( const CoordZ& left , const CoordZ& right );
671
672
679 friend CoordZ& operator+=( CoordZ& left, const CoordZ& right );
680
687 friend CoordZ& operator-=( CoordZ& left, const CoordZ& right );
688
689
696 friend bool operator==( const CoordZ& left , const CoordZ& right ) ;
697
704 friend bool operator!=( const CoordZ& left , const CoordZ& right ) ;
705
706
713 friend bool operator>( const CoordZ& left , const CoordZ& right ) ;
714
721 friend bool operator<( const CoordZ& left , const CoordZ& right ) ;
722
729 friend bool operator>=( const CoordZ& left , const CoordZ& right ) ;
730
737 friend bool operator<=( const CoordZ& left , const CoordZ& right ) ;
738
739
746 friend ::std::ostream& operator<<( ::std::ostream& os, const CoordZ& instance );
747
748
749 protected:
750
751
755 double depth;
756 };
757
758 class UtmWgs84 {
759
760 public:
761
768 UtmWgs84(int utmZone = COORD_NOT_SET_VALUE, double east = COORD_NOT_SET_VALUE, double north = COORD_NOT_SET_VALUE);
769
770 ~UtmWgs84() { }
771
772
773 int getZone() const;
774
775 double getEasting() const;
776
777 double getNorthing() const;
778
779 bool isValid() const;
780
788 static const UtmWgs84 getUtmWgs84FromCoord(const Coord& coords);
789
796 friend ::std::ostream& operator<<( ::std::ostream& os, const UtmWgs84& instance );
797
798 protected:
799
800 int zone;
801 double easting;
802 double northing;
803 };
804
805
806
814 template < class CompUser, class T = Coord >
816
817
818 public:
819
820
829 bool operator()( const T& x, const T& y ) const {
830// ::std::cout << "CoordComparator::operator() x " << x << "; y " << y << "; dist " << x.getCartDistance(y)
831// << "; space samp " << CompUser::getSpaceSampling() << ::std::endl;
832
833 if ( CompUser::getSpaceSampling() <= 0.0 ) return operator<(x,y);
834 if ( x.getGreatCircleDistance(y) <= CompUser::getSpaceSampling() ) return false;
835 return operator<(x,y);
836 }
837
838 };
839
840
848 template < class CompUser >
849 class CoordComparator< CompUser, CoordZ > {
850
851 public:
852
853
862 bool operator()( const CoordZ& x, const CoordZ& y ) const {
863// ::std::cout << "CoordComparator::operator() x " << x << "; y " << y << "; dist " << x.getCartDistance(y)
864// << "; space samp " << CompUser::getSpaceSampling() << ::std::endl;
865
866 if ( CompUser::getSpaceSampling() <= 0.0 ) return operator<(x,y);
867 if ( x.getCartDistance(y) <= CompUser::getSpaceSampling() ) return false;
868 return operator<(x,y);
869 }
870
871 };
872
873 //non-inline operator declarations
875 Coord& operator+=( Coord& left, const Coord& right );
876
877 Coord& operator-=( Coord& left, const Coord& right );
878
879 CoordZ& operator+=( CoordZ& left, const CoordZ& right );
880
881 CoordZ& operator-=( CoordZ& left, const CoordZ& right );
882
883
885 // inline functions
886 inline const Coord operator+( const Coord& left , const Coord& right ) {
887 if( !( left.isValid() && right.isValid() ) ) return Coord();
888 return( Coord( (left.latitude + right.latitude), (left.longitude + right.longitude) ) );
889 }
890
891
892 inline const Coord operator-( const Coord& left , const Coord& right ) {
893 if( !( left.isValid() && right.isValid() ) ) return Coord();
894 return( Coord( (left.latitude - right.latitude), (left.longitude - right.longitude) ) );
895 }
896
897
898 inline bool operator==( const Coord& left , const Coord& right ) {
899 if ( &left == &right ) return true;
900 return( left.latitude == right.latitude && left.longitude == right.longitude );
901 }
902
903
904 inline bool operator!=( const Coord& left , const Coord& right ) {
905 if ( &left == &right ) return false;
906 return( left.latitude != right.latitude || left.longitude != right.longitude );
907 }
908
909
910 inline bool operator>( const Coord& left , const Coord& right ) {
911 if ( &left == &right ) return false;
912 return( ( left.latitude > right.latitude ) || ( ( left.latitude == right.latitude ) && ( left.longitude > right.longitude ) ) );
913 }
914
915
916 inline bool operator<( const Coord& left , const Coord& right ) {
917 if ( &left == &right ) return false;
918 return( ( left.latitude < right.latitude ) || ( ( left.latitude == right.latitude ) && ( left.longitude < right.longitude ) ) );
919 }
920
921
922 inline bool operator>=( const Coord& left , const Coord& right ) {
923 if ( left == right ) return true;
924 return( left > right );
925 }
926
927
928 inline bool operator<=( const Coord& left , const Coord& right ) {
929 if ( left == right ) return true;
930 return( left < right );
931 }
932
933
934 inline ::std::ostream& operator<<(::std::ostream& os, const Coord& x) {
935 os << "Latitude = " << x.latitude << "; Longitude = " << x.longitude
936 << "; Marsden square = " << x.marsden_square
937 << "; Marsden One Degree square = " << x.marsden_one_degree;
938 return os;
939 }
940
941
942 inline ::std::ostream& operator<<( ::std::ostream& os, const CoordZ::CartCoords& instance ) {
943 os << "X = " << instance.x << "; Y = " << instance.y << "; Z = " << instance.z << "; type = " << instance.type;
944 return os;
945 }
946
947
948 inline bool operator==( const CoordZ& left, const CoordZ& right ) {
949 if ( &left == &right ) return true;
950 return( left.latitude == right.latitude && left.longitude == right.longitude && left.depth == right.depth );
951 }
952
953
954 inline bool operator!=( const CoordZ& left, const CoordZ& right ) {
955 if ( &left == &right ) return false;
956 return( left.latitude != right.latitude || left.longitude != right.longitude || left.depth != right.depth );
957 }
958
959
960 inline bool operator>( const CoordZ& left, const CoordZ& right ) {
961 if ( &left == &right ) return false;
962
963 return( ( left.latitude > right.latitude ) || ( ( left.latitude == right.latitude ) && ( left.longitude > right.longitude ) )
964 || ( ( left.latitude == right.latitude ) && ( left.longitude == right.longitude ) && ( left.depth > right.depth ) ) );
965 }
966
967
968 inline bool operator<( const CoordZ& left, const CoordZ& right ) {
969 if ( &left == &right ) return false;
970 return ( ( left.latitude < right.latitude ) || ( ( left.latitude == right.latitude ) && ( left.longitude < right.longitude ) )
971 || ( ( left.latitude == right.latitude ) && ( left.longitude == right.longitude ) && ( left.depth < right.depth ) ) );
972 }
973
974
975 inline bool operator>=( const CoordZ& left, const CoordZ& right ) {
976 if ( left == right ) return true;
977 return( left > right );
978 }
979
980
981 inline bool operator<=( const CoordZ& left, const CoordZ& right ) {
982 if ( left == right ) return true;
983 return( left < right );
984 }
985
986
987 inline ::std::ostream& operator<<( ::std::ostream& os, const CoordZ& instance ) {
988 os << "Latitude = " << instance.latitude << "; Longitude = " << instance.longitude << "; Depth = " << instance.depth
989 << "; Marsden square = " << instance.marsden_square
990 << "; Marsden One Degree square = " << instance.marsden_one_degree;
991 return os;
992 }
993
994
995 inline const CoordZ operator+( const CoordZ& left , const CoordZ& right ) {
996 if( !( left.isValid() && right.isValid() ) ) return CoordZ();
997 return( CoordZ( left.latitude + right.latitude, left.longitude + right.longitude, left.depth + right.depth ) );
998 }
999
1000
1001 inline const CoordZ operator-( const CoordZ& left , const CoordZ& right ) {
1002 if( !( left.isValid() && right.isValid() ) ) return CoordZ();
1003 return( CoordZ( left.latitude - right.latitude, left.longitude - right.longitude, left.depth - right.depth ) );
1004 }
1005
1006 inline int UtmWgs84::getZone() const {
1007 return zone;
1008 }
1009
1010 inline double UtmWgs84::getEasting() const {
1011 return easting;
1012 }
1013
1014 inline double UtmWgs84::getNorthing() const {
1015 return northing;
1016 }
1017
1018 inline bool UtmWgs84::isValid() const {
1019 return ((zone != COORD_NOT_SET_VALUE) && (easting != COORD_NOT_SET_VALUE) && (northing != COORD_NOT_SET_VALUE));
1020 }
1021
1022 inline ::std::ostream& operator<<( ::std::ostream& os, const UtmWgs84& instance ) {
1023 os << "Zone = " << instance.zone << "; Easting = " << instance.easting << "; Northing = " << instance.northing;
1024 return os;
1025 }
1026}
1027
1028#endif /* WOSS_COORDINATES_DEFINITIONS_H */
1029
bool operator!=(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:846
std::ostream & operator<<(std::ostream &os, const Altimetry &instance)
Definition altimetry-definitions.h:826
bool operator==(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:840
const Altimetry operator+(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:257
const Altimetry operator-(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:264
bool operator()(const CoordZ &x, const CoordZ &y) const
Definition coordinates-definitions.h:862
Function object for partial ordering of coordinates.
Definition coordinates-definitions.h:815
bool operator()(const T &x, const T &y) const
Definition coordinates-definitions.h:829
Class that represents cartesian coordinates.
Definition coordinates-definitions.h:429
double getY() const
Definition coordinates-definitions.h:456
CartCoords()
Definition coordinates-definitions.cpp:364
double getZ() const
Definition coordinates-definitions.h:462
friend::std::ostream & operator<<(::std::ostream &os, const CartCoords &instance)
double z
Y-asis value in meters.
Definition coordinates-definitions.h:484
CoordZSpheroidType type
Z-asis value in meters.
Definition coordinates-definitions.h:486
CoordZSpheroidType getType() const
Definition coordinates-definitions.h:468
double getX() const
Definition coordinates-definitions.h:450
double y
X-asis value in meters.
Definition coordinates-definitions.h:482
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
friend::std::ostream & operator<<(::std::ostream &os, const CoordZ &instance)
double getCartRelZenith(const CoordZ &coords) const
Definition coordinates-definitions.cpp:464
double getSphericalRho() const
Definition coordinates-definitions.cpp:427
static const CoordZ getCoordZAlongCartLine(const CoordZ &start, const CoordZ &end, double distance)
Definition coordinates-definitions.cpp:493
friend bool operator==(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:948
friend bool operator<(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:968
friend const CoordZ operator-(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:1001
double getSphericalTheta() const
Definition coordinates-definitions.cpp:432
friend CoordZ & operator-=(CoordZ &left, const CoordZ &right)
double getCartY(CoordZSpheroidType type=COORDZ_SPHERE) const
Definition coordinates-definitions.cpp:417
static const double COORDZ_MIN_DEPTH
Minimum valid depth.
Definition coordinates-definitions.h:408
friend bool operator>(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:960
double getCartX(CoordZSpheroidType type=COORDZ_SPHERE) const
Definition coordinates-definitions.cpp:412
double getCartDistance(const CoordZ &coords, CoordZSpheroidType type=COORDZ_SPHERE) const
Definition coordinates-definitions.cpp:442
CartCoords getCartCoords(CoordZSpheroidType type=COORDZ_SPHERE) const
Definition coordinates-definitions.cpp:382
friend bool operator!=(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:954
double getSphericalPhi() const
Definition coordinates-definitions.cpp:437
static const CoordZ getCoordZFromCartesianCoords(double x, double y, double z, CoordZSpheroidType type=COORDZ_SPHERE)
Definition coordinates-definitions.cpp:580
double getCartRelAzimuth(const CoordZ &coords) const
Definition coordinates-definitions.cpp:454
CoordZSpheroidType
Spheroid model to use.
Definition coordinates-definitions.h:418
friend bool operator>=(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:975
CoordZ & operator=(const CoordZ &coordz)
Definition coordinates-definitions.cpp:538
friend const CoordZ operator+(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:995
double getCartZ(CoordZSpheroidType type=COORDZ_SPHERE) const
Definition coordinates-definitions.cpp:422
friend CoordZ & operator+=(CoordZ &left, const CoordZ &right)
void setDepth(double d)
Definition coordinates-definitions.h:518
static const CoordZ getCoordZAlongGreatCircle(const CoordZ &start, const CoordZ &end, double distance)
Definition coordinates-definitions.cpp:474
virtual bool isValid() const
Definition coordinates-definitions.h:645
friend bool operator<=(const CoordZ &left, const CoordZ &right)
Definition coordinates-definitions.h:981
double depth
Definition coordinates-definitions.h:755
static const CoordZ getCoordZFromSphericalCoords(double rho, double theta, double phi)
Definition coordinates-definitions.cpp:663
double getDepth() const
Definition coordinates-definitions.h:525
Coordinates (lat, long) class definitions and functions library.
Definition coordinates-definitions.h:107
void setLongitude(double lon)
Definition coordinates-definitions.h:161
int getMarsdenOneDegreeSquare() const
Definition coordinates-definitions.h:193
void setLatitude(double lat)
Definition coordinates-definitions.h:155
static const Coord getCoordFromBearing(const Coord &start_coord, double bearing, double distance, double depth=0.0)
Definition coordinates-definitions.cpp:189
Coord & operator=(const Coord &copy)
Definition coordinates-definitions.cpp:306
friend const Coord operator+(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:886
static const double COORD_MIN_LATITUDE
Minimum valid Latitude.
Definition coordinates-definitions.h:111
static const double COORD_MAX_LONGITUDE
Maximum valid Longitude.
Definition coordinates-definitions.h:117
static const Coord getCoordAlongGreatCircle(const Coord &start_coord, const Coord &end_coord, double distance, double depth=0.0)
Definition coordinates-definitions.cpp:301
double getLatitude() const
Definition coordinates-definitions.h:175
friend const Coord operator-(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:892
double getInitialBearing(const Coord &destination) const
Definition coordinates-definitions.cpp:143
friend Coord & operator+=(Coord &left, const Coord &right)
friend bool operator!=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:904
static bool isValidUtmZoneChar(UtmZoneChar utm_zone_char)
Definition coordinates-definitions.cpp:210
double getGreatCircleDistance(const Coord &destination, double depth=0) const
Definition coordinates-definitions.cpp:171
friend bool operator>=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:922
int getMarsdenSquare() const
Definition coordinates-definitions.h:187
double getLongitude() const
Definition coordinates-definitions.h:181
double latitude
Definition coordinates-definitions.h:364
MarsdenCoord getMarsdenCoord() const
Definition coordinates-definitions.h:199
static const double EARTH_WGS84_POLAR_RADIUS
Earth's polar radius in meters as defined by WGS84.
Definition coordinates-definitions.h:128
static const Coord getCoordFromUtmWgs84(double easting, double northing, double utm_zone_number, UtmZoneChar utm_zone_char)
Definition coordinates-definitions.cpp:222
friend::std::ostream & operator<<(::std::ostream &os, const Coord &instance)
static const double EARTH_GRS80_ECCENTRICITY
Earth's first eccentricity as defined by GRS80.
Definition coordinates-definitions.h:131
static const double EARTH_SEMIMAJOR_AXIS
Earth's semi-major axis in meters as defined by both GRS80 and WGS84.
Definition coordinates-definitions.h:122
virtual bool isValid() const
Definition coordinates-definitions.h:168
friend bool operator<(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:916
double longitude
Definition coordinates-definitions.h:369
friend Coord & operator-=(Coord &left, const Coord &right)
double getFinalBearing(const Coord &destination) const
Definition coordinates-definitions.cpp:161
friend bool operator<=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:928
static const double COORD_MIN_LONGITUDE
Minimum valid Longitude.
Definition coordinates-definitions.h:115
int marsden_one_degree
Definition coordinates-definitions.h:380
friend bool operator==(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:898
int marsden_square
Definition coordinates-definitions.h:375
void updateMarsdenCoord()
Definition coordinates-definitions.cpp:89
static const double EARTH_WGS84_ECCENTRICITY
Earth's first eccentricity as defined by WGS84.
Definition coordinates-definitions.h:134
static const double EARTH_RADIUS
Mean earth radius in meters.
Definition coordinates-definitions.h:119
static const double EARTH_GRS80_POLAR_RADIUS
Earth's semi-major axis in meters as defined by GRS80.
Definition coordinates-definitions.h:125
friend bool operator>(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:910
static const double COORD_MAX_LATITUDE
Maximum valid Latitude.
Definition coordinates-definitions.h:113
Definition coordinates-definitions.h:758
friend::std::ostream & operator<<(::std::ostream &os, const UtmWgs84 &instance)
double northing
Definition coordinates-definitions.h:802
static const UtmWgs84 getUtmWgs84FromCoord(const Coord &coords)
Definition coordinates-definitions.cpp:679
double easting
Definition coordinates-definitions.h:801
::std::vector< Marsden > MarsdenVector
Definition coordinates-definitions.h:86
bool operator<=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:928
::std::pair< int, int > MarsdenCoord
Definition coordinates-definitions.h:76
::std::vector< CoordZ > CoordZVector
Definition coordinates-definitions.h:64
::std::vector< MarsdenCoord > MarsdenCoordVector
Definition coordinates-definitions.h:91
bool operator>=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:922
char UtmZoneChar
Definition coordinates-definitions.h:58
bool operator<(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:916
int Marsden
Definition coordinates-definitions.h:69
bool operator>(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:910
::std::vector< Coord > CoordVector
Definition coordinates-definitions.h:81