DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Infos about .dat file and correlation between csv and .dat MAVIC AIR 2

PilotNovel

Active Member
Joined
Oct 3, 2022
Messages
28
Reactions
1
Age
33
Location
Italy
I was looking at .dat file and I did a query (searching for VelN) and I got these columns-> ['IMU_ATTI(0):velN', 'IMUCalcs(0):velN:C', 'IMUCalcs(0):diffVelN:C', 'IMU_ATTI(1):velN', 'IMUCalcs(1):velN:C', 'IMUCalcs(1):diffVelN:C']
But only IMU_ATTI(0):velN and IMU_ATTI(1):velN have number values. The other columns contain only NaN.
What is the different between (0) and (1)?

Another question is concerning the correlatation between .dat and .txt files.
I would like to merge .dat feature together with .txt ones (flight by flight)? I was thinking to merge them using timestamp but the .dat file only has "clock". Moreover there are more rows into .dat file compared to .txt. For getting the .dat file related to a flight I created a script which extracts only value of motors > 0 and I split into different files. Doing so I can easily extract .dat features related for each flight.
Any suggesion is very useful! Thank you
 
I'm not sure, but as the Mavic Air 2 has only one IMU on board, it is probably two slightly different readings from the same IMU.
Thank you for the answer, all answers are useful! I will check it then.
What about to join "raw data" from .dat file togerther with .txt files? Any suggestion?
It would be very very very awesome to know it.
 
Last edited:
What information in the DAT are you seeking that is not in the .txt flight log?
From where, screen device or drone, are you getting this DAT and how are you able to see column titles?
 
What information in the DAT are you seeking that is not in the .txt flight log?
From where, screen device or drone, are you getting this DAT and how are you able to see column titles?
I would like to join the Rotors' values with the e .txt files.
I need for some (maybe useless) purposes. However I need also the other features presented in the .txt files
 
For that, I would output/create the csv's of the .txt and DAT then copy and paste the 4 motor speed AND the time stamp columns from the DAT's csv into the .txt's csv.
You then would have to possibly manual sort the rows into matching timestamps. I have just had a look at that with a pair of logs from a Mavic Mini. I am not certain I chose an appropriate time stamp column from the DAT's csv but it looks like matching the time stamps from my pair of logs would be a tedious process of shifting successive segments of the DAT down the csv so that the timestamps match.

But which DAT are using and how are you processing it?
 
  • Like
Reactions: PilotNovel
For that, I would output/create the csv's of the .txt and DAT then copy and paste the 4 motor speed AND the time stamp columns from the DAT's csv into the .txt's csv.
You then would have to possibly manual sort the rows into matching timestamps. I have just had a look at that with a pair of logs from a Mavic Mini. I am not certain I chose an appropriate time stamp column from the DAT's csv but it looks like matching the time stamps from my pair of logs would be a tedious process of shifting successive segments of the DAT down the csv so that the timestamps match.

But which DAT are using and how are you processing it?
I processed both files with CsvView.
Actually I thought to have the same number of rows into both txt and dat csv but this not happen. DAT one has more rows than .txt...
In particualr I'm using the DAT of the DJI Application, the one into the MCDatFlightRecords folder. For what I get, the other one .dat file is encrypted (for Mavic Air 2).
 
And another very important question is:
are OSD.pitch, OSD.roll and OSD.yaw measured in degree? If so.. are they calculated according the "normal" position that is the following one?
639px-Yaw_Axis.svg.png
 
The DATs record from drone switch-on to drone switch-off, the .txt records whilst the motors are running.
So, providing they record at the same time interval the DAT should have more lines than the .txt. However in the pair I looked at the time intervals differed with, from memory, the DAT's interval being bigger than the .txt's .... which I thought was rather strange.
When it appeared that I would have to make lots adjustment to match the two sets of data I gave up so I do not know how 'deep' into the DAT the time interval difference extended.

If it's the same with you data matching up time stamps might become a rather time consuming process.
 
Last edited:
  • Like
Reactions: PilotNovel
I believe the angle to be measured in degrees. @sar104 etc. might have talked about some other unit in connection with internal data processing but his/their level of understand is FAR beyond mine.
As to what is their base line position for zeros, I am not sure. The axes are as you depict them but with regards to roll and pitch I can never remember which way is +ve and which is -ve.
 
Last edited:
  • Like
Reactions: PilotNovel
The DATs record from drone switch-on to drone switch-off, the .txt records whilst the motors are running.
So, providing they record at the same time interval the DAT should have more lines than the .txt. However in the pair I looked at the time intervals differed with, from memory, the DAT's interval being bigger than the .txt's .... which I thought was rather strange.
When it appeared that I would have to make lots adjustment to match the two sets of data I gave up so I do not know how 'deep' into the DAT the time interval difference extended.

If it's the same with you data matching up time stamps might become a rather time consuming process.
Thank you for both answers.
Actually I made a very basic python script where I split the initial .dat file according to the following rules:
1) I check where the first value of motor is not 0 (meaning it starts - .txt file should start recording here)
2) I record all the rows
3) I stop recording when I match the next 0 (meaning motors switch off - .txt file should stop recording here)
Doing so they should match but in the .dat file there are more rows.

I think they are calculated in degree as well but a confermation would be appreciated!
 

DJI Drone Deals

New Threads

Members online

Forum statistics

Threads
134,481
Messages
1,595,508
Members
163,010
Latest member
slus
Want to Remove this Ad? Simply login or create a free account