Skip to main content

A second attempt reverse engineering drones: Potensic Atom 2

See the previous blog about hacking the Potensic Atom 1 for full context on this latest update.

The Potensic Atom 2

I was updated by a reader than the Potensic Atom 2 recently received a new firmware upgrade:

The New Waypoint Format

I captured a few test waypoint missions and discovered:

/sdcard/Android/data/com.ipotensic.atom/files/Waypoint/
└── 1770653566867/                  # One waypoint mission (unix timestamp in ms)
    ├── global.json                 # Mission-wide settings (speed, RTH, finish action)
    ├── 1770653566867.json          # Main mission file: waypoints + poi list
    ├── task_1770653542265.jpg      # Mission main thumbnail for Potensic Eve UI
    ├── point_1770653364152.jpg     # Thumbnails for Waypoints in Potensic Eve UI
    ├── point_1770653404823.jpg
    ├── point_1770653417852.jpg
    ├── point_1770653512308.jpg
    ├── point_1770653539697.jpg
    ├── poi_1770653390402.jpg       # Thumbnails for POIs in Potensic Eve UI
    ├── poi_1770653407306.jpg
    └── poi_1770653425134.jpg

Let’s take a look at each file in turn.

global.json

{
  "finishAction": "BACK",
  "globalHeight": 0,
  "globalHeightType": 0,
  "isOrder": true,
  "lostAction": "RETURN",
  "speed": 5.0
}

This is not an exhaustive list of all options, but I have documented the commands I have seen in the JSON:


Field What does it mean?
finishAction BACK, LAND, HOVER, RETURN
lostAction RETURN is the only option currently
speed Default mission speed in m/s
isOrder true to execute waypoints in forward order, and false to run in reverse order
globalHeight Default height, if not specified per-point elsewhere. I doubt we will use this.
globalHeightType Probably 0 = relative to takeoff? This can’t be modified in Potensic Eve, so perhaps a future feature.

<mission_id>.json

[ WAYPOINTS ] ; [ POI LIST ]
{
  "action": "START_RECORD",
  "fileName": "point_1770653364152.jpg",
  "gimbalPitch": -90,
  "gimbalType": DEFINE,
  "height": 46.1,
  "hoverTime": 0,
  "lat": 52.4553672,
  "lng": 0.302835,
  "poiHeight": 50.0,
  "poiLat": 0.0,
  "poiLng": 0.0,
  "poiType": 0,
  "speed": 5.0,
  "speedType": "GLOBAL",
  "yaw": -171,
  "yawType": DEFINE,
  "zoomRatio": 1.0,
  "zoomType": DEFINE
}

Field What does it mean?
lat, lng Combined GPS location
height Altitude relative to start point
hoverTime Pause time at waypoint (seconds)
speedType GLOBAL = use global.json value, DEFINE = per-point
speed Travel speed to next point, if using DEFINE for speedType
gimbalType DEFINE = adjust per-point, I haven’t seen a global setting yet
gimbalPitch The gimbal angle for the point, between -90 and +20
yawType DEFINE = adjust per-point, a global setting wouldn’t be much use
yaw The direction horizontally to capture an image
zoomType DEFINE or GLOBAL, as with other params
zoomRatio Adjust camera zoom. We won’t use this
action START_RECORD (video), STOP_RECORD, PHOTO, NONE
poiHeight Paired with POIs, as described below. Not relevant for us
poiLat Paired with POIs, as described below. Not relevant for us
poiLng Paired with POIs, as described below. Not relevant for us
fileName Points to a thumbnail for the Potensic Eve UI. See info below

[
  {
    "fileName": "poi_1770653390402.jpg",
    "height": 46.1,
    "lat": 52.4553676,
    "lng": 0.3028353
  },
  {
    "fileName": "poi_1770653407306.jpg",
    "height": 46.1,
    "lat": 52.4553026,
    "lng": 0.303056
  },
  {
    "fileName": "poi_1770653425134.jpg",
    "height": 46.1,
    "lat": 52.4553901,
    "lng": 0.3025566
  }
]

Photo Thumbnails

Note

As a quick aside, there is also an interesting directory present: /sdcard/Android/data/com.ipotensic.atom/files/NoFlyZone/ATOM2/json/dist

Inside this directory, we have a few files, such as CN.json, which contains no-fly geometries in China.

The JSON files are non-standard, containing keys such as type and shape, with their a single lat/lng pair and radius defined, or a polygon comprised of lat/lng pairs.

Presumably, the Potensic Atom 2 is prevented from flying in these areas by the Potensic Eve app?

I wonder if we can configure other JSON files, e.g. FR.json to add no-fly zones in say France?

Pre-Generating Waypoint Missions

So to summarise above, it seems we only really need:

Updating The drone-flightplan Python Package

I made a PR here to update the drone-flightplan Python package.

This package is used as part of DroneTM to generate waypoint missions in various drone manfacturer formats.

Testing It All Works

Additional Findings