DJI_SDK
2018-08-28 09:41:43 4 举报
DJI Onboard SDK 架構文件整理
作者其他创作
大纲/内容
ACK::MFIOGet
ack : ErrorCodevalue : uint32_t
DJI::OSDK::Telemetry::Battery
capacity : uint32_tvoltage : uint32_tcurrent : int32_tpercentage : uint8_t
api/dji_ack.hpp/.cpp
DJI::OSDK::ErrorCode::MissionACK::WayPoint
{static const} INVALID_DATA : uint8_t{static const} INVALID_POINT_DATA : uint8_t{static const} DISTANCE_OVERFLOW : uint8_t{static const} TIMEOUT : uint8_t{static const} POINT_OVERFLOW : uint8_t{static const} POINTS_TOO_CLOSE : uint8_t{static const} POINTS_TOO_FAR : uint8_t{static const} CHECK_FAILED : uint8_t{static const} INVALID_ACTION : uint8_t{static const} POINT_DATA_NOT_ENOUGH : uint8_t{static const} DATA_NOT_ENOUGH : uint8_t{static const} POINTS_NOT_ENOUGH : uint8_t{static const} IN_PROGRESS : uint8_t{static const} NOT_IN_PROGRESS : uint8_t{static const} INVALID_VELOCITY : uint8_t
ACK::WayPointReachedData
DJI::OSDK::WayPointInitSettings
DJI::OSDK::Telemetry::Mag
DJI::OSDK::ErrorCode::MissionACK:: get
{const static} SUCCESS : uint8_t//! Anything else is failure
DJI::OSDK::MissionType
MISSION_MODE_AMISSION_WAYPOINTMISSION_HOTPOINTMISSION_FOLLOWMISSION_IOC
// These getter functions are only available // with Broadcast not with Subscribe telemetry
api/dji_hotpoint.hpp/.cpp
DJI::OSDK::Telemetry::TimeStamp
time_ms : uint32_ttime_ns : uint32_t
api/dji_subscription.hpp/.cpp
DJI::OSDK::DataBroadcast::FREQ
FREQ_0HZ = 0FREQ_1HZ = 1FREQ_10HZ = 2FREQ_50HZ = 3FREQ_100HZ = 4FREQ_200HZ = 6FREQ_400HZ = 7FREQ_HOLD = 5
DJI::OSDK::Telemetry::GPSInfo
time : PositionTimeStamplongitude : int32_tlatitude : int32_t// height above mean sea level (mm)HFSL : int32_t velocityNED : Vector3f // cm/sdetail : GPSDetail
api/dji_vehicle.hpp/.cpp
api/dji_telemetry_doc.hpp
DJI::OSDK::DJI_MISSION_TYPE
WAYPOINT = 0HOTPOINT = 1
#include \"open_protocol.hpp\"
DJI::OSDK::OpenProtocolCMD::CMDSet
+ {static const} activation = 0x00 : uint8_t+ {static const} control = 0x01 : uint8_t+ {static const} broadcast = 0x02 : uint8_t+ {static const} mission = 0x03 : uint8_t+ {static const} hardwareSync = 0x04 : uint8_t+ {static const} virtualRC = 0x05 : uint8_t+ {static const} mifo = 0x06 : uint8_t+ {static const} subscribe = 0x07 : uint8_t
DJI::OSDK::MISSION_ACTION
START = 0STOP = 1PAUSE = 2RESUME = 3
api/dji_mission_manager.hpp/.cpp
//! This is used as the datatype for all data arguments in callbackstypedef unsigned int size_tnamespace DJI::OSDKtypedef void* UserDatatypedef uint64_t time_mstypedef uint64_t time_ustypedef float float32_ttypedef double float64_textern char buffer[]****************Protocol Related Definitions********************const size_t SESSION_TABLE_NUM = 32const size_t CALLBACK_LIST_NUM = 10const size_t MAX_INCOMING_DATA_SIZE = 300const size_t MAX_ACK_SIZE = 107static const uint8_t CAMERA_PAIR_NUM = 5static const uint8_t IMAGE_TYPE_NUM = 10
ACK::getError return type when blocking call is successful/unsuccessful
DJI::OSDK::Telemetry::GPSDetail
//! horizontal dilution of precisionhdop : float32_t// ! position diltuionpdop : float32_t//! the state of GPS fixfix : float32_t//! vertical position accuracygnssStatus : float32_t//! horizontal pos accuracyhacc : float32_t//! speed accuracysacc : float32_t//! the number of GPS satellites for pos fix usedGPS : uint32_t//! the num of GLONASS satellites for pos fixusedGLN : uint32_t//! the total num of satellites used for pos fixNSV : uint16_t//! the accumulated times of sending GPS dataGPScounter : uint16_t
ACK
+ {static} SUCCESS : const bool+ {static} FAIL : const bool+ {static} OBTAIN_CONTROL = 1 : const uint8_t+ {static} RELEASE_CONTROL = 0 : const uint8_t
struct for TOPIC_CONTROL_DEVICE and data broadcastreturn SDKInfo
CMDSession
cmd_set : uint8_tcmd_id : uint8_tbuf : uint8_t*uint32_tsessionID : 5usageFlag : 1sent : 5retry : 5timeout : 16mmu : MMU_Tab*isCallback : boolcallbackID : intpreSeqNum : uint32_tpreTimestamp : time_ms
VirtualRCData
roll : uint32_tpitch : uint32_tthrottle : uint32_tyaw : uint32_tgear : uint32_treserved : uint32_tmode : uint32_tChannel_07 : uint32_tChannel_08 : uint32_tChannel_09 : uint32_tChannel_10 : uint32_tChannel_11 : uint32_tChannel_12 : uint32_tChannel_13 : uint32_tChannel_14 : uint32_tChannel_15 : uint32_t
use????????????
Waypoint settings for individual waypoints being added to the mission.This is one of the few structs in the OSDK codebase that is used in both \"a sending and a receiving\" API
Open-protocolhttps://developer.dji.com/onboard-sdk/documentation/introduction/index.htmlGround Station Protocol https://developer.dji.com/onboard-sdk/documentation/introduction/ground-station-protocol.html
dji_command.hppdji_type.hpp
ACK::WayPointInitInternal
ack : uint8_tdata : WayPointInitSettings
一、Session简单介绍 在WEB开发中,服务器可以为每个用户浏览器创建一个会话对象(session对象),注意:一个浏览器独占一个session对象(默认情况下)。因此,在需要保存用户数据时,服务器程序可以把用户数据写到用户浏览器独占的session中,当用户使用浏览器访问其它程序时,其它程序可以从用户的session中取出该用户的数据,为用户服务。二、Session和Cookie的主要区别Cookie是把用户的数据写给用户的浏览器。Session技术把用户的数据写到用户独占的session中。Session对象由服务器创建,开发人员可以调用request对象的getSession方法得到session对象。三、session实现原理3.1、服务器是如何实现一个session为一个用户浏览器服务的? 服务器创建session出来后,会把session的id号,以cookie的形式回写给客户机,这样,只要客户机的浏览器不关,再去访问服务器时,都会带着session的id号去,服务器发现客户机浏览器带session id过来了,就会使用内存中与之对应的session为之服务。可以用如下的代码证明:
APIs for Hotpoint (Point of Interest) Missions:Can be scheduled by the Mission managerAttention : Difference between set and update functionsSet func(s) : change the Hotpoint data in this classUpdate func(s) : change the Mission status.--Drone will response update functions immediately
use
DJI::OSDK::ErrorCode::MissionACK::IOC
{static const} TOO_CLOSE_TO_HOME : uint8_t{static const} UNKNOWN_TYPE : uint8_t
ACK::DroneVersion
ack : ACK::ErrorCodedata : Version::VersionData
api/dji_vehicle_callback.hpp
DJI::OSDK::ErrorCode::ControlACK::SetControl
{static const} RC_MODE_ERROR : uint16_t{static const} RELEASE_CONTROL_SUCC : uint16_t{static const} OBTAIN_CONTROL_SUCC: uint16_t{static const} OBTAIN_CONTROL_IN_PROG: uint16_t{static const} RELEASE_CONTROL_IN_PROG : uint16_t{static const} RC_NEED_MODE_F : uint16_t{static const} RC_NEED_MODE_P : uint16_t{static const} IOC_OBTAIN_CONTROL_ERROR : uint16_t
api/dji_command.hpp/.cpp
DJI::OSDK::Telemetry::RTK
struct for data broadcastreturn flight status
struct for TOPIC_RTK_POSITIONsub struct for RTK of data broadcast
DJI::OSDK::Camera
- vehicle : Vehicle*
//Non-blocking+ shootPhoto() + videoStart()+ videoStop()-action(const uint8_t cmd[])
DJI::OSDK::Telemetry::GimbalStatus
DJI::OSDK::HotpointMission::YawRate
clockwise : uint8_tyawRate : float32_t
VirtualRCSetting
uint8_tenable : 1cutooff : 1uint8_t : 6
session mechanismhttps://www.cnblogs.com/xdp-gacl/p/3855702.htmlhttps://www.cnblogs.com/lonelydreamer/p/6169469.html
5
DJI::OSDK::OpenProtocolCMD::CMDSet::VirtualRC
{static const} settings: uint8_t[MAX_CMD_ARRAY_SIZE]{static const} data: uint8_t[MAX_CMD_ARRAY_SIZE]
{private} DJI::OSDK::DataBroadcast::FLAG
dji_ack.hppRecvConatiner vs CmdContainer(void*)
api/dji_mifo.hpp/.cpp
api/dji_mission_base.hpp
struct for TOPIC_GPS_DETAILSsub struct for GPSInfo of data broadcast
create and manage
protocol/protocol_base.hpp{cpp}
DJI::OSDK::WayPointSettings
//! Index to be uploadedindex : uint8_t//! Latitude (radian)latitude : float64_t//! Longitude (radian)longitude : float64_t//! Altitude ( relative altitude from takeoff point)altitude : float32_t//! Bend length ( effective coordinated turn mode only)damping : float32_t//! Yaw (degree)yaw : int16_t//! Gimbal pitchgimbalPitch : int16_t//! Turn mode//! 0 : CW//! 1 : CCWturnMode : uint8_t//! Reservedreserved : uint8_t[8]//! Action flag//! 0 : no action//! 1 : has actionhasAction ; uint8_t//! Action time limitactionTimeLimit : uint16_tuint8_t//! Total number of actionsactionNumber : 4//! Total running timesactionRepeat : 4//Command ListcommandList : uint8_t[16]//Command parameterscommandParameter : uint16_t[16]
createXXXXXSettings
DJI::OSDK::HotpointMission::View
VIEW_NORTH = 0VIEW_SOUTH = 1VIEW_WEST = 2VIEW_EAST = 3VIEW_NEARBY = 4
DJI::OSDK::WayPointPushDataIncidentType
NAVI_MODE_ATTINAVI_MISSION_WAYPOINTNAVI_MISSION_HOTPOINTNAVI_MISSION_FOLLOWMENAVI_MISSION_IOC
useVehicleCallback
DJI::OSDK::SubscriptionPackage
- occupied : bool- leftOverDataFlag : bool- info : PackageInfo- uidList : uint32_t[Telemetry::TOTAL_TOPIC_NUMBER]- topicList : Telemetry::TopicName[Telemetry::TOTAL_TOPIC_NUMBER]- offsetList : uint32_t[Telemetry::TOTAL_TOPIC_NUMBER]- packageDataSize : uint32_t//****************** (for wrapper usage input)*************************incomingDataBuffer : uint8_t*userUnpackHandler : VehicleCallBackHandler
DJI::OSDK::WayPointIncidentType
NAVI_UPLOAD_FINISHNAVI_MISSION_FINISHNAVI_MISSION_WP_REACH_POINT
DJI::OSDK::HotPointSettings
use as members for local cache
This is default mapping data structure for virtual remote controller
DJI::OSDK::Telemetry::PositionFrame
time : PositionTimeStampdata : PositionData
// state
DJI::OSDK::Telemetry::GlobalPosition
down : float32_t //cmfront : float32_t //cmright : float32_t //cmback : float32_t //cmleft : float32_t //cmup : float32_t //cmuint8_tdownHealth : 1frontHealth : 1rightHealth : 1backHealth : 1leftHealth : 1upHealth : 1reserved : 2 //for extra health flag
DJI::OSDK::ErrorCode::CommonACK
+ {static const} SUCCESS : uint16_t+ {static const} KEY_ERROR : uint16_t+ {static const} NO_AUTHORIZATION_ERROR : uint16_t+ {static const} NO_RIGHTS_ERROR : uint16_t+ {static const} NO_RESPONSE_ERROR : uint16_t//! These error codes would return either from //! CMDSet::Control::Task or from messions+ {static const} MOTOR_FAIL_NONE : uint8_t+ {static const} MOTOR_FAIL_COMPASS_ABNORMAL : uint8_t+ {static const} MOTOR_FAIL_ASSISTANT_PROTECTED : uint8_t //+ {static const} MOTOR_FAIL_DEVICE_LOCKED : uint8_t + {static const} MOTOR_FAIL_IMU_NEED_ADV_CALIBRATION : uint8_t+ {static const} MOTOR_FAIL_IMU_SN_ERROR : uint8_t+ {static const} MOTOR_FAIL_IMU_PREHEATING : uint8_t+ {static const} MOTOR_FAIL_COMPASS_CALIBRATING : uint8_t+ {static const} MOTOR_FAIL_IMU_NO_ATTITUDE : uint8_t+ {static const} MOTOR_FAIL_NO_GPS_IN_NOVICE_MODE : uint8_t+ {static const} MOTOR_FAIL_BATTERY_CELL_ERROR : uint8_t + {static const} MOTOR_FAIL_BATTERY_COMMUNICATION_ERROR : uint8_t+ {static const} MOTOR_FAIL_BATTERY_VOLTAGE_TOO_LOW : uint8_t+ {static const} MOTOR_FAIL_BATTERY_USER_LOW_LAND : uint8_t+ {static const} MOTOR_FAIL_BATTERY_MAIN_VOL_LOW : uint8_t+ {static const} MOTOR_FAIL_BATTERY_TEMP_VOL_LOW : uint8_t+ {static const} MOTOR_FAIL_BATTERY_SMART_LOW_LAND : uint8_t+ {static const} MOTOR_FAIL_BATTERY_NOT_READY : uint8_t//+ {static const} MOTOR_FAIL_PACK_MODE : uint8_t+ {static const} MOTOR_FAIL_IMU_ATTI_LIMIT : uint8_t//+ {static const} MOTOR_FAIL_NOT_ACTIVATED : uint8_t+ {static const} MOTOR_FAIL_IN_FLYLIMIT_AREA : uint8_t//*+ {static const} MOTOR_FAIL_IMU_BIAS_LIMIT : uint8_t+ {static const} MOTOR_FAIL_ESC_ERROR : uint8_t//+ {static const} MOTOR_FAIL_IMU_INITING : uint8_t+ {static const} MOTOR_FAIL_UPGRADING : uint8_t+ {static const} MOTOR_FAIL_HAVE_RUN_SIM : uint8_t+ {static const} MOTOR_FAIL_IMU_CALIBRATING : uint8_t+ {static const} MOTOR_FAIL_TAKEOFF_TILT_TOO_LARGE : uint8_t+ {static const} MOTOR_FAIL_RESERVED_31~40 : uint8_t+ {static const} MOTOR_FAIL_INVALID_SN : uint8_t......................
HotPoint Mission Initialization settingsThis is one of the few structs in the OSDK codebase that is used in both \"a sending and a receiving\" API
ACK::WayPointAddPoint
ack : ErrorCodeindex : uint8_t
api/dji_type.hppMAX_INCOMING_DATA_SIZE = 300MAX_ACK_SIZE = 107
DJI::OSDK::TelemetryThis namespace encapsulates all available telemetry \"topics\" throughBroadcast or Subscribe (with sessions)
DJI::OSDK::DataSubscription
+ {static const} MAX_NUMBER_OF_PACKAGE = 5 : uint8_t+ subscriptionDataDecodeHandler : VehicleCallBackHandler- vehicle : Vehicle*- protocol : OpenProtocol*- package : SubscriptionPackage[MAX_NUMBER_OF_PACKAGE]
DJI::OSDK::Telemetry::TopicName
TOPIC_QUATERNIONTOPIC_ACCELERATION_GROUNDTOPIC_ACCELERATION_BODYTOPIC_ACCELERATION_RAWTOPIC_VELOCITYTOPIC_ANGULAR_RATE_FUSIONEDTOPIC_ANGULAR_RATE_RAWTOPIC_ALTITUDE_FUSIONEDTOPIC_ALTITUDE_BAROMETERTOPIC_HEIGHT_HOMEPOINTTOPIC_HEIGHT_FUSIONTOPIC_GPS_FUSEDTOPIC_GPS_DATETOPIC_GPS_TIMETOPIC_GPS_POSITIONTOPIC_GPS_VELOCITYTOPIC_GPS_DETAILSTOPIC_RTK_POSITIONTOPIC_RTK_VELOCITYTOPIC_RTK_YAWTOPIC_RTK_POSITION_INFOTOPIC_RTK_YAW_INFOTOPIC_COMPASSTOPIC_RCTOPIC_GIMBAL_ANGLESTOPIC_GIMBAL_STATUSTOPIC_STATUS_FLIGHTTOPIC_STATUS_DISPLAYMODETOPIC_STATUS_LANDINGGEARTOPIC_STATUS_MOTOR_START_ERRORTOPIC_BATTERY_INFOTOPIC_CONTROL_DEVICETOPIC_HARD_SYNCTOPIC_GPS_SIGNAL_LEVELTOPIC_GPS_CONTROL_LEVELTOPIC_RC_FULL_RAW_DATATOPIC_RC_WITH_FLAG_DATATOPIC_ESC_DATATOPIC_RTK_CONNET_STATUSTOPIC_GIMBAL_CONTROL_MODETOPIC_FLIGHT_ANOMALYTOPIC_POSITION_VOTOTAL_TOPIC_NUMBER
struct for data broadcastreturn gimbal angle
DJI::OSDK::HotpointMission
- hotPointData : HotPointSettings+ hotPointCallback : VehicleCallBackHandler
(blocking)Return from DJI::OSDK::WayPointMission::readInitData
ACK::ErrorCode
info : Entrydata : uint32_t
DJI::OSDK::Telemetry::VelocityInfo
uint8_thealth : 1 //0 - not usingreserve : 7
struct for data broadcast return RTK(Real Time Kinematics) info** for A3/M600
ACK::WayPointVelocityInternal
ack : uint8_tidleVelocity : float32_t
api/dji_control.hpp/.cpp
DJI::OSDK::ErrorCode::SubscirbeACK
+ {static const} SUCCESS : uint8_t+ {static const} ILLEGAL_DATA_LEN : uint8_t+ {static const} VERSION_DOES_NOT_MATCH : uint8_t+ {static const} PACKAGE_OUT_OF_RANGE : uint8_t+ {static const} PACKAGE_ALREADY_EXISTS : uint8_t+ {static const} PACKAGE_DOES_NOT_EXIST: uint8_t+ {static const} ILLEGAL_FREQUENCY : uint8_t+ {static const} PACKAGE_TOO_LARGE : uint8_t+ {static const} PIPLINE_OVERFLOW : uint8_t+ {static const} INTERNAL_ERROR_0X09 : uint8_t+ {static const} PACKAGE_EMPTY : uint8_t+ {static const} INCORRECT_NUM_OF_TOPICS : uint8_t+ {static const} ILLEGAL_UID : uint8_t+ {static const} PERMISSION_DENY : uint8_t+ {static const} MULTIPLE_SUBSCRIBE : uint8_t+ {static const} SOURCE_DEVICE_OFFLINE : uint8_t+ {static const} PAUSED : uint8_t+ {static const} RESUMED : uint8_t+ {static const} INTERNAL_ERROR_0X4A : uint8_t+ {static const} FAILED_AUTHENTICATION : uint8_t+ {static const} VERSION_VERSION_TOO_FAR : uint8_t+ {static const} VERSION_UNKNOWN_ERROR : uint8_t+ {static const} INTERNAL_ERROR_0XFF : uint8_t
disptachInfo
DJI::OSDK::Telemetry::PositionData
longitude : float64_tlatitude : float64_t//! height above mean sea level (m)HFSL : float32_t
api/dji_mission_type.hpp
DJI::OSDK::HotpointMission::YawMode
YAW_AUTO = 0YAW_INSIDE = 1YAW_OUTSIDE = 2YAW_CUSTOM = 3YAW_STATIC = 4
DJI::OSDK::Telemetry::SyncStamp
time_2p5ms : uint32_ttag : uint16_tflag : uint8_t
struct for TOPIC_GIMBAL_STATUS
DJI::OSDK::Telemetry::PositionTimeStamp
date : uint32_ttime : uint32_t
DJI::OSDK::Telemetry::Vector3f
x : float32_t y : float32_t z : float32_t
use???????(src)
ACK::HotPointStartInternal
ack : uint8_tmaxRadius : float32_t
DJI::OSDK::OpenProtocolCMD::CMDSet::Mission
//! Waypoint mission commands{static const} waypointSetStart : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypointSetPause : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypointDownload : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypointIndexDownload : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypointSetVelocity : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypointGetVelocity : uint8_t[MAX_CMD_ARRAY_SIZE]//! Hotpoint mission commands{static const} hotpointStart : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointStop : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointSetPause : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointYawRate : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointRadius : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointSetYaw : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} hotpointDownload : uint8_t[MAX_CMD_ARRAY_SIZE]//! Follow mission commands{static const} followStart : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} followStop : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} followSetPause : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} followTarget : uint8_t[MAX_CMD_ARRAY_SIZE]
struct for GPSInfo of data broadcast
DJI::OSDK::Telemetry::Velocity
data : Vector3finfo : VelocityInfo
DJI::OSDK::WaypointMission
- info : WayPointInitSettings- index : WayPointSettings*+ wayPointCallback : VehicleCallBackHandler+ wayPointEventCallback : VehicleCallBackHandler
ACK::WayPointAddPointInternal
ack : uint8_tindex : uint8_t
DJI::OSDK::Telemetry::LegacyGPSInfo
struct for data broadcastreturn magnetometer reading
DJI::OSDK::OpenProtocolCMD::CMDSet::Subscribe
{static const} versionMatch : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} addPackage : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} reset : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} removePackage : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} updatePackageFreq : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} pauseResume : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} getConfig : uint8_t[MAX_CMD_ARRAY_SIZE]
DispatchInfo
isAck : boolisCallback : boolcallbackID : uint8_t
ACKSession
uint32_tsessionID : 5sessionStatus : 2res : 25mmu : MMU_Tab*
DJI::OSDK::ErrorCode::MissionACK:: Follow
{static const} TOO_FAR_FROM_YOUR_POSITION_LACK_OF_RADIO_CONNECTION : uint8_t{static const} CUTOFF_TIME_OVERFLOW : uint8_t{static const} GIMBAL_PITCH_ANGLE_OVERFLOW : uint8_t
DJI::OSDK::OpenProtocolCMD::CMDSet::MFIO
{static const} init: uint8_t[MAX_CMD_ARRAY_SIZE]{static const} get: uint8_t[MAX_CMD_ARRAY_SIZE]{static const} set: uint8_t[MAX_CMD_ARRAY_SIZE]
ACK::HotPointStart
ack : ErrorCodemaxRadius : float32_t
DJI::OSDK::ErrorCode* Contains all the acknowledgments sent by the aircrafts* Each component of the SDK has \"its own subsclass\" defined with the ErrorCode class
(blocking)Return from DJI::OSDK::HotpointMission::read
latitude : float64_t //radlongitude : float64_t //radaltitude : float32_t //barheight : float32_t //mhealth : uint32_t //0-5
api/dji_telemetry.hpp
ACK::WayPointIndex
ack : ErrorCodedata : WayPointSettings
(blocking)Return from DJI::OSDK::HotpointMission::start
DJI::OSDK::Gimbal::AngleData
yaw : int16_troll: int16_tpitch : int16_tmode : uint8_tduration : uint8_t
ACK::WayPointStatusPushData
use?????????????????
ACK::TypeUnion
raw_ack_array : uint8_t[MAX_INCOMING_DATA_SIZE]versionACK : uint8_t[MAX_ACK_SIZE]ack : uint16_tcommandACK : uint8_tmissionACK : uint8_tsubscribdACK : uint8_tmfioACK : uint8_t//! ACK(s) containing ACK data plus extra payloadhpStartACK : HotPointStartInternalhpReadACK : HotPointReadInternalwpInitACK : WayPointInitIInternalwpAddPointACK : WayPointAddPointInternalwpIndexACK : WayPointIndexInternalwpVelocityACK : WayPointVelocityInternalmfioGetACK : MFIOGetInternal//! Push Data in ground-station modewayPointReachedData : WayPointReachedDatawayPointStatusPushData : WayPointStatusPushData//! Push Data from AdvancedSensing protocolstereoImgData : StrereoImgData*stereoVGAImgData : StereoVGAImgData*
DJI::OSDK::Telemetry::Vector3d
x : int32_t y : int32_t z : int32_t
DJI::OSDK::ErrorCode::MFIOACK:: set
{static const} SUCCESS : uint8_t//! Port not exit or not an output configuration{static const} CHANNEL_ERROR : uint8_t//! Port not map to f channel{static const} PORT_NOT_MAPPED_ERROR : uint8_t
?
DJI::OSDK::OpenProtocolCMD::CMDSet::Broadcast
{static const} broadcast : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} fromMobile : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} lostCTRL : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} mission : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} subscribe : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} test : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} waypoint : uint8_t[MAX_CMD_ARRAY_SIZE]
struct for TOPIC_VELOCITYThe velocity may be in body or ground frame.Based on settings
typedef uint16_t EnableFlagtypedef uint8_t LegacyStatustypedef uint8_t LegacyBatteryextern TopicInfo TopicDataBase[]template struct TypeMap{ typedef void type}特例化...............
(blocking)Return from DJI::OSDK::Vehicle:::getDroneVersion
DJI::OSDK::MissionManager
+ vehicle : Vehicle*+ wpMission : WaypointMission*+ hpMission : HotpointMission*- wpMisssionArray : WaypointMission*[MAX_MISSION_SIZE]- hpMisssionArray : HotpointMission*[MAX_MISSION_SIZE]+ wayptCounter : int+ hotptCounter : int- {static const} MAX_MISSION_SIZE = 5 : int
multi topics
DJI::OSDK::Telemetry::Gimbal
MFIOGetInternal
result : uint8_tvalue : uint32_t
sub struct for TOPIC_HARD_SYNC
MMU_Tab
uint32_ttabIndex : 8usageFlag : 8memSize : 16pmem : uint8_t*
DJI::OSDK::OpenProtocolCMD::CMDSet::HardwareSync
{static const} broadcast: uint8_t[MAX_CMD_ARRAY_SIZE]
DJI::OSDK::OpenProtocolCMD::CMDSet::Activation
{static const} getVersion : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} activate : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} frequency : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} toMobile : uint8_t[MAX_CMD_ARRAY_SIZE]
ACK::HotPointRead
ack : ErrorCodedata : HotPointSettngsextraByte : uint8_t
DJI::OSDK::OpenProtocolCMD::CMDSet::Control
{static const} setControl : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} task : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} status : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} control : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} setArm : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} gimbalSpeed : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} gimbalAngle : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} cameraShot : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} cameraVideoStart : uint8_t[MAX_CMD_ARRAY_SIZE]{static const} cameraVideoStop : uint8_t[MAX_CMD_ARRAY_SIZE]
RecvContainer
recvInfo : DJI::OSDK::ACK::EntryrecvData : DJI::OSDK::ACK::TypeUnion
struct for TOPIC_BATTERY_INFO and data broadcastreturn battery status
DJI::OSDK::Gimbal
- vehicle Vehicle*
+ Gimbal(Vehicle *vehicle)+ ~Gimbal()+ setAngle(Gimbal::AngleData *data)+ setspeed(Gimbal::SpeedData *data)
api/dji_broadcast.hpp/.cpp
DJI::OSDK::OpenProtocolCMD
+ {static const} MAX_CMD_ARRAY_SIZE = 2 : int
DJI::OSDK::Telemetry::LegacyTimestamp
DJI::OSDK::Telemetry::GPSFused
latitude : float64_t //radlongitude : float64_t //radaltitude : float32_t //barvisibleSatelliteNumber : uint16_t //num
ACK::Entry
cmd_set : uint8_tcmd_id : uint8_tlen : uint16_tbuf : uint8_t*seqNumber : uint8_tversion : Version::Firmware
DJI::OSDK::ErrorCode::ControlACK::LegacyTask
{static const} SUCCESS : uint16_t{static const} FAIL : uint16_t
api/dji_waypoint.hpp/.cpp
Used in dji_waypoint.hpp -- WaypointMission
GROUND STATION PROGRAMMING GUIDEhttps://developer.dji.com/onboard-sdk/documentation/application-development-guides/ground-station-programming-guide.html
//see FlightStatus dji_status.hpp//see LandingGearMode dji_status.hpp
DJI::OSDK::Telemetry::RC
useDJI::OSDK::OpenProtocolCMD::CMDSet::Mission
Timestamp for GPS and RTK
DJI::OSDK::ErrorCode::ActivationACK
+ {static const} SUCCESS : uint16_t+ {static const} PARAMETER_ERROR : uint16_t+ {static const} ENCODE_ERROR : uint16_t+ {static const} NEW_DEVICE_ERROR : uint16_t+ {static const} DJIGO_APP_NOT_CONNECTED : uint16_t+ {static const} NETWORK_ERROR : uint16_t+ {static const} SERVER_ACCESS_REFUSED : uint16_t+ {static const} ACCESS_LEVEL_ERROR : uint16_t+ {static const} OSDK_VERSION_ERROR : uint16_t
DJI::OSDK::Telemetry::TopicInfo
{const} name : TopicName{const} uid : uint32_t//! The size of actual data for the topic{const} size : size_t//! Max freq in Hz for the topic provided by FC{const} mazFreq : uint16_tfreq : uint16_tpkgID : uint8_t//! Pointer to topic's address in the data buff which//stores the latest datalatest : uint8_t*
usereturn xxxxSettings
useUserData(dji_ack.hpp)ACK::ErrorCode
api/dji_error.hpp/.cpp
MissionBase
# vehicle : Vehicle*
api/dji_gimbal.hpp/.cpp
Used in dji_waypoint.hpp -- HotpointMission
ACK::WayPointIndexInternal
ack : uint8_tdata : WayPointSettings
Waypoint Mission Initialization settingsThis is one of the few structs in the OSDK codebase that is used in both \"a sending and a receiving\" API
struct indicates the signal level of GPS velocity info
DJI::OSDK::Telemetry::SyncTimestamp
DJI::OSDK::VehicleCallBackHandler
callback VehicleCallBackuserData UserData
api/dji_hardware_sync.hpp/.cpp
Command
uint16_tsessionMode : 2encrypt : 1retry : 13timeout : uint16_tlength : size_tbuf : uint8_t*cmd_set : uint8_tcmd_id : uint8_tisCallback : boolcallbackID : int
DJI::OSDK::Gimbal::SpeedData
yaw : int16_troll : int16_tpitch : int16_tuint8_treserved0 : 1reserved1 : 1extend_control_range : 1disable_fov_zoom : 1ignore_aircraft_motion : 1yaw_return_neutral : 1ignore_user_stick : 1gimbal_control_authority : 1
DJI::OSDK::ErrorCode::ControlACK::Task
{static const} SUCCESS : uint16_t{static const} MOTOR_ON : uint16_t{static const} MOTOR_OFF : uint16_t{static const} IN_AIR : uint16_t{static const} NOT_IN_AIR : uint16_t{static const} NO_HOMEPOINT : uint16_t{static const} BAD_GPS : uint16_t//TODO : not to consider as error{static const} IN_SIMULATOR_MODE : uint16_t{static const} ALREADY_RUNNING : uint16_t{static const} NOT_RUNNING : uint16_t{static const} INVALID_COMMAND : uint16_t{static const} NO_LANDING_GEAR : uint16_t{static const} GIMBAL_MOUNTED : uint16_t{static const} BAD_SENSOR : uint16_t{static const} ALREADY_PACKED : uint16_t{static const} NO_PACKED : uint16_t{static const} PACKED_MODE_NOT_SUPP : uint16_t
DJI::OSDK::Telemetry::Quaternion
q0 : float32_t //! wq1 : float32_t //! xq2 : float32_t //! yq3 : float32_t //! z
DJI::OSDK::ErrorCode::MFIOACK:: init
{static const} SUCCESS : uint8_t{static const} UNKOWN_ERROR : uint8_t{static const} PORT_NUMBER_ERROR : uint8_t{static const} PORT_MODE_ERROR : uint8_t{static const} PORT_DATA_ERROR : uint8_t
DJI::OSDK::ErrorCode::ControlACK::SetArm
{static const} SUCCESS : uint16_t{static const} OBTAIN_CONTROL_NEEDED_ERROR : uint16_t{static const} ALREADY_ARMED_ERROR : uint16_t{static csont} AIRCRAFT_IN_AIR_ERROR : uint16_t
(blocking)Return from DJI::OSDK::WayPointMission::uploadIndexData
multi topics** TOPIC_GPS_POSITION : (uint32)deg*10^7
OpenHeader
uint32_tsof : 8length : 10version : 6sessionID : 5isAck : 1reserved0 : 2 //always 0uint32_tpadding : 5enc : 3reserved1 : 24uint32_tsequenceNumber : 16crc : 16
DJI::OSDK::WaypointFinishData
//! See WayPointIncidentTypeincident_type : uint8_trepeat : uint8_treserved_1 : uint8_treserved_2 : uint8_t
api/dji_camera.hpp/.cpp
DJI::OSDK::ErrorCode::MFIOACK
DJI::OSDK::Telemetry::SDKInfo
//! CtrlMode in dji_status.hppcontrolMode : uint8_tuint8_t//! 0 - rc 1 - app 2 - serialdeviceStatus : 3//! 1 opened 0 - closedflightStatus : 1vrcStatus : 1reserved : 3
Telemetry API through \"\"asynchronous\"\" \"Subscribe\" - style messagesThe subscribe API allows fine-grained control over requesting various topics at various frequencesAll topics at a certain frequency should be put into a single package.Subscribe style telemetry is a new feature since OSDK3.3
DJI::OSDK::ErrorCode::MissionACK
struct for data broadcast &subscriptionreturn RC reading
ACK::WayPointVelocity
ack : ErrorCodeidleVelocity : float32_t
ACK::HotPointReadInternal
ack : uint8_tdata : HotPointSettingsextraByte : uint8_t
//see CtrlMode in dji_status.hpp
TOPIC_QUATERNION
Call the protocol layer to use the send function with vehiclecmd array representing camera commands :OpenProtocol::CMDSet::Control::cameraShotOpenProtocol::CMDSet::Control::cameraVideoStartOpenProtocol::CMDSet::Control::cameraVideoStop
ProtocolBase
(blocking)Return from DJI::OSDK::WayPointMission::waypointIndexDownload
struct for TOPIC_HARD_SYNC
sub struct for RTK of data broadcast
DJI::OSDK::Telemetry::Status
//see FlightStatus dji_status.hppflight uint8_t// Enum MODEmode : uint8_t//see LandingGearMode dji_status.hppgear : uint8_t// enum DJI_ERROR_CODEerror : uint8_t
DJI::OSDK::SubscriptionPackage::PackageInfo
packageID : uint8_tfreq : uint16_t//Header config : uint8_tnumberOfTopics : uint8_t
STATE!!!!
Function Module of a vehicle
ACK::WayPointInit
ack : ErrorCodedata : WayPointInitSettings
DJI::OSDK::Telemetry::HardSyncData
useVehicleCallBack
ACK Structures exposed to user
DJI::OSDK::Telemetry::TOPIC_UID
DJI::OSDK::ErrorCode::MissionACK:: Common
{static const} SUCCESS : uint8_t{static const} WRONG_WAYPOINT_INDEX : uint8_t{static const} RC_NOT_IN_MODE_F : uint8_t{static const} OBTAIN_CONTROL_REQUIRED : uint8_t{static const} CLOSE_IOC_REQUIRED : uint8_t{static const} NOT_INITIALIZED : uint8_t{static const} NOT_RUNNING : uint8_t{static const} IN_PROGRESS : uint8_t{static const} TASK_TIMEOUT : uint8_t//{static const} OTHER_MISSION_RUNNING : uint8_t{static const} BAD_GPS : uint8_t{static const} RTK_NOT_READY : uint8_t{static const} LOW_BATTERY : uint8_t//{static const} VEHICLE_DID_NOT_TAKE_OFF : uint8_t{static const} INVALID_PARAMETER : uint8_t{static const} CONDITIONS_NOT_SATISFIED : uint8_t//{static const} CROSSING_NO_FLY_ZONE : uint8_t{static const} UNRECORDED_HOME : uint8_t{static const} AT_NO_FLY_ZONE : uint8_t{static const} TOO_HIGH : uint8_t{static const} TOO_LOW : uint8_t{static const} TOO_FAR_FROM_HOME : uint8_t{static const} NOT_SUPPORTED : uint8_t//! Current position of aircraft is too far from //! the HotPoint or first point{static const} TOO_FAR_FROM_CURRENT_POSITION : uint8_t{static const} BEGINNER_MODE_NOT_SUPPORTED : uint8_t{static const} TAKE_OFF_IN_PROG : uint8_t{static const} LANDING_IN_PROG : uint8_t{static const} RETURN_HOME_IN_PROG : uint8_t{static const} START_MOTORS_IN_PROG : uint8_t{static const} INVALID_COMMAND : uint8_t{static const} UNKNOWN_ERROR : uint8_t
DJI::OSDK::DataBroadCast
- vehicle : Vehicle*- passFlag : uint16_t- broadcastLength : uint16_t- timeStamp : Telemetry::TimeStamp- syncStamp : Telemetry::SyncStamp- q : Telemetry::Quaternion- a : Telemetry::Vector3f- v : Telemetry::Vector3f- w : Telemetry::Vector3f- vi : Telemetry::VelocityInfo- gp : Telemetry::GlobalPosition- rp : Telemetry::RelativePosition- gps : Telemetry::GPSInfo- rtk : Telemetry::RTK- mag : Telemetry::Mag- rc : Telemetry::RC- gimbal : Telemetry::Gimbal- status : Telemetry::Status- battery : Telemetry::Battery- info : Telemetry::SDKInfo- legacyTimeStamp : Telemetry::LegacyTimeStamp- legacyVelocity : Telemetry::LegacyVelocity- legacyBattery : Telemetry::LegacyStatus- legacyGPSInfo : Telemetry::LegacyGPSInfo
DJI::OSDK::ErrorCode::MissionACK::HotPoint
{static const} INVALID_RADIUS : uint8_t{static const} YAW_RATE_OVERFLOW : uint8_t//! Start pt given by user during HotPoint mission //! initialization is invalid.{static const} INVALID_START_PT : unt8_t{static const} INVALID_YAW_MODE : uint8_t{static const} TOO_FAR_FROM_HOTPOINT : uint8_t{static const} INVALID_PARAMETER : uint8_t{static const} INVALID_LATITUDE_OR_LONGITUTE : uint8_t{static const} INVALID_DIRECTION : uint8_t{static const} INVALID_PARAMETER : uint8_t{static const} IN_PAUSED_MODE : uint8_t{static const} FAILED_TO_PAUSE : uint8_t
Dynamic allocation/serialization for setting from helper.It stores its index for aforementioned implementaionDataBuffer is static allocated since the TOTAL_TOPIC_NUMBER is 30 by now (not too large)
api/dji_type.hpp
DJI::OSDK::ErrorCode::ControlACK
(blocking)Return from DJI::OSDK::WayPointMission::updateIdleVelocity
DJI::OSDK::Telemetry::LegacyVelocity
SDKFilter
reuseIndex : uint32_treuseCount : uint32_trecvIndex : uint32_trecvBuf : uint8_t*sdkKey : uint8_t[32]encode : uint8_t
0 条评论
下一页
为你推荐
查看更多