Coder Social home page Coder Social logo

flightrecordparsinglib's People

Contributors

danlongchen avatar feelfeng avatar wahidbawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flightrecordparsinglib's Issues

Docker Error Build Step 7

i have a trouble when docker build step 7 RUN sh generate.sh

[7/7] RUN sh generate.sh:
0.306 Which do you want to build? Please Input the number:
0.544 -- The C compiler identification is GNU 5.4.0
0.651 -- The CXX compiler identification is GNU 5.4.0
0.658 -- Check for working C compiler: /usr/bin/cc
0.708 -- Check for working C compiler: /usr/bin/cc -- works
0.709 -- Detecting C compiler ABI info
0.751 -- Detecting C compiler ABI info - done
0.755 -- Detecting C compile features
0.879 -- Detecting C compile features - done
0.883 -- Check for working CXX compiler: /usr/bin/c++
0.932 -- Check for working CXX compiler: /usr/bin/c++ -- works
0.933 -- Detecting CXX compiler ABI info
1.003 -- Detecting CXX compiler ABI info - done
1.006 -- Detecting CXX compile features
1.160 -- Detecting CXX compile features - done
1.164 CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
1.164 Could NOT find CURL (missing: CURL_INCLUDE_DIR)
1.164 Call Stack (most recent call first):
1.164 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
1.164 /usr/share/cmake-3.5/Modules/FindCURL.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
1.164 CMakeLists.txt:14 (find_package)
1.164
1.164
1.165 -- Configuring incomplete, errors occurred!
1.165 See also "/parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample/CMakeFiles/CMakeOutput.log".
1.168 make: *** No targets specified and no makefile found. Stop.

Dockerfile:14

12 |
13 | WORKDIR /parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample
14 | >>> RUN sh generate.sh
15 |
16 | ENTRYPOINT ["./FRSample"]

ERROR: failed to solve: process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 2

Parsing Older Flight Records?

Is there a way to parse older flight records?

I got the parser to work for recent flight records, but for older flight records (one from 2020-10-10), I am unable to. Is there another tool for this, thanks.

throw exception when run it in docker.

OS ubuntu 22.04
kernel version : 5.19.0-32-generic #33~22.04.1-Ubuntu
docker version: 23.0.2
docker run log:

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid

Terminate with error 134

Terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)

dji-flightrecord-kit/build/Ubuntu/FRSample/FRSample DJI.txt > output.json

Ubuntu 18.04.6 LTS

Any reason there isn't a build available for Windows?

I mean, there are a LOT of Windows users out there.
I'm pretty sure not all DJI drone users are MacOS or Ubuntu users.
Oddly, most of the third party parts include Visual Studio solution files, just none of the DJI parts.

If I port it to Windows, would DJI be interested in including it?

Docker Build on Ubuntu FAILS!

Guess someone left out some stuff in the docker file!

11 1.197 CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
11 1.197 Could NOT find CURL (missing: CURL_INCLUDE_DIR)
11 1.197 Call Stack (most recent call first):
11 1.197 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
11 1.197 /usr/share/cmake-3.5/Modules/FindCURL.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
11 1.197 CMakeLists.txt:14 (find_package)
11 1.197
11 1.197
11 1.197 -- Configuring incomplete, errors occurred!
11 1.197 See also "/parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample/CMakeFiles/CMakeOutput.log".
11 1.200 make: *** No targets specified and no makefile found. Stop.

process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 2

DJI Avata Camera Proto

Thanks for this great repo!
I'm trying to parse DJI Avata's FR. I can parse the majority of the record.
"camerasState" stays the same throughout the record.
Is there a new proto for Avata's camera?

Mini 3 Pro missing data

Hi. I am processing the .txt file of my recent mini 3 pro but when using the FRSample progam I do not obtain much information. Is there a way to decode .txt files for mini 3 series?

Here is the flight information I obain. When I use a online program like (https://www.phantomhelp.com/) it works great. However, i do not want to depend on thrid-parties

{"summary": {
"platform": "Android",
"appVersion": [
0,
0,
0
],
"batteriesInformation": {
"0": {
"index": 0,
"firmwareVersion": [],
"serialNumber": "52XXKBEDG00051"
}
},
"camerasInformation": {
"0": {
"index": 0,
"firmwareVersion": [],
"serialNumber": "53HFL210M6051U"
}
},
"gimbalsInformation": {},
"remoteControllerInformation": {
"index": 0,
"firmwareVersion": [],
"serialNumber": "396CHAL0014MG2"
},
"flightControllerInformation": {
"index": 0,
"firmwareVersion": [],
"serialNumber": "1581F4XFA234EML7"
},
"aircraftName": "DJI Mini 3 Pro",
"startTime": 1706690503.141,
"startCoordinate": {
"latitude": 37.91443959555977,
"longitude": -4.7187935540944519
},
"totalDistance": 184.8,
"totalTime": 0,
"samplingRate": 10,
"maxHeight": 99,
"maxHorizontalSpeed": 10.511898,
"maxVirticalSpeed": 5,
"uuid": "",
"productType": 103
}
, "info": {
"frameTimeStates": [
{
"gimbalsState": {},
"camerasState": {},
"batteriesState": {}
}
]
}
}

M300 second battery serial number is empty

Currently, the library returns 2 batteries but only one has a serial number on a M300.
Latest firmware & FlightRecordParsingLib version was used.
We changed the batteries 3 times (6 batteries in summary) and each time only one serial number was returned, the other one was always empty.

Here a sample:

"summary": {
 "platform": "Android",
 "appVersion": [
  4,
  0,
  64
 ],
 "batteriesInformation": {
  "1": {
   "index": 1,
   "firmwareVersion": [
    1,
    2,
    5,
    44
   ],
   "serialNumber": ""
  },
  "0": {
   "index": 0,
   "firmwareVersion": [
    1,
    2,
    5,
    44
   ],
   "serialNumber": "1Z6PJAGFA200DK"
  }
 },
 "camerasInformation": {
  "0": {
   "index": 0,
   "firmwareVersion": [
    7,
    0,
    1,
    5
   ],
   "serialNumber": "1W8DK180010P8R"
  }
 },
 "gimbalsInformation": {
  "0": {
   "index": 0,
   "firmwareVersion": [
    1,
    0,
    17,
    23
   ],
   "serialNumber": ""
  }
 },
 "remoteControllerInformation": {
  "index": 0,
  "firmwareVersion": [
   7,
   0,
   1,
   1
  ],
  "serialNumber": "1ZMBJC300301FL"
 },
 "flightControllerInformation": {
  "index": 0,
  "firmwareVersion": [
   3,
   4,
   18,
   29
  ],
  "serialNumber": "1ZNBJCG00C00CC"
 },
 "aircraftName": "M300 RTK",
 "startTime": 1695813408.98,
 "startCoordinate": {
  "latitude": 53.783923902643657,
  "longitude": 10.003720877745938
 },
 "totalDistance": 88.883934,
 "totalTime": 292.89990234375,
 "samplingRate": 10,
 "maxHeight": 7.6,
 "maxHorizontalSpeed": 4.06078815,
 "maxVirticalSpeed": 4.5,
 "uuid": "",
 "productType": "Matrice300RTK"
}

Here are 2 logs to reproduce that issue:
DJIFlightRecord_2023-09-27_[13-16-48].txt
DJIFlightRecord_2023-09-27_[11-59-49].txt

Compile error on Ubuntu

Hello!

  • Branch used both master and sdk_releases/1.0.3.

When running sh generate.sh on Ubuntu to compile the program, I'm getting the following error:

[ 72%] Building CXX object StandardizationCppBuild/StandardizationBuild/CMakeFiles/FlightRecordStandardization.dir/model/common/fr_standardization_common.cpp.o
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp: In constructor ‘DJIFR::standardization::Buffer::Buffer(void*, size_t)’:
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:88:18: error: ‘malloc’ was not declared in this scope
   88 |     void *temp = malloc(length);
      |                  ^~~~~~
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:10:1: note: ‘malloc’ is defined in header ‘<cstdlib>’; did you forget to ‘#include <cstdlib>’?
    9 | #include <string.h>
  +++ |+#include <cstdlib>
   10 | 
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp: In lambda function:
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:91:9: error: ‘free’ was not declared in this scope
   91 |         free(ptr);
      |         ^~~~
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:91:9: note: ‘free’ is defined in header ‘<cstdlib>’; did you forget to ‘#include <cstdlib>’?
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp: In constructor ‘DJIFR::standardization::Buffer::Buffer(size_t)’:
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:97:18: error: ‘calloc’ was not declared in this scope
   97 |     void *temp = calloc(length, 1);
      |                  ^~~~~~
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp: In lambda function:
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:99:9: error: ‘free’ was not declared in this scope
   99 |         free(ptr);
      |         ^~~~
/home/jernej/git/FlightRecordParsingLib/dji-flightrecord-kit/source/FlightRecordStandardization/model/common/fr_standardization_common.cpp:99:9: note: ‘free’ is defined in header ‘<cstdlib>’; did you forget to ‘#include <cstdlib>’?
make[2]: *** [StandardizationCppBuild/StandardizationBuild/CMakeFiles/FlightRecordStandardization.dir/build.make:146: StandardizationCppBuild/StandardizationBuild/CMakeFiles/FlightRecordStandardization.dir/model/common/fr_standardization_common.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:209: StandardizationCppBuild/StandardizationBuild/CMakeFiles/FlightRecordStandardization.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Dockerfile error - sh: 0: Can't open generate.sh

I am trying to run it on docker. However, here the error.

[+] Building 37.8s (11/11) FINISHED                                                                      docker:default
 => [internal] load .dockerignore                                                                                  0.2s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load build definition from Dockerfile                                                               0.2s
 => => transferring dockerfile: 385B                                                                               0.0s
 => [internal] load metadata for docker.io/library/ubuntu:16.04@sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3  0.1s
 => [1/7] FROM docker.io/library/ubuntu:16.04@sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3468cae6835c9f4eae2  0.0s
 => [internal] load build context                                                                                  3.2s
 => => transferring context: 2.38MB                                                                                2.3s
 => CACHED [2/7] RUN apt-get update                                                                                0.0s
 => CACHED [3/7] RUN apt-get install -y wget git gcc g++ make cmake                                                0.0s
 => CACHED [4/7] WORKDIR /parse_flyrecord                                                                          0.0s
 => [5/7] COPY . .                                                                                                33.7s
 => [6/7] WORKDIR /dji-flightrecord-kit/build/Ubuntu/FRSample                                                      0.1s
 => ERROR [7/7] RUN sh generate.sh                                                                                 0.4s
------
 > [7/7] RUN sh generate.sh:
0.324 sh: 0: Can't open generate.sh
------
Dockerfile:14
--------------------
  12 |
  13 |     WORKDIR /dji-flightrecord-kit/build/Ubuntu/FRSample
  14 | >>> RUN sh generate.sh
  15 |
  16 |     ENTRYPOINT ["./FRSample"]
--------------------
ERROR: failed to solve: process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 127

Docker - Large files not finishing parsing

I have several large .txt files that don't seem to finish parsing before the docker command is done.

They seem to end at about the 1,954,825 line mark. Give or take 25 or so lines.

This is the end of one:

"camerasState": {
    "0": {
     "isRecording": false,
     "isShootingSinglePhoto": false,
     "isInserted": true,
     "isInitializing": false,
     "hasError": false,
     "isVerified": true,
     "isFull": true,
     "isFormatted": true,
     "isForm

FlightRecord: Altitude resolution, RTK accuracy and samplingRate

Dear DJI Developer Team,

I would like to request some information regarding the following questions:

  1. Is it possible to extract the FlightRecord information with a samplingRate faster than 10 Hz? For the Matrice 300, the internal TimeSync should provide most of the included information with at least 50Hz.

  2. Can the flightRecord parser extract information
    a) Whether the drone was using RTK-Network corrected coordinates to navigate.
    b) Whether the stored "aircraftLocation" variable uses this more accurate position.

  3. Could you provide a fix, so that the altitude variable not only contains one decimal place, but uses the available RTK-network corrected altitude which should have an accuracy of around 0.02m and an even better resolution.

Best regards and thanks in advance
David

Error on latest Ubuntu

Following the instructions for building/running the FRSample application on Ubuntu and then running the following command:

./FRSample DJIFlightRecord.txt

Gives me the following error:

matthew@Ubuntu-VM:~/Desktop/FlightRecordParsingLib-master/dji-flightrecord-kit/build/Ubuntu/FRSample$ ./FRSample DJIFlightRecord.txt
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string: construction from null is not valid
Aborted (core dumped)

I've replaced the SDK_KEY with my app key in main.cc as well.

Docker run gives load file failed

Hello,

I am trying to run the application via Docker with the following command:

docker run pf -it -v $(pwd):/tmp "DJIFlightRecord_CC.txt"

But I always get the error:

load file failed

Am I doing something wrong ?

Thank you for your support.

Exact specifications of Flight Record Version 13?

Hi, we were wondering what the exact specifications/limitations were of Flight Record 13.

What apps does it accept logs from? What drones are supported? Is there a plan to eventually have 100% coverage for all log and drone types?

Thanks.

How to get log file

Hi. I would like to know how to retrieve a log using my custom application written using the DJI SDK. Currently, using the GetLogPath function, I can only obtain a .dat file. Is there any way I can somehow obtain a file with the .txt extension?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.