Thanks to visit codestin.com
Credit goes to docs.px4.io

Skip to content

VehicleLocalPosition (UORB message)

Fused local position in NED. The coordinate system origin is the vehicle position at the time when the EKF2-module was started.

TOPICS: vehicle_local_position vehicle_local_position_groundtruth external_ins_local_position estimator_local_position

Fields

NameTypeUnit [Frame]Range/EnumDescription
timestampuint64time since system start (microseconds)
timestamp_sampleuint64the timestamp of the raw data (microseconds)
xy_validbooltrue if x and y are valid
z_validbooltrue if z is valid
v_xy_validbooltrue if vx and vy are valid
v_z_validbooltrue if vz is valid
xfloat32North position in NED earth-fixed frame, (metres)
yfloat32East position in NED earth-fixed frame, (metres)
zfloat32Down position (negative altitude) in NED earth-fixed frame, (metres)
delta_xyfloat32[2]Amount of lateral shift of position estimate in latest reset (in x and y) [m]
xy_reset_counteruint8Index of latest lateral position estimate reset
delta_zfloat32Amount of vertical shift of position estimate in latest reset [m]
z_reset_counteruint8Index of latest vertical position estimate reset
vxfloat32North velocity in NED earth-fixed frame, (metres/sec)
vyfloat32East velocity in NED earth-fixed frame, (metres/sec)
vzfloat32Down velocity in NED earth-fixed frame, (metres/sec)
z_derivfloat32Down position time derivative in NED earth-fixed frame, (metres/sec)
delta_vxyfloat32[2]Amount of lateral shift of velocity estimate in latest reset (in x and y) [m/s]
vxy_reset_counteruint8Index of latest vertical velocity estimate reset
delta_vzfloat32Amount of vertical shift of velocity estimate in latest reset [m/s]
vz_reset_counteruint8Index of latest vertical velocity estimate reset
axfloat32North velocity derivative in NED earth-fixed frame, (metres/sec^2)
ayfloat32East velocity derivative in NED earth-fixed frame, (metres/sec^2)
azfloat32Down velocity derivative in NED earth-fixed frame, (metres/sec^2)
headingfloat32Euler yaw angle transforming the tangent plane relative to NED earth-fixed frame, -PI..+PI, (radians)
heading_varfloat32
unaided_headingfloat32Same as heading but generated by integrating corrected gyro data only
delta_headingfloat32Heading delta caused by latest heading reset [rad]
heading_reset_counteruint8Index of latest heading reset
heading_good_for_controlbool
tilt_varfloat32
xy_globalbooltrue if position (x, y) has a valid global reference (ref_lat, ref_lon)
z_globalbooltrue if z has a valid global reference (ref_alt)
ref_timestampuint64Time when reference position was set since system start, (microseconds)
ref_latfloat64Reference point latitude, (degrees)
ref_lonfloat64Reference point longitude, (degrees)
ref_altfloat32Reference altitude AMSL, (metres)
dist_bottom_validbooltrue if distance to bottom surface is valid
dist_bottomfloat32Distance from from bottom surface to ground, (metres)
dist_bottom_varfloat32height above ground estimate variance (m^2)
delta_dist_bottomfloat32Amount of vertical shift of dist bottom estimate in latest reset [m]
dist_bottom_reset_counteruint8Index of latest dist bottom estimate reset
dist_bottom_sensor_bitfielduint8bitfield indicating what type of sensor is used to estimate dist_bottom
ephfloat32Standard deviation of horizontal position error, (metres)
epvfloat32Standard deviation of vertical position error, (metres)
evhfloat32Standard deviation of horizontal velocity error, (metres/sec)
evvfloat32Standard deviation of vertical velocity error, (metres/sec)
dead_reckoningboolTrue if this position is estimated through dead-reckoning
vxy_maxfloat32maximum horizontal speed (meters/sec)
vz_maxfloat32maximum vertical speed (meters/sec)
hagl_minfloat32minimum height above ground level (meters)
hagl_max_zfloat32maximum height above ground level for z-control (meters)
hagl_max_xyfloat32maximum height above ground level for xy-control (meters)

Constants

NameTypeValueDescription
MESSAGE_VERSIONuint321
DIST_BOTTOM_SENSOR_NONEuint80
DIST_BOTTOM_SENSOR_RANGEuint81(1 << 0) a range sensor is used to estimate dist_bottom field
DIST_BOTTOM_SENSOR_FLOWuint82(1 << 1) a flow sensor is used to estimate dist_bottom field (mostly fixed-wing use case)

Source Message

Source file (GitHub)

Click here to see original file
c
# Fused local position in NED.
# The coordinate system origin is the vehicle position at the time when the EKF2-module was started.

uint32 MESSAGE_VERSION = 1

uint64 timestamp			# time since system start (microseconds)
uint64 timestamp_sample                 # the timestamp of the raw data (microseconds)

bool xy_valid				# true if x and y are valid
bool z_valid				# true if z is valid
bool v_xy_valid				# true if vx and vy are valid
bool v_z_valid				# true if vz is valid

# Position in local NED frame
float32 x				# North position in NED earth-fixed frame, (metres)
float32 y				# East position in NED earth-fixed frame, (metres)
float32 z				# Down position (negative altitude) in NED earth-fixed frame, (metres)

# Position reset delta
float32[2] delta_xy			# Amount of lateral shift of position estimate in latest reset (in x and y) [m]
uint8 xy_reset_counter			# Index of latest lateral position estimate reset
float32 delta_z				# Amount of vertical shift of position estimate in latest reset [m]
uint8 z_reset_counter			# Index of latest vertical position estimate reset

# Velocity in NED frame
float32 vx 				# North velocity in NED earth-fixed frame, (metres/sec)
float32 vy				# East velocity in NED earth-fixed frame, (metres/sec)
float32 vz				# Down velocity in NED earth-fixed frame, (metres/sec)
float32 z_deriv				# Down position time derivative in NED earth-fixed frame, (metres/sec)

# Velocity reset delta
float32[2] delta_vxy			# Amount of lateral shift of velocity estimate in latest reset (in x and y) [m/s]
uint8 vxy_reset_counter			# Index of latest vertical velocity estimate reset
float32 delta_vz			# Amount of vertical shift of velocity estimate in latest reset [m/s]
uint8 vz_reset_counter			# Index of latest vertical velocity estimate reset

# Acceleration in NED frame
float32 ax        # North velocity derivative in NED earth-fixed frame, (metres/sec^2)
float32 ay        # East velocity derivative in NED earth-fixed frame, (metres/sec^2)
float32 az        # Down velocity derivative in NED earth-fixed frame, (metres/sec^2)

float32 heading				# Euler yaw angle transforming the tangent plane relative to NED earth-fixed frame, -PI..+PI,  (radians)
float32 heading_var
float32 unaided_heading                 # Same as heading but generated by integrating corrected gyro data only
float32 delta_heading			# Heading delta caused by latest heading reset [rad]
uint8 heading_reset_counter		# Index of latest heading reset
bool heading_good_for_control

float32 tilt_var

# Position of reference point (local NED frame origin) in global (GPS / WGS84) frame
bool xy_global				# true if position (x, y) has a valid global reference (ref_lat, ref_lon)
bool z_global				# true if z has a valid global reference (ref_alt)
uint64 ref_timestamp			# Time when reference position was set since system start, (microseconds)
float64 ref_lat				# Reference point latitude, (degrees)
float64 ref_lon				# Reference point longitude, (degrees)
float32 ref_alt				# Reference altitude AMSL, (metres)

# Distance to surface
bool dist_bottom_valid			# true if distance to bottom surface is valid
float32 dist_bottom			# Distance from from bottom surface to ground, (metres)
float32 dist_bottom_var                 # height above ground estimate variance (m^2)

float32 delta_dist_bottom               # Amount of vertical shift of dist bottom estimate in latest reset [m]
uint8 dist_bottom_reset_counter         # Index of latest dist bottom estimate reset

uint8 dist_bottom_sensor_bitfield	# bitfield indicating what type of sensor is used to estimate dist_bottom
uint8 DIST_BOTTOM_SENSOR_NONE = 0
uint8 DIST_BOTTOM_SENSOR_RANGE = 1	# (1 << 0) a range sensor is used to estimate dist_bottom field
uint8 DIST_BOTTOM_SENSOR_FLOW = 2	# (1 << 1) a flow sensor is used to estimate dist_bottom field (mostly fixed-wing use case)

float32 eph				# Standard deviation of horizontal position error, (metres)
float32 epv				# Standard deviation of vertical position error, (metres)
float32 evh				# Standard deviation of horizontal velocity error, (metres/sec)
float32 evv				# Standard deviation of vertical velocity error, (metres/sec)

bool dead_reckoning                     # True if this position is estimated through dead-reckoning

# estimator specified vehicle limits
# set to INFINITY when limiting not required
float32 vxy_max				# maximum horizontal speed (meters/sec)
float32 vz_max				# maximum vertical speed (meters/sec)
float32 hagl_min			# minimum height above ground level (meters)
float32 hagl_max_z			# maximum height above ground level for z-control (meters)
float32 hagl_max_xy			# maximum height above ground level for xy-control (meters)

# TOPICS vehicle_local_position vehicle_local_position_groundtruth external_ins_local_position
# TOPICS estimator_local_position