uavfpy.odcl.location
- Should include:
trig calculations
lidar or any form of depth estimation needec
any additional calculations to estimate relative distance
- Requires:
pixel -> relative distance REQUIRES -> camera to be calibrated in vsutils.py
rotating x,y translations to absolute REQUIRES -> heading from UAV
getting depth REQUIRES -> altitude from UAV
doing any rotation w/ altitude REQUIRES -> rotation angles of gimbal
Module Contents
Classes
Attributes
- uavfpy.odcl.location.EARTH_RADIUS = 6378137
- class uavfpy.odcl.location.Geolocation
- quaternionToRotation(self, quat=None)
- get_uavPerspective(self, x, y, altitude, quat=None)
- Inputs:
x, y, z = from UAV in meters. altitude = from UAV in meters. yaw, pitch, roll = from UAV quat = (x,y,z,w)
Output:
- get_relDist(self, pixel_coord, img_shape, focal, depth)
- meters_to_gps(self, dx, dy)
- Input:
dx: distance in x (in meters) dy: distance in y (in meters)
- Output:
latitude: degrees longitude: degrees
converts distances from meters to gps coordinates.
- compute(self, altitude, quat, gps_coord, pixel_coord)
- Inputs:
altitude and yaw: from Mavros data gps_coord: (lat, lon) pixel_coord: (x,y) of the pixel – center of box relative to drawing on ground
- Output:
New GPS coordinate in format (lat, lon) type tuple