dji-sdk / FlightRecordParsingLib

DJI Flight Record Parsing Lib
Other
37 stars 12 forks source link

Exact specifications of Flight Record Version 13? #3

Open WBawa opened 1 year ago

WBawa commented 1 year ago

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.

webhoes commented 1 year ago

following

jeryini commented 1 year ago

Would like to know this as well. Does it support new drones that are using SDK v5.x, such as Mavic 3 and M30? I'm running it on the logs from Mavic 3 and I'm getting the following exception:

./FRSample ~/Documents/DJIFlightRecord_2023-01-15_[17-38-14].txt
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)
WBawa commented 1 year ago

@jeryini Out of curiosity, are both those drones fully updated with the latest firmware?

jeryini commented 1 year ago

@WBawa just updated the M3T with the latest firmware and did a test flight but I'm still getting the same error.

webhoes commented 1 year ago

I don't think the latest firmware should be an issue. If you have older logs like from last year, that was the latest firmware at that time. All those firmwares should also work today when using the library.

jeryini commented 1 year ago

Hello @webhoes

But see my error above. Would you like me to share the Flightlog txt file with you so that you can double check?

WBawa commented 1 year ago

@jeryini I'd appreciate it if you could send that to me too.

I was talking to DJI Support, and they suggested it may be a firmware issue, but it looks like it isn't.

jeryini commented 1 year ago

@WBawa here is the flight record using the DJI Pilot 2 app using latest firmware: DJIFlightRecord2023-03-20[14-20-38].txt

Loading the file must be correct, as if I provide an invalid file to the script it returns load file failed instead of the above mentioned issue.

webhoes commented 1 year ago

Sure, we can always have a look.

Met vriendelijke groet,

Sanne

webhoes.nl | 06-25210128

Op ma 20 mrt 2023 om 11:59 schreef Jernej Jerin @.***>:

Hello @webhoes https://github.com/webhoes

But see my error above https://github.com/dji-sdk/FlightRecordParsingLib/issues/3#issuecomment-1474901360. Would you like me to share the Flightlog txt file with you so that you can double check?

— Reply to this email directly, view it on GitHub https://github.com/dji-sdk/FlightRecordParsingLib/issues/3#issuecomment-1476017066, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCYXXEHQPVGEBDZOAQ4MRLW5A2BFANCNFSM6AAAAAAVVMHPXQ . You are receiving this because you were mentioned.Message ID: @.***>

DJI-William commented 1 year ago

The file can be analyzed by our internal flight log tool, maybe there is a bug in this API.

webhoes commented 1 year ago

The file can be analyzed by our internal flight log tool, maybe there is a bug in this API.

That is the general question. Does this parser work with android created files. We can process IOS created files, but android created files report back as 'unsupported app' and other errors that are not documented.

Assuming you work for DJI, we would love to have more info about this or how to deal with these errors. Or have DJI fix them, that would be more awesome ofcourse.

DJI-William commented 1 year ago

We will definately fix this issue. All app including offcial apps and MSDK apps/whatever iOS or Android should generate the same format FlightRecord.txt for all models.

webhoes commented 1 year ago

We will definately fix this issue. All app including offcial apps and MSDK apps/whatever iOS or Android should generate the same format FlightRecord.txt for all models.

That is great to hear! Any updates on a timeline? I sent Michael some detailed error screenshots. I can sent these to you too if you like.

DJI-William commented 1 year ago

I can decode the flightRecord.txt using Mac environment, What environment you are using? image

WBawa commented 1 year ago

@jeryini @DJI-William I just figured out the issue, the generate.sh for Ubuntu is missing one of the build arguments that the Mac has. After adding it I got the same results as you William.

I will make a PR for this.

Result before: image

Results after: image

WBawa commented 1 year ago

@DJI-William just created the PR #4, if you could have your team have a look at that, that'd be great.

DJI-William commented 1 year ago

Much appreciated to @WBawa. PR has been merged, you can close this ticket now.

jeryini commented 1 year ago

Good spot @WBawa ! Many thanks for the fix, I can confirm it now works. Though there is something else now. This is the output that I got for our app using MSDK:

{"summary": {
 "platform": "Android",
 "appVersion": [
  0,
  0,
  0
 ],
 "batteriesInformation": {
  "0": {
   "index": 0,
   "firmwareVersion": [],
   "serialNumber": "4ERPKBBEA153MG"
  }
 },
 "camerasInformation": {
  "0": {
   "index": 0,
   "firmwareVersion": [],
   "serialNumber": "1TCLK7K03BJ2JW"
  }
 },
 "gimbalsInformation": {},
 "remoteControllerInformation": {
  "index": 0,
  "firmwareVersion": [],
  "serialNumber": "5YSZKB30020TSG"
 },
 "flightControllerInformation": {
  "index": 0,
  "firmwareVersion": [],
  "serialNumber": "1581F5FJD22BF00B"
 },
 "aircraftName": "dji aircraft",
 "startTime": 1679318301.392,
 "startCoordinate": {
  "latitude": 46.253275637656635,
  "longitude": 15.096627885472678
 },
 "totalDistance": 92.8,
 "totalTime": 0,
 "samplingRate": 10,
 "maxHeight": 10,
 "maxHorizontalSpeed": 5.7706151,
 "maxVirticalSpeed": 3,
 "uuid": "8eadfe6d-4efe-4187-816e-fa598f85e775",
 "productType": 118
}
, "info": {
 "frameTimeStates": [
  {
   "gimbalsState": {},
   "camerasState": {},
   "batteriesState": {}
  }
 ]
}
}

Compared to log parsed from official DJI Pilot 2 app, it's missing the following data:

Noticed even though log files are similar size, the parser output produces considerable less data for our app as witnessed above.

jeryini commented 1 year ago

Hello @DJI-William . Any new information on the above ^^ issue?

DJI-William commented 1 year ago

Weird, is this always happened when MSDK generated the flight records file?

WBawa commented 1 year ago

Hey @DJI-William, would you also be able to take a look at these problem logs for us, they're both from the M300?

DJIFlightRecord2022-11-14[15-10-29].txt DJIFlightRecord2022-11-15[11-02-17].txt

We see a decode failure when trying to decrypt these as seen below: image

DJI-William commented 1 year ago

We have no time to look at the bugs in Flight Record API currently, we are still working on MSDK now. We will come back later.

jeryini commented 1 year ago

Weird, is this always happened when MSDK generated the flight records file?

Yes, that is correct. Just tried a couple of flight and for all of them it's the same. Here are two additional flight logs for you two to check: DJIFlightRecord2023-03-31[14-05-40].txt DJIFlightRecord2023-03-31[14-20-18].txt

jotatx commented 1 year ago

How much you guys would charge to create a simple flight data parser to run in ubuntu ou win64?

because i fail to even download the docker image for the Flt Rec.

I am a researcher and it would reduce my current workload if i simply get a working parser.

cheers

jeryini commented 1 year ago

Hello @DJI-William . Any new information on the above ^^ issue?

Hello @DJI-William . Is there any updates on this issue?

Also the following:

The file can be analyzed by our internal flight log tool, maybe there is a bug in this API.

We will definately fix this issue. All app including offcial apps and MSDK apps/whatever iOS or Android should generate the same format FlightRecord.txt for all models.

So if I take the .txt flight logs from our app and put it into DJI Pilot 2 folder where it stores own .txt flight logs, they should appear in the DJI Pilot 2 Settings -> Flight record tool? The last time we tried this our logs were not shown in the DJI Pilot 2 flight record section. But we did see the compact logs under UAV Health management system -> Manage logs without having to copy them to the Pilot 2 app folder.