static SGGeod fromRadM(double lon, double lat, double elevation);
/// Factory from angular values in degrees and elevation in m
static SGGeod fromDegM(double lon, double lat, double elevation);
+ /// Factory from an other SGGeod and a different elevation in m
+ static SGGeod fromGeodM(const SGGeod& geod, double elevation);
+ /// Factory from an other SGGeod and a different elevation in ft
+ static SGGeod fromGeodFt(const SGGeod& geod, double elevation);
/// Factory to convert position from a cartesian position assumed to be
/// in wgs84 measured in meters
/// Note that this conversion is relatively expensive to compute
#endif
}
+inline
+SGGeod
+SGGeod::fromGeodM(const SGGeod& geod, double elevation)
+{
+ return SGGeod(geod._lon, geod._lat, elevation);
+}
+
+inline
+SGGeod
+SGGeod::fromGeodFt(const SGGeod& geod, double elevation)
+{
+ return SGGeod(geod._lon, geod._lat, elevation*SG_FEET_TO_METER);
+}
+
inline
SGGeod
SGGeod::fromCart(const SGVec3<double>& cart)