Coder Social home page Coder Social logo

dji-log-parser's People

Contributors

hut8 avatar lvauvillier avatar wiseman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hut8 wiseman

dji-log-parser's Issues

OSD data parsed incorrectly

I have a flight log that is producing gibberish data. I have tested with PhantomHelp, and that is able to parse the data correctly ๐Ÿค”

Here is some sample output:

{
  longitude: 2.5403599960839037e-220,
  latitude: 9.746796079499643e+238,
  altitude: -1541.7,
  speedX: 242.5,
  speedY: 2659.7,
  speedZ: -1858.4,
  pitch: -14.3,
  roll: -2462.2,
  yaw: -2964,
  flightMode: 'ForceLanding',
  rcOutcontrol: true,
  appCommand: 155,
  canIocWork: true,
  groundOrSky: 'Ground',
  isMotorUp: true,
  isSwaveWork: true,
  goHomeStatus: 7,
  isVisionUsed: false,
  voltageWarning: 0,
  isImuPreheated: false,
  modeChannel: 1,
  isGpsValid: true,
  isCompassError: false,
  waveError: false,
  gpsLevel: 0,
  batteryType: 3,
  isOutOfLimit: true,
  isGoHomeHeightModified: false,
  isPropellerCatapult: false,
  isMotorBlocked: true,
  isNotEnoughForce: true,
  isBarometerDeadInAir: true,
  isVibrating: true,
  isAcceletorOverRange: false,
  gpsNum: 217,
  flightAction: 57,
  motorStartFailedCause: 207,
  nonGpsCause: 14,
  waypointLimitMode: true,
  battery: 118,
  sWaveHeight: 236,
  flyTime: 3007.6,
  motorRevolution: 108,
  version: 134,
  droneType: 36,
  imuInitFailReason: 139
}
{
  longitude: 574535442034980700,
  latitude: -7.092340267382283e+183,
  altitude: -329.2,
  speedX: -610.3,
  speedY: 2028.4,
  speedZ: 2069.8,
  pitch: -1368.6,
  roll: -3130.8,
  yaw: -2317.3,
  flightMode: 'GentleGPS',
  rcOutcontrol: false,
  appCommand: 235,
  canIocWork: true,
  groundOrSky: 'Sky',
  isMotorUp: false,
  isSwaveWork: true,
  goHomeStatus: 'Cruise',
  isVisionUsed: true,
  voltageWarning: 1,
  isImuPreheated: true,
  modeChannel: 1,
  isGpsValid: false,
  isCompassError: false,
  waveError: false,
  gpsLevel: 7,
  batteryType: 'Smart',
  isOutOfLimit: true,
  isGoHomeHeightModified: true,
  isPropellerCatapult: false,
  isMotorBlocked: true,
  isNotEnoughForce: false,
  isBarometerDeadInAir: false,
  isVibrating: false,
  isAcceletorOverRange: false,
  gpsNum: 129,
  flightAction: 'None',
  motorStartFailedCause: 212,
  nonGpsCause: 'SpeedErrorLarge',
  waypointLimitMode: false,
  battery: 36,
  sWaveHeight: 232,
  flyTime: 5782.8,
  motorRevolution: 255,
  version: 231,
  droneType: 'N3',
  imuInitFailReason: 190
}

@lvauvillier I'll share the flight log with you privately

Missing record types

While processing some M3E flight logs, I found the following record types to be unhandled. I have noted the FlightRecordDataType from the DJI FlightRecordParsingLib repo.

I also noticed that the output I get is missing some key data (e.g. RC, BATTERY, WEATHER), but they are present in the output I get from PhantomHelp.

  • 10: ShowWarningFlightRecordDataType
  • 17: VisionGroupDataType
  • 45: RTKDifferenceDataType
  • 48: AgricultureGroundStationPushData
  • 55: npzeXkozKlNHPjUQ
  • 57: GOAirLinkDataField
  • 62: RemoteControllerDisplayField
  • 63: FlightControllerCommonOSDField

I believe 55 might contain battery information, but I haven't had any luck decoding it.

called `Option::unwrap()` on a `None` value

I'm still trying to recursively process that very large dataset... seeing this one now.

thread 'main' panicked at src/main.rs:290:91:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/panicking.rs:127:5
   3: core::option::Option<T>::unwrap
             at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/option.rs:931:21
   4: dji_log_parser::main
             at /media/kfinisterre/bdb99222-a06f-476b-ae0c-a4110a7ef82e/dji-log-parser/src/main.rs:290:31
   5: core::ops::function::FnOnce::call_once
             at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Error: failed to fill whole buffer

Same dataset as before... a few files trigger this error. Any idea what may cause it?

thread 'main' panicked at src/main.rs:46:45:
Unable to parse file: InfoParseError("\n โ•บโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”… Backtrace โ”…โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•ธ\n\n 0: \u{1b}[1m\u{1b}[1mError: failed to fill whole buffer\u{1b}[22m\n \u{1b}[1mWhile parsing field 'app_version' in Info\u{1b}[22m\u{1b}[22m\n at src/layout/info.rs:79\n\n โ•บโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•ธ\n\n")
stack backtrace:
0: rust_begin_unwind
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1bpo0/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1
bpo0/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1bpo0/library/core/src/result.rs:1653:5
3: core::result::Result<T,E>::expect
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1
bpo0/library/core/src/result.rs:1034:23
4: dji_log_parser::main
at /media/kfinisterre/bdb99222-a06f-476b-ae0c-a4110a7ef82e/dji-log-parser/src/main.rs:46:18
5: core::ops::function::FnOnce::call_once
at /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

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.