Layout¶
Binary format parsing: file header, flight metadata, and auxiliary blocks.
Prefix¶
Prefix
dataclass
¶
Log file header containing version and offset information.
Binary layout (100 bytes, little-endian)::
detail_offset : u64
detail_length : u16
version : u8
unknown : u8
encrypt_magic : u64
reserved : [u8; 80]
Details¶
Details
dataclass
¶
Details(sub_street: str = '', street: str = '', city: str = '', area: str = '', is_favorite: bool = False, is_new: bool = False, needs_upload: bool = False, record_line_count: int = 0, detail_info_checksum: int = 0, start_time: datetime = (lambda: datetime(1970, 1, 1, tzinfo=(timezone.utc)))(), longitude: float = 0.0, latitude: float = 0.0, total_distance: float = 0.0, total_time: float = 0.0, max_height: float = 0.0, max_horizontal_speed: float = 0.0, max_vertical_speed: float = 0.0, capture_num: int = 0, video_time: int = 0, moment_pic_longitude: list[float] = (lambda: [0.0] * 4)(), moment_pic_latitude: list[float] = (lambda: [0.0] * 4)(), take_off_altitude: float = 0.0, product_type: ProductType = ProductType.NONE, aircraft_name: str = '', aircraft_sn: str = '', camera_sn: str = '', rc_sn: str = '', battery_sn: str = '', app_platform: Platform = (lambda: Platform(0))(), app_version: str = '')
Flight metadata parsed from the log Details header block.
These values are written by the DJI app at the end of a flight and are
available without decryption. Most are reliable; total_distance,
capture_num, and video_time are notable exceptions — see their
field notes below.
total_distance
Converted from the binary header (stored as kilometres, exposed
here in metres). Reasonably accurate in most logs — verified
against frame-computed cumulative_distance across 440+ flights
with a consistent 1:1 ratio. A small number of logs carry stale
or cumulative values from previous flights. The DJI C++ reference
library ignores this field and recomputes from the GPS track, so
prefer FrameOSD.cumulative_distance from the last decoded frame
when decrypted records are available.
capture_num
As stored in the binary header. The DJI Fly app does not populate
this field — it is always 0 across all tested aircraft (Mavic Air 2,
Mini 4 Pro). Per-frame photo events are available via
FrameCamera.is_photo in the decrypted record stream.
video_time
Raw value from the binary header. This is not the per-flight
recording duration — the ratio to actual in-frame recording time
ranges from 1x to over 100x with no consistent unit. The DJI C++
reference library does not use it. Per-frame recording state is
available via FrameCamera.is_video in the decrypted record
stream.
from_bytes
classmethod
¶
Parse a Details block from data according to log version.
ProductType¶
ProductType ¶
Platform¶
Platform ¶
Bases: IntEnum
App platform that recorded the log.
AuxiliaryInfo¶
AuxiliaryInfo
dataclass
¶
Auxiliary Info block (magic 0): contains XOR-encrypted Details data.
AuxiliaryVersion¶
AuxiliaryVersion
dataclass
¶
Auxiliary Version block (magic 1): department and version metadata.
from_bytes
classmethod
¶
Parse version block from raw bytes.
Department¶
Department ¶
Bases: IntEnum
DJI department that produced the log.