fgms 0.11.8
FlightGear MultiPlayer Server
fg_geometry.hxx File Reference

Go to the source code of this file.


class  Point3D


#define SG_180   180.0
#define SG_FEET_TO_METER   0.3048
#define SG_PI   3.1415926535


typedef double t_Point3D


enum  { X, Y, Z }
enum  { Lat, Lon, Alt }


double calc_gc_dist (const Point3D &start, const Point3D &dest)
void CartToLatLon (const Point3D &CartPoint, Point3D &LatLonAlt)
void CopyPos (const Point3D &src, Point3D &dst)
float Distance (const Point3D &P1, const Point3D &P2)
 Calculate distance of clients. More...
bool IsWithinRMiles (double lat1, double lon1, double lat2, double lon2, double R)
void Mat4ToCoord (const sgMat4 &src, Point3D &dst)
void sgCartToGeod (const Point3D &CartPoint, Point3D &GeodPoint)
 Convert a cartexian XYZ coordinate to a geodetic lat/lon/alt. This function is a copy of what's in SimGear, simgear/math/SGGeodesy.cxx. More...
void sgCartToPolar3d (const Point3D &cp, Point3D &Polar)
void sgGeodToCart (double lat, double lon, double alt, double *xyz)
 Opposite of sgCartToGeod. More...

Macro Definition Documentation

#define SG_180   180.0

Definition at line 29 of file fg_geometry.hxx.


Definition at line 32 of file fg_geometry.hxx.

#define SG_FEET_TO_METER   0.3048

Definition at line 33 of file fg_geometry.hxx.

#define SG_PI   3.1415926535

Definition at line 30 of file fg_geometry.hxx.


Definition at line 31 of file fg_geometry.hxx.

Referenced by sgCartToGeod().

Typedef Documentation

typedef double t_Point3D

Definition at line 35 of file fg_geometry.hxx.

Enumeration Type Documentation

anonymous enum

Definition at line 37 of file fg_geometry.hxx.

anonymous enum

Definition at line 38 of file fg_geometry.hxx.

Function Documentation

double calc_gc_dist ( const Point3D start,
const Point3D dest 
void CartToLatLon ( const Point3D CartPoint,
Point3D LatLonAlt 
void CopyPos ( const Point3D src,
Point3D dst 
float Distance ( const Point3D P1,
const Point3D P2 

Calculate distance of clients.

Definition at line 365 of file fg_geometry.cxx.

Referenced by FG_SERVER::HandlePacket(), and FG_SERVER::IsInRange().

bool IsWithinRMiles ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
double  R 
void Mat4ToCoord ( const sgMat4 src,
Point3D dst 
void sgCartToGeod ( const Point3D CartPoint,
Point3D GeodPoint 

Convert a cartexian XYZ coordinate to a geodetic lat/lon/alt. This function is a copy of what's in SimGear, simgear/math/SGGeodesy.cxx.

Definition at line 425 of file fg_geometry.cxx.

Referenced by FG_CLI::cmd_user_show(), FG_SERVER::HandleTelnet(), and FG_SERVER::UpdateTracker().

void sgCartToPolar3d ( const Point3D cp,
Point3D Polar 
void sgGeodToCart ( double  lat,
double  lon,
double  alt,
double *  xyz 

Opposite of sgCartToGeod.

Definition at line 458 of file fg_geometry.cxx.