Calculate flight's distance

by integration of the speed.

How would the flight’s distance be calculated by integrating the speed? More details would be helpful.

DJI send us the speed and the time every 10th of second. The distance can be calculated by the sum of difference of time between two points (most of the time 0.1 s) multiplied by the speed (in m/s).
dist=sum((ti-ti-1)*speedi).

You can use the existing “OSD.mileage [ft]” and “OSD.mileage [m]” fields to find the total distance the aircraft travelled over the entire flight.

You have right, if you are outside and have a good gps reception.
But inside, or without god gps reception, there is either no distance or “wrong” distance.
In fact it will be another way to calculate distance.

Do you have a sample flight log where the speed is correct and the distance is incorrect?

Please find attached one of my last flight at home (inside). The mileage is 0. But you will find in the column E my evaluation of the distance of this flight using the time and the speed.
DJIFlightRecord_2024-11-16_11-07-43-aircraft.xlsx (1.2 MB)

Thanks!

Can you share the TXT flight log too?

Not easy to find it. It should be better to have the date and hour for the name of the directory instead of an integer.
DJIFlightRecord_2024-11-16_[11-07-43].txt (536.5 KB)

And it should be better to not use backets in the name of the file, because Excel do not accept to save file with backets (this is why I have removed them in my excel file). Or use both the integer if its help you to have the id from DJI, and a date for human like us. For instance, the directory can be : id_date_hour

The directories weren’t created for manual browsing. To easily find the original flight log file, right click the flight and select “Open Log Folder”.

1 Like

In Flight Reader 1.6.24, I updated the calculation for the OSD.mileage field to use speed data when GPS location data is unavailable. Based on comparisons with flight logs that included GPS data, I found that calculations based on speed are less accurate. However, they provide a reasonable fallback and are certainly better than having no data at all.

1 Like

Well done. Thanks.