AR + GPS Location
3.0.0
|
Represents a geographical location. More...
Public Member Functions | |
Location (double latitude=0.0, double longitude=0.0, double altitude=0.0) | |
Location | Clone () |
Clones this instance. More... | |
override string | ToString () |
DVector3 | ToDVector3 () |
Vector3 | ToVector3 () |
Static Public Member Functions | |
static DVector3 | LocationToEcef (Location l) |
Given a Location returns the corresponding (x, y, z) ECEF coordinates. More... | |
static DVector2 | VectorFromToEcefEnu (Location l1, Location l2) |
Given a pair of locations, returns the local-plane ENU coordinates, considering the first location, l1, to be the center of the local plane. More... | |
static Location | LocationFromEnu (Location center, double e, double n, double u) |
Given a center location, and the local-plane ENU coordinates of a second point, calculates the Location of the second point. More... | |
static Location | EcefToLocation (DVector3 ecef) |
Converts from (x, y, z) ECEF coordinates to a wgs84 Location. More... | |
static double | HorizontalDistance (Location l1, Location l2) |
Calculates the horizontal distance according to the current function set in the configuration. More... | |
static double | DistanceWithAltitude (Location l1, Location l2) |
Calculates the full distance between locations, taking altitude into account. More... | |
static DVector2 | HorizontalVectorFromTo (Location l1, Location l2) |
Calculates the horizontal vector pointing from l1 to l2, in meters. More... | |
static DVector3 | VectorFromTo (Location l1, Location l2, bool ignoreHeight=false) |
Calculates the vector from l1 to l2, in meters, taking altitude into account. More... | |
static Vector3 | GetGameObjectPositionForLocation (Transform arLocationRoot, Vector3 userPosition, Location userLocation, Location objectLocation, bool heightIsRelative) |
Gets the game object world-position for location. More... | |
static Vector3 | GetGameObjectPositionForLocation (Transform arLocationRoot, Transform user, Location userLocation, Location objectLocation, bool heightIsRelative) |
Gets the game object world-position for location. More... | |
static void | PlaceGameObjectAtLocation (Transform arLocationRoot, Transform transform, Transform user, Location userLocation, Location objectLocation, bool heightIsRelative) |
Places the game object at location. More... | |
static Location | GetLocationForWorldPosition (Transform arLocationRoot, Vector3 center, Location userLocation, Vector3 worldPosition) |
Calculates the wgs84 Location for a given world position vector. More... | |
static bool | Equal (Location a, Location b, double eps=0.0000001) |
static double | RadToDeg (double rad) |
static double | DegToRad (double deg) |
Public Attributes | |
double | Latitude |
double | Longitude |
double | Altitude |
AltitudeMode | AltitudeMode = AltitudeMode.GroundRelative |
string | Label = "" |
bool | IgnoreAltitude => AltitudeMode == AltitudeMode.Ignore |
DVector2 | HorizontalVector => new DVector2(Latitude, Longitude) |
Gets the horizontal vector. More... | |
Represents a geographical location.
Definition at line 18 of file Location.cs.
Location ARLocation.Location.Clone | ( | ) |
Calculates the full distance between locations, taking altitude into account.
l1 | L1. |
l2 | L2. |
Definition at line 229 of file Location.cs.
Converts from (x, y, z) ECEF coordinates to a wgs84 Location.
ecef |
Definition at line 168 of file Location.cs.
|
static |
Gets the game object world-position for location.
arLocationRoot | |
user | User. |
userLocation | User location. |
objectLocation | Object location. |
heightIsRelative | If set to true height is relative. |
Definition at line 296 of file Location.cs.
|
static |
Gets the game object world-position for location.
arLocationRoot | |
userPosition | |
userLocation | |
objectLocation | |
heightIsRelative |
Definition at line 276 of file Location.cs.
|
static |
Calculates the wgs84 Location for a given world position vector.
arLocationRoot | The ARLocationRoot game object transform. |
center | The position of the center (i.e., the device). |
userLocation | The wgs84 Location of the center/device. |
worldPosition | The world position. |
Definition at line 324 of file Location.cs.
Calculates the horizontal distance according to the current function set in the configuration.
l1 | L1. |
l2 | L2. |
Definition at line 214 of file Location.cs.
Calculates the horizontal vector pointing from l1 to l2, in meters.
l1 | L1. |
l2 | L2. |
Definition at line 243 of file Location.cs.
|
static |
Given a center location, and the local-plane ENU coordinates of a second point, calculates the Location of the second point.
center | |
e | |
n | |
u |
Definition at line 140 of file Location.cs.
Given a Location returns the corresponding (x, y, z) ECEF coordinates.
l |
Definition at line 91 of file Location.cs.
|
static |
Places the game object at location.
arLocationRoot | |
transform | The GameObject's transform. |
user | The user's point of view Transform, e.g., camera. |
userLocation | User Location. |
objectLocation | Object Location. |
heightIsRelative |
Definition at line 311 of file Location.cs.
|
static |
Calculates the vector from l1 to l2, in meters, taking altitude into account.
l1 | L1. |
l2 | L2. |
ignoreHeight | If true, y = 0 in the output vector. |
Definition at line 259 of file Location.cs.
Given a pair of locations, returns the local-plane ENU coordinates, considering the first location, l1, to be the center of the local plane.
l1 | |
l2 |
Definition at line 113 of file Location.cs.