Situation Awareness

2024-09-09
5 Ratings
1 customer rated

Function Overview

TSA is a function that supports DJI Pilot 2 to display the aircraft/RC info on the map by using the device coordinate information which is sent by the Server end. Both web end and DJI Pilot 2 end will have all devices info under the same workspace. It can help the communication and info sharing between all devices/Pilot2/teammates.

For example, in the following figure,Pilot A,Pilot B, DOCK A, DOCK B, Human, and other devices have pushed their information to the server through API. Once the server end receives all information, it will summarize it and push it to different DJI Pilot 2 through WebSocket, thenPilot A andPilot B will have all info displayed in their APP.


Interaction Sequence Diagram

sequenceDiagram participant h5 as Pilot2 Webview participant app as DJI Pilot 2 participant cloud as Cloud Server participant other as Others h5 ->> cloud:Log in to the 3rd party platform note over app, h5: Setup workspaceId, load api,ws,tsa module h5 ->> app: load api module h5 ->> app: load Ws module h5 ->> app: load TSA module app ->> cloud: Websocket connection cloud -->> app:connect app ->> cloud:Pilot2 online first time, request device list topology cloud -->> app: response loop status push other ->> cloud: Push device remote sensing information cloud ->> app: Push device remote sensing information at a fixed frequency opt device_online/offline/update other ->> cloud: other devices online/offline/update status cloud ->> app: push device_online info through websocket app ->> app:process websocket info app ->> cloud: request device list topology end end

Detailed API Realization

  • JSBridgeopen in new window

    • Load DJI Pilot 2 TSA Module window.djiBridge.platformLoadComponent(String name, String param)
      Before using the TSA function, developers need to set up the workspaceId, configure the Ws module and api module, and then load the DJI Pilot 2 map module. Also, developers can consider adding the loading interface of map module in log-in phase.
  • Situation Awareness (HTTPS)open in new window

    • Obtain Device Topology List
      In the first connection, DJI Pilot 2 will send out an http request to obtain all devices list and topology list. On the server end, it needs to synchronize the device list to DJI Pilot 2. Also, if it receives an instruction of device online/offline/update from WebSocket, it needs the same interface to request the update of the device topology list.

    • Custom Icon
      The device can display custom icons by using icon_urls. If the field is defined, it will be displayed in preference to the content of the field. If not, it is displayed by default by device_model.

"icon_urls":{      
                "normal_icon_url":"resource://Pilot2/drawable/tsa_aircraft_others_normal",    // Normal status icon
                "selected_icon_url":"resource://Pilot2/drawable/tsa_aircraft_others_pressed",   // Selected status icon
            }

App has some built-in icons.

url style:  resource://Pilot2/drawable/tsa_aircraft_others_normal

Built-in Icon List

IconIcon_urlRemark
GTScreenshot_20220322_172153.pngresource://Pilot2/drawable/tsa_car_select
GTScreenshot_20220322_172131.pngresource://Pilot2/drawable/tsa_car_normal
GTScreenshot_20220322_172207.pngresource://Pilot2/drawable/tsa_person_select
GTScreenshot_20220322_172226.pngresource://Pilot2/drawable/tsa_person_normal
GTScreenshot_20220322_172239.pngresource://Pilot2/drawable/tsa_equipment_select
GTScreenshot_20220322_172248.pngresource://Pilot2/drawable/tsa_equipment_normal

Support online icon. Online Icons are downloaded and cached inside the App and displayed on the map at a fixed size (28dp).

url style: http://r56978dr7.hn-bkt.clouddn.com/tsa_equipment_normal.png

The icon in DJI Pilot 2 Map:


  • Situation Awareness (WebSocket)open in new window and Remote Controller Propertiesopen in new window

    • Device Remote Sensing information Push
      The Server end will push all devices' remote sensing information under the same workspace to DJI Pilot 2 and DJI Pilot 2 will update the status and position of the device based on the received data.

    • Device Online/Offline/Update Topology Status Push
      When the Server end has received a request for any device online/offline/topology update, it will broadcast a device online/offline/topology update push notification to DJI Pilot 2. DJI Pilot 2 will trigger "obtain device topology list"

If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.