Skip to main content

pamoja_mavlink_offboard_global_position

Function pamoja_mavlink_offboard_global_position 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_offboard_global_position( header: PamojaMavlinkHeader, time_boot_ms: u32, coordinate_frame: u8, target_system: u8, target_component: u8, lat_int: i32, lon_int: i32, alt: f32, out_frame: *mut *mut PamojaMavlinkFrame, ) -> PamojaStatus
Expand description

Builds a global-frame position setpoint frame.

§Arguments

  • header - the addressing fields to stamp on the frame.
  • time_boot_ms - the sender’s boot timestamp, in milliseconds.
  • coordinate_frame - the MAV_FRAME of the setpoint.
  • target_system - the target system id.
  • target_component - the target component id.
  • lat_int, lon_int - the latitude and longitude, in degrees times ten million.
  • alt - the altitude, in meters.
  • out_frame - set to the SET_POSITION_TARGET_GLOBAL_INT frame, which the caller releases with pamoja_mavlink_frame_free.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if out_frame is null.

§Safety

out_frame must point at writable storage for one pointer.