Some of this probably repeats some previous posts. Bit these are targeted at the specific Geospatial Features list (thank you for the list!)
Geospatial Features
WGS84 and ECEF - “Math.geo converters between wgs84 and ECEF coordinate systems”
This is a fairly complex topic. Perhaps it is easier than I’ve outlined below. I would suggest for “conversion” at least allowing the definition of an ellipsoid (usually with semi-major axis and a flattening ratio, or equivalently the semimajor axis and semiminor axis). And optional specification as a sphere (with radius parameter). A sphere is an ellipsoid with flattening of 0.
Technical note: WGS84 does define an ECEF coordinate system. I think you may be referring to translation between WGS84 and an ECEF Cartesian Coordinate System (both are ECEF).
Edit
I looked up the actual values and the question below about “which wgs84?” is moot. Here is the definitive reference from the source:
geoid:
now using a separate Earth Gravitational Model (EGM), with improved resolution and accuracy. Likewise, the World Magnetic Model (WMM) is updated separately. The current version of WGS 84 uses EGM2008 and WMM2020.
For mapping, charting and navigational users, these improvements are generally negligible. They are most relevant for the geodetic user and other high accuracy applications.
From NIMA TR8350.2; THIRD EDITION; AMENDMENT 1; 3 JANUARY 2000
Table 3.1 WGS 84 Four Defining Parameters
Semi-major Axis (a) = 6378137.0 meters
Reciprocal of Flattening (1/f) = 298.257223563
Angular Velocity of the Earth (ω) = 7292115.0 x 10-11 rad/s (7292115.0e-11)
Earth’s Gravitational Constant (Mass of Earth’s Atmosphere Included) (GM) = 3986004.418 x 10^8 m^3/s^2 (3986004.418e8)
Summary: The WGS 84 ellipsoid is defined with
semi-major axis (“a”) = 6378137.0 meters, and
reciprocal of flattening 1/f = rf = 298.257223563
end Edit
The first question is “which wgs84?” wgs84 in this context usually refers to a reference ellipsoid, and the wgs84 ellipsoid changes periodically, though the differences in large-scale mapping are minor. Another complication is that some mapping systems assume a spherical earth (e.g. Web Mercator used in TMS, “slippy maps”).
It is probably not necessary to delve fully into definitions of geoid, mean sea level, height above ellipsoid, altitude, barometric altitude, orthometric height, geopotential height, etc, etc, but some elevation models, including wgs84 altitude (“height above wgs84 ellipsoid”), depend on some consideration of mapping vs height data derived from other sources or using other reference points (e.g. airplanes, satellites, clouds).
To make sure the mapping is compatible with other applications, especially when altitude data is comingled, it should be very clear what the mapping application is using as “altitude.”
Touch input (multi-finger pan / zoom)
In-work GeospatialTouchInput: (should it be GeospatialMultiTouchInput?)
getClassName(){//: string {
return "GeospatialTouchInput";
}
/**
* Get the friendly name associated with the input class.
* @returns the input friendly name
*/
//public getSimpleName(): string {
getSimpleName() {
return "touch";
}
API changes to support setting yaw/pitch/radius/center directly
What do you think API should look like?
// state is kept in camera.upVector and camera._lookAtVector
// when either is changed, set camera._isViewMatrixDirty to true, then
// recalculate viewMatrix on next getViewMatrix call.
// To calculate normal, use:
// BABYLON.Vector3.CrossToRef(this.camera.upVector,this.camera._lookAtVector,normal)
// can camera.getNormal() be treated as viewMatrix, recalculate when _isViewMatrixDirty?
// pitch: normal; yaw: camera.upVector; roll: camera._lookAtVector
// the following Quaternion methods are handy with cameraRotateByQuaternion(), below:
FromEulerAnglesToRef
FromEulerVectorToRef
RotationAlphaBetaGammaToRef
RotationAxisToRef
RotationQuaternionFromAxisToRef
RotationYawPitchRollToRef
// maybe camera rotation methods can be modeled on Quaternion's methods?
// if needed at all? maybe just let user use cameraRotateByQuaternion() below?
cameraRotationEulerAngles // Rotation instead of "From"
cameraRotationEulerVector // Rotation instead of "From"
cameraRotationAlphaBetaGamma
cameraRotationAxis // (same as cameraRotateOnAxis() below)
cameraRotationQuaternionToAxes // (I prefer "ToAxes" here, but Quaternion uses FromAxis)
cameraRotationYawPitchRoll
cameraYaw(radians) { }
cameraPitch(radians) { }
cameraRoll(radians) { }
cameraRotateOnAxis(axis,radians) {
BABYLON.Quaternion.RotationAxisToRef(axis,radians,this.tempQuaternion)
this.cameraRotateByQuaternion(this.tempQuaternion)
}
cameraRotateByQuaternion(q) {
this.camera.upVector.applyRotationQuaternionInPlace(q)
this.camera._lookAtVector.applyRotationQuaternionInPlace(q)
this.camera._isViewMatrixDirty = true;
}