Skip to content

Commit

Permalink
update to v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.chen committed Mar 9, 2023
1 parent b5f1992 commit 6984fda
Show file tree
Hide file tree
Showing 2,144 changed files with 527,712 additions and 834,256 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:16.04@sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3468cae6835c9f4eae23ff7

ARG SDK_KEY
ENV SDK_KEY=${SDK_KEY}

RUN apt-get update
RUN apt-get install -y wget git gcc g++ make cmake

WORKDIR /parse_flyrecord

COPY . .

WORKDIR /parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample
RUN sh generate.sh

ENTRYPOINT ["./FRSample"]
314 changes: 310 additions & 4 deletions LICENSE.txt

Large diffs are not rendered by default.

25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Flight record parsing library can parse version 13 flight log files. Convert DJI

* FRSample: Used to introduce how to call interfaces and parse data
* FlightRecordStandardizationCpp: Used to convert C++ structure objects into Protobuf objects for cross-platform data transfer
* FlightRecordStandardization: Record the raw data in 10 HZ, and present a view model of aircraft status
* FlightRecordStandardization: Used to record the raw data in 10 HZ, and present a view model of aircraft status
* FlightRecordEngine: Used to parse cryptographic data to plaintext data
* libtomcrypt/libtommath: Used to decrypt original documents
* curl/openssl: Used to communicate with DJIService to get the decryption key
Expand All @@ -26,7 +26,7 @@ Here is an introduction to the role of file directories:
* FR-V1.0.0/third-party/source: Source files storage location of the dependent third-party platform libraries. The specific compilation method needs to be solved by yourself.
* FR-V1.0.0/third-party/header: Header files storage location of the dependent third-party platform libraries
* FR-V1.0.0/third-party/cmake: For CMake to compile custom functions
* FR-V1.0.0/third-party/build: Used to store compiled products of third-party libraries, and it can only run on certain platforms
* FR-V1.0.0/third-party/build: Storage location of compiled products of third-party libraries, and it can only run on certain platforms
* FR-V1.0.0/dji-flightrecord-engine/build: Compilation products for each platform used to house the dji-flightrecordengine library
* FR-V1.0.0/dji-flightrecord-engine/source: Source code for the dji-flightrecordengine library
* FR-V1.0.0/dji-flightrecord-kit/build: Compilation products for each platform used to house the dji-flightrecord-kit library
Expand All @@ -36,6 +36,25 @@ Here is an introduction to the role of file directories:

## How to run the sample?

### Running the sample in Docker
**Get docker**

https://docs.docker.com/get-docker

**Build docker image**
```shell
docker build --build-arg SDK_KEY=your_sdk_key -t pf .
```

**Docker run**
```shell
docker run -v host_dir:container_dir -it pf "container_flight_record_dir"
```
Sample code:
docker run -v $(pwd):/tmp -it pf "/tmp/V132_DJIFlightRecord_2020-06-18_[19-01-24].txt" > json_result.json

"> json_result.json" Redirecting the running result to a specified file

### Running the Sample in Mac

Here is the Mac version of the Sample run creation process.
Expand All @@ -53,7 +72,7 @@ sh generate.sh
2. Go to the main.cc file and configure the path of the file you want to parse to the variable file_path
3. Configure the sdk key parameter of the 'startRequestParser' interface and you are able to parse the file for the version of Flight Record 13

### Runing the sample in Ubuntu
### Running the sample in Ubuntu

```shell
cd dji-flightrecord-kit/build/Ubuntu/FRSample
Expand Down
23 changes: 21 additions & 2 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## 该应用程序在哪里创建版本 13 的飞行记录日志?

使用 Mobile SDK 4.12 版本的应用程序
使用 Mobile SDK 4.12 版本的应用程序


## 架构关系
Expand Down Expand Up @@ -37,9 +37,28 @@

## 如何运行示例代码?

### 在 Docker 上运行示例代码
**下载 Docker**

https://docs.docker.com/get-docker

**创建 Docker 镜像**
```shell
docker build --build-arg SDK_KEY=your_sdk_key -t pf .
```

**运行 Docker**
```shell
docker run -v 宿主机目录:容器目录 -it pf "容器内的飞行记录文件路径"
```
命令示例:
docker run -v $(pwd):/tmp -it pf "/tmp/V132_DJIFlightRecord_2020-06-18_[19-01-24].txt" > json_result.json

"> json_result.json" 将运行结果重定向到指定文件中

### 在 Mac 上运行示例代码

以下是 Mac 版本的 Sample 运行创建过程
以下是 Mac 版本的 Sample 运行创建过程

```shell
cd dji-flightrecord-kit/build/Mac/FRSample
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
platform="Ubuntu"
sourceFolder="../../../source/FlightRecordStandardizationCpp"

echo "Which do you want to build? Please Input the number: "

cmake -D platform=${platform} -DENABLE_SHARED_LIB=false ${sourceFolder}
make

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6984fda

Please sign in to comment.