Local variable saved on TLOG

Hello to everyone i have a question if anybody knows to help me.
I am using Cube Orange and Mission Planner.

I have wrote a script(Lua), i use “gcs:send_named_float” to see the data on quick tab, three different variables.
The problem is that only the one of three variables is saved on the tlog file.
I declare all three variables after function update one after another as local and in the same function i use “gcs:send_named_float”.
I made some testing and i realize that only the first variable that i declare is saved in the tlog file.
Do you know why is happening and how can i fix it?

I think also that the “problem” is somewhere in Mission Planner because i can see the variables and the numbers in quicktab but only one is saved in the tlog file.

Thank’s for your time.

please provide the sample log

Pwm_input_fuel.lua (616 Bytes)

2022-11-30 16-45-25.tlog (527.2 KB)

I just send you a test tlog with a spare A.P. without gps so don’t care about the failsafes and also a lua script.
The screenshot is from tlog and i opened the value that i think is the “flow_pwm” from the script.
Thank you for your fast reply!

convert the log to a csv, and check that. as the message is common among all named values. this should help filter them out

You were right, it works as you said!
I am ok with this option.
Is it possible to graph all the different values at the same time, like on the screenshot on my previous post?

Thank you for your help.

Hi everyone, this is an interesting topic, and I am trying to solve a similar problem. I have a companion computer (Teensy) that collects the data from different sensors and sends it as GENERATOR_STATUS (#373) and EFI_STATUS (#225) Mavlink message over the telemetry port 2 to the ArduCopter.
What I am trying to achieve is that:

  1. the data received from the companion computer over the “Telemetry port 2” is logged in the Autopilot log file, ideally in the same file as other ardupilot data.
  2. The data from the companion computer is displayed on the Q ground control and/or Mission Planner software.

I can get the data down to the ground control station and can see it in the Mavlink inspector, but I can’t integrate it in readable/user friendly format on the mission planner or Q ground control. For example, I can select and read the gen_speed value, but only if I swap to the com port 5 USER33, see picture below.

Any suggestion on what could be a possible solution for logging and displaying the data.
Thanks for your time and support

Picture1

Hello @Waldemar_schaefer, you can write a script(Lua) in your A.P. using the “gcs:send_named_float”, with this command you can display the values on the Quick Tab(Mission Planner) during the flight.
You can search in this forum or in google : “lua script”, “gcs:send_named_float”, also
Lua Scripts — Copter documentation
ArduPilot Lua Scripting - ArduPilot Discourse

After that you can see the log file as @Michael_Oborne told us in the previous post!

Hi @billsim, thanks a lot for the reply! I will try it out this week and let you know how it goes.
Best regards
Waldemar

1 Like