const classafParrotSdk2::DroneSessionConfig

sys::Obj
  afParrotSdk2::DroneSessionConfig

Drone config in the Session category. Session config relates to the current flight and encapsulates user and application data. That is, should the session be changed / reset, the user and application config changes also.

Create a new session by means of:

drone.config.session("My Session Name")

Future code may then access the same session by not passing a session name:

drone.config.session.hoveringRange = 1000
app

Source

DroneAppConfig app(Str? appicationName := null)

Gets or makes application config. If null is passed, this just returns the current config.

deleteAll

Source

Void deleteAll()

Deletes ALL session data from the drone. Use with caution.

deleteMe

Source

Void deleteMe()

Deletes this session data from the drone.

detectType

Source

@Deprecated
Int detectType

Active tag detection.

3 = CAD_TYPE_NONE : No detections
10 = CAD_TYPE_MULTIPLE_DETECTION_MODE : See following note
12 = CAD_TYPE_ORIENTED_COCARDE_BW : Black & White oriented roundel detected on bottom facing camera
13 = CAD_TYPE_VISION_V2 : Standard tag detection

It is preferred to enable multiple detection mode and configure each camera.

Note you should NEVER enable detection on both cameras, as this will cause failures in the algorithms.

Corresponds to the DETECT:detect_type configuration key.

detectTypeHori

Source

Int detectTypeHori

Horizontal camera detection.

0 = TAG_TYPE_NONE : No tag to detect
3 = TAG_TYPE_ORIENTED_ROUNDEL (???)
6 = TAG_TYPE_SHELL_TAG_V2 : Standard hulls (both indoor and outdoor) tags
8 = TAG_TYPE_BLACK_ROUNDEL : Black&While oriented roundel

Note you should NEVER enable detection on both cameras, as this will cause failures in the algorithms.

Corresponds to the DETECT:detections_select_h configuration key.

detectTypeVert

Source

Int detectTypeVert

Vertical camera detection.

0 = TAG_TYPE_NONE : No tag to detect
3 = TAG_TYPE_ORIENTED_ROUNDEL (???)
6 = TAG_TYPE_SHELL_TAG_V2 : Standard hulls (both indoor and outdoor) tags
8 = TAG_TYPE_BLACK_ROUNDEL : Black&While oriented roundel

Note you should NEVER enable detection on both cameras, as this will cause failures in the algorithms.

Corresponds to the DETECT:detections_select_v configuration key.

detectTypeVertFps

Source

Int detectTypeVertFps

Detection defaults to 60 fps, but may be reduced to 30 fps to reduce the CPU load when you don’t need a 60Hz detection.

Corresponds to the DETECT:detections_select_v_hsync configuration key.

drone

Source

Drone drone()

The wrapped drone instance

dump

Source

Str dump(Bool dumpToStdOut := true)

Dumps all fields to debug string.

gpsPosition

Source

Str:Float gpsPosition

The GPS position used for media tagging and userbox recording.

When setting values, all unknown values are ignored. To change, pass in a map with just the values you wish to update.

Corresponds to the configuration keys:

  • GPS:longitude
  • GPS:latitude
  • GPS:altitude
hoverMaxHeight

Source

Int hoverMaxHeight

The maximum distance (in millimetres) the drone should hover. Used when flyingMode is set to HOVER_ON_(ORIENTED_)ROUNDEL

Corresponds to the CONTROL:hovering_range configuration key.

hoverMode

Source

Int hoverMode

Enables free flight or a semi-autonomous hover on top of a roundel picture. If orientated then the drone will always face the same direction.

0 = FREE_FLIGHT                // Normal mode, commands are enabled
1 = HOVER_ON_ROUNDEL           // Commands are disabled, drone hovers on a roundel
2 = HOVER_ON_ORIENTED_ROUNDEL  // Commands are disabled, drone hovers on an oriented roundel

Hover modes MUST be activated by the detect_type configuration.

For all modes, progressive commands are possible.

Note HOVER_ON_ROUNDEL was developed for 2011 CES autonomous demonstration.

Corresponds to the CONTROL:flying_mode configuration key.

id

Source

Str id { private set }

The current session ID.

Corresponds to the CUSTOM:profile_id configuration key.

name

Source

Str name { private set }

The current session name.

Corresponds to the CUSTOM:profile_desc configuration key.

user

Source

DroneUserConfig user(Str? userName := null)

Gets or makes user config.

videoChannel

Source

Int videoChannel

The video channel that will be sent to the controller.

0 = ZAP_CHANNEL_HORI
1 = ZAP_CHANNEL_VERT

Corresponds to the VIDEO:videol_channel configuration key.

videoCodec

Source

Int videoCodec

Current video codec of the AR.Drone. Also controls the start/stop of the record stream.

Main values:

H264_360P_CODEC          = 0x81  // Live stream with 360p H264 hardware encoder. No record stream.
H264_720P_CODEC          = 0x83  // Live stream with 720p H264 hardware encoder. No record stream.

MP4_360P_CODEC           = 0x80  // Live stream with MPEG4.2 soft encoder. No record stream.
MP4_360P_H264_360P_CODEC = 0x88  // Live stream with MPEG4.2 soft encoder. Record stream with 360p H264 hardware encoder.
MP4_360P_H264_720P_CODEC = 0x82  // Live stream with MPEG4.2 soft encoder. Record stream with 720p H264 hardware encoder.

Other values:

NULL_CODEC               = 0,
UVLC_CODEC               = 0x20  // codec_type value is used for START_CODE
P264_CODEC               = 0x40
MP4_360P_SLRS_CODEC      = 0x84
H264_360P_SLRS_CODEC     = 0x85
H264_720P_SLRS_CODEC     = 0x86
H264_AUTO_RESIZE_CODEC   = 0x87  // resolution is automatically adjusted according to bitrate

Corresponds to the VIDEO:codec configuration key.

videoCodecFps

Source

Int videoCodecFps

Current FPS of the live video codec. Maximum value is 30.

Corresponds to the VIDEO:codec_fps configuration key.

videoMaxBitrate

Source

Int videoMaxBitrate

Maximum bitrate (kilobits per second) the device can decode. This is set as the upper bound for drone bitrate values.

Typical values for Apple iOS Device are:

  • iPhone 4S : 4000 kbps
  • iPhone 4 : 1500 kbps
  • iPhone 3GS : 500 kbps

When using the bitrate control mode in VBC_MANUAL, this maximum bitrate is ignored.

When using the bitrate control mode in VBC_MODE_DISABLED, the bitrate is fixed to this maximum bitrate.

Corresponds to the VIDEO:max_bitrate configuration key.