lvauvillier / dji-log-parser

A library to parse records from DJI .txt logs
MIT License
9 stars 5 forks source link

OSD data parsed incorrectly #8

Closed pqvst closed 3 weeks ago

pqvst commented 1 month ago

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

lvauvillier commented 3 weeks ago

Fixed. Thanks @pqvst