25#include "AstMath/Vector.hpp"
26#include "AstUtil/Math.hpp"
43 constexpr GeoCoordinate(
double lat,
double lon,
double alt = 0.0) noexcept
44 : latLonAlt_{lat, lon, alt} {}
48 : latLonAlt_{latLonAlt} {}
58 double latitude()
const {
return latLonAlt_.latitude(); }
60 double longitude()
const {
return latLonAlt_.longitude(); }
62 double altitude()
const {
return latLonAlt_.altitude(); }
64 double&
latitude() {
return latLonAlt_.latitude(); }
66 double&
longitude() {
return latLonAlt_.longitude(); }
68 double&
altitude() {
return latLonAlt_.altitude(); }
84 Vector3d getZenith()
const;
86 Vector3d getNadir()
const;
88 Vector3d getEast()
const;
90 Vector3d getWest()
const;
92 Vector3d getNorth()
const;
94 Vector3d getSouth()
const;
100inline Vector3d GeoCoordinate::getZenith()
const
102 double lat = latitude();
103 double lon = longitude();
104 double sLat, cLat, sLon, cLon;
105 sincos(lat, &sLat, &cLat);
106 sincos(lon, &sLon, &cLon);
107 return {cLon * cLat, sLon * cLat, sLat};
110inline Vector3d GeoCoordinate::getNadir()
const
115inline Vector3d GeoCoordinate::getEast()
const
118 sincos(longitude(), &sLon, &cLon);
119 return {-sLon, cLon, 0};
122inline Vector3d GeoCoordinate::getWest()
const
127inline Vector3d GeoCoordinate::getNorth()
const
129 double lat = latitude();
130 double lon = longitude();
131 double sLat, cLat, sLon, cLon;
132 sincos(lat, &sLat, &cLat);
133 sincos(lon, &sLon, &cLon);
134 return {-cLon * sLat, -sLon * sLat, cLat};
137inline Vector3d GeoCoordinate::getSouth()
const
184AST_CORE_CAPI
double aSurfaceDeticToCentricLat(
double deticLat,
double flatFact);
地理坐标
定义 GeoCoordinate.hpp:38
GeodeticPoint & asGeodeticPoint()
作为大地坐标使用
定义 GeoCoordinate.hpp:81
double & altitude()
设置高度
定义 GeoCoordinate.hpp:68
GeocentricPoint & asGeocentricPoint()
作为地心坐标使用
定义 GeoCoordinate.hpp:79
void setLatLonAlt(const LatLonAlt &latLonAlt) noexcept
设置纬度、经度、高度坐标
定义 GeoCoordinate.hpp:55
constexpr const LatLonAlt & latLonAlt() const noexcept
获取纬度、经度、高度坐标
定义 GeoCoordinate.hpp:53
double longitude() const
获取经度
定义 GeoCoordinate.hpp:60
constexpr GeoCoordinate(const LatLonAlt &latLonAlt) noexcept
从纬度、经度、高度坐标构造
定义 GeoCoordinate.hpp:47
double & longitude()
设置经度
定义 GeoCoordinate.hpp:66
void setLongitude(double lon)
设置经度
定义 GeoCoordinate.hpp:72
double latitude() const
获取纬度
定义 GeoCoordinate.hpp:58
double & latitude()
设置纬度
定义 GeoCoordinate.hpp:64
void setLatitude(double lat)
设置纬度
定义 GeoCoordinate.hpp:70
double altitude() const
获取高度
定义 GeoCoordinate.hpp:62
LatLonAlt latLonAlt_
纬度、经度、高度坐标
定义 GeoCoordinate.hpp:97
constexpr GeoCoordinate(double lat, double lon, double alt=0.0) noexcept
从纬度、经度、高度坐标构造
定义 GeoCoordinate.hpp:43
void setAltitude(double alt)
设置高度
定义 GeoCoordinate.hpp:74
地心坐标
定义 GeocentricPoint.hpp:33
大地坐标
定义 GeodeticPoint.hpp:33
纬度、经度、高度坐标
定义 LatLonAlt.hpp:30
A_ALWAYS_INLINE void sincos(double x, double *psin, double *pcos)
计算 sin(x) 和 cos(x) 值
定义 Math.hpp:47
void aSurfaceDeticToCentric(const GeodeticPoint &detic, double flatFact, GeocentricPoint ¢ric)
将天体表面的大地坐标转换为地心坐标
定义 GeoCoordinate.cpp:37
double aSurfaceCentricToDeticLat(double centric, double flatFact)
将天体表面的地心纬度转换为大地纬度
定义 GeoCoordinate.cpp:44
void aSurfaceCentricToDetic(const GeocentricPoint ¢ric, double flatFact, GeodeticPoint &detic)
将天体表面的地心坐标转换为大地坐标
定义 GeoCoordinate.cpp:30
double aSurfaceDeticToCentricLat(double detic, double flatFact)
将天体表面的大地纬度转换为地心纬度
定义 GeoCoordinate.cpp:51