dji-sdk / FlightRecordParsingLib

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

I don't receive some information in the Logs #29

Closed camargoz closed 3 weeks ago

camargoz commented 2 months ago

When decrypting the Logs I receive various information about the Flight, however two crucial pieces of information are not found, such as the RC Joystick data and the notifications generated during the Flight. I see that the options for obtaining this data are listed in the library, but when I decode they are not returned.

Does anyone know how I can fix this, or if there is any other problem I may be having with the SDK Key.

OBS: I've already done the test with the Drones: Mini 4 Pro, Mavic 3 Interprise/Classic, Matrice30, Air 2s, Mini 3, Avata, Mini 2 / SE, M300 RTK, Air 3 and Mavic Mini.

{
      "flightControllerState": {
        "attitude": {
          "pitch": -23,
          "roll": -14,
          "yaw": -968
        },
        "aircraftLocation": {},
        "flightMode": "GPSAtti",
        "satelliteCount": 11,
        "smartRTHState": "Unknown",
        "behavior": "GoHome",
        "areMotorsOn": true,
        "windWarning": "Unknown",
        "countOfFlights": 1,
        "velocity": {}
      },
      "cameraState": {
        "isInserted": true,
        "isVerified": true,
        "isFull": true,
        "isFormatted": true,
        "totalSpaceInMB": 2029,
        "remainingSpaceInMB": 1407,
        "availableCaptureCount": 53
      },
      "gimbalState": {
        "atitude": {
          "yaw": -82
        },
        "yawRelativeToAircraftHeading": -0.40000000596046448,
        "mode": "YawFollow"
      },
      "batteryState": {
        "voltage": 8330,
        "current": -952,
        "temperature": 27.200000000000003,
        "chargeRemainingInPercent": 99,
        "lowBatteryWarningThreshold": -1,
        "seriousLowBatteryWarningThreshold": -1,
        "index": -1,
        "lifetimeRemaining": 10,
        "designCapacity": 985600,
        "numberOfDischarges": 512,
        "fullChargeCapacity": 3710,
        "chargeRemaining": 3653
      },
      "airLinkState": {},
      "visionState": {
        "controlState": {}
      },
      "gimbalsState": {
        "0": {
          "atitude": {
            "yaw": -82
          },
          "yawRelativeToAircraftHeading": -0.40000000596046448,
          "mode": "YawFollow"
        }
      },
      "camerasState": {
        "0": {
          "isInserted": true,
          "isVerified": true,
          "isFull": true,
          "isFormatted": true,
          "totalSpaceInMB": 2029,
          "remainingSpaceInMB": 1407,
          "availableCaptureCount": 53
        }
      },
      "batteriesState": {
        "0": {
          "voltage": 8330,
          "current": -952,
          "temperature": 27.200000000000003,
          "chargeRemainingInPercent": 99,
          "lowBatteryWarningThreshold": -1,
          "seriousLowBatteryWarningThreshold": -1,
          "index": -1,
          "lifetimeRemaining": 10,
          "designCapacity": 985600,
          "numberOfDischarges": 512,
          "fullChargeCapacity": 3710,
          "chargeRemaining": 3653
        }
      }
    }
dji-lyt commented 2 months ago

Could you please clarify what you mean by the library providing this option? FlightRecordParseLib does not have the functionality to retrieve remote control joystick and notification information.

camargoz commented 1 month ago

@dji-lyt

It has, because this functionality is referenced a few times in the code, where you can even find something about it in the file dji-flightrecord-kit/source/FlightRecordStandardizationCpp/model/MobileRC/FRMobileRCModelProto.pb.cc, in this file it references the Joystick.

Example of a function in this file that refers to the Joystick: image

dji-dev commented 1 month ago

Agent comment from yating.liao in Zendesk ticket #107244:

There is indeed a data model for stick state in the repository, but the current version does not have parsing functionality.

Could you please inform us of what you need the joystick data and notifications for?

°°°

camargoz commented 1 month ago

I would like this data so that I can analyze my clients' flights, so that I can know the causes of an accident or crash.

dji-dev commented 1 month ago

Agent comment from yating.liao in Zendesk ticket #107244:

Could you provide more details on why you would like to analyze the aircraft accidents? What types of accidents do you wish to analyze?

If there are any abnormalities during the flight of the aircraft, users can actually contact DJI for accident analysis.

°°°

camargoz commented 1 month ago

My clients control the flights of their fleets, where they have some pilots, and they often like to know how their pilot did the flight, so they can better evaluate their pilots, so this data is very important for this. Do you know when you intend to add this functionality? or is there something I can do to get this data when I use the parse library?

dji-dev commented 1 month ago

Agent comment from yating.liao in Zendesk ticket #107244:

I am currently unsure if FlightRecordParsingLib will add this feature, but I will gather the scenarios where you would use this feature and provide feedback to the relevant team for evaluation.

°°°

camargoz commented 1 month ago

Thank you for your help

dji-dev commented 1 month ago

Agent comment from yating.liao in Zendesk ticket #107244:

I am glad to be able to help you.

°°°

lvauvillier commented 3 weeks ago

Hey @camargoz, for some models, the RC data can be extracted from the RemoteControllerDisplayField record type.

I was able to decode it (aileron, elevator, throttle, rudder, gimbal) using my own library: https://github.com/lvauvillier/dji-log-parser

Here is the commit containing the RemoteControllerDisplayField frame binary layout if someone wants to make a PR for this library: https://github.com/lvauvillier/dji-log-parser/commit/2a961e299546678e17e9e048518609d547c100b5

camargoz commented 3 weeks ago

Thank you @lvauvillier . I'll definitely take a look, if I can help with anything I'll be happy to help!

Marcello09 commented 1 week ago

I also need to parse rc controller logs so I can recreate our pilot movement. Many incidents occour due to pilot error, and I need this info to create a document that help me point out what lead to an incident.