DJI Mobile SDK Documentation

class CompassWidget

class CompassWidget extends FrameLayoutWidget implements SensorEventListener
Inherits From:FrameLayoutWidget implements SensorEventListener


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

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