DJI Mobile SDK Documentation

class CompassWidget

class CompassWidget extends FrameLayoutWidget implements SensorEventListener
Package:dji.ux.widget.dashboard
Inherits From:FrameLayoutWidget implements SensorEventListener
Display:

uilib_image

Compound widget that aggregates attitude and location data into one widget. The widget shows:

  • Heading of the aircraft relative to the pilot
  • True north relative to pilot and aircraft
  • Roll and pitch of aircraft
  • Yaw and pitch of gimbal
  • Position of aircraft relative to pilot
  • Distance of aircraft from pilot
  • Home location
Usage:

Preferred Aspect Ratio: 1:1. Check DashboardWidget for an example of its usage.