HI all,
I would like to tune my quad’s cruise speed in loiter mode to get maximum efficiency for max endurance and long flights but i couldn’t find any entry in a tree?

It would be nice to get a efficiency trace along with GPS speed to find the best possible speed for best possible efficiency. I know if one is using live telemetry into mission planner, then mAh/km is available. But please suggest me how can i do with the data flash logs as i am not using live telemetry into the mission planner? Thanks.

Nice question.
There are some maths that give the best efficincy with the speed, but changes a lot with the drag coefficient which is difficult to calculate precisely (at least without a wind tunnel). The lower the Cd, the higher the optimum speed.
There is also an influence of the payload. Also the higher the payload, the higher the optimum speed. (But the overall flying time will be lower).
For standard builds you will find this value between 5-8 m/s. With MP you can easily make one circuit at different speeds and find your best efficient flight for your build.

@ andresrc Yes that’s why i want to determine the fastest speed where drag and speed combo gives me best efficiency. In normal OSD i can get mah/km but unfortunately its not available on DJI digital FPV.I designed my quad with a drag in mind and it cruises at 12m/s (43km/hr) @ around 10 amps on 4S on a calm day.It uses DJI motors and Props and home built balsa frame using arched sticks for maximum stiffness and light weight.

@dkemxr Thanks.I will look into yaapu.But it would be nice to have that info with mission planner using data flash logs.

Yes, you can test easily, but I think that 12 m/s is closer to performance than efficiency. I think that around 8 m/s you will get further distances while still keeping relative high speed.

Myself and others have also wanted to look at this in the logs for both multicopter and fixed wing aircraft for along time.

Assuming the current and speed are measured and logged, would it be possible to add these “calculated” values as a display option in the log viewer please ?

Displaying them in the log viewer also has the advantage that it can show you the average over the data window as well so it takes out shorter period variations that you might see whilst watching it live in the HUD.

What would be even better is Watt Hours / km otherwise you are ignoring the change in battery voltage from beginning to end.

For the lazy guy you can calculate the distance by multiplying the ground speed GPS.Spd[m/s] and a time constant. The other parameter needed is BAT.Curr[A].

Regarding the math. From my point of view it should be equivalent. Maybe I am not the most qualified one to confirm the math. As you can see in the edit’s above I was struggling a little bit with math too.

Looking at the OSD code the calculations seems fine.

A first look on some logs gave the numbers as expected.

May I have suggestion? It’s just a “nice to have”.
The condition of a plane/vehicle standing still (e.g. after landing) creates the situation of dividing to near zero GPS.Spd and screws up the scaling of the graph. See below:

It looks like my “lazy guy” calculations create a nicer plot. The simpler math avoids the discretisation steps used by the function “delta”. See the yellow marked area.

Last but not least:
The very best of this exercise. Now I can make my own pull downs. I am able to add the “nice to have constrain” mentioned in my earlier post. A way to apply this is circled in red on the first plot. The lower speed constrain may not useful for everybody.

The code changes are shown below and can be found here. mavgraphsMP.zip (1.3 KB)

Thanks to everyone who has worked on this. I think it will be a very useful tool.

One point that I noted was people seem to be using GPS speed. Whilst this might be appropriate for multi-rotors, airpseed would be more appropriate for aircraft with an air speed sensor, which would be the majority.

Using airspeed for these calculations would also greatly speed up the testing process for finding the most efficient speed to fly an aircraft at, because it takes out the effect of the wind on the testing, meaning that testing can be done in a much wider range of weather conditions.

Maybe the options in the log viewer could state whether it was mah/km (GPS) or mah/km (Airspeed) and the same for Watt Hours/km (GPS) and Watt Hours/km (Airspeed) ??