-
Notifications
You must be signed in to change notification settings - Fork 58
Add log playback #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mikekenyon99 It shows the last good GPS location (designed to help locate in case of a "hard landing"). With that said, the ability to playback the telemetry logs is something that I've considered. It wouldn't work perfectly (for example, with Crossfire flight mode information isn't logged due to an OpenTX bug). But, it could be useful or just interesting to review. I was going to add this as a future feature anyway, so I'll mark this issue as such. |
I think the ability to review the logs for the currently used model would be great. 😀 Unfortunately I have had lost planes and the only way I found them was by taking the SD card out of the transmitter and using the gps values from the log file. This meant I had to drive home and then go back to flying location. |
@mikekenyon99 Ultimately, wouldn't the plane be closest to the last GPS location? I get that there could be unique situations where maybe telemetry is lost on the way down and getting the direction, altitude, etc. could be used to better calculate where the model would be. But, INAV Lua Telemetry also shows that information too (all the last telemetry values are shown, not just the GPS coordinates). So, without any changes, you'll be able to see the GPS location, direction from your launch position, altitude, speed, direction flying, etc. Wouldn't this be what you needed? What additional information would you get from the telemetry logs? |
You are completely right and if it behaves like that then perfect :-) Though I'm unsure, what happens in the scenario where there is no signal from the Crossfire (plane buried in ground, powered off etc..) does the Taranis X9D write zeros every 5 seconds as it writes data? If so then you would have to scroll back through the log to find the last non-zero record. |
Heh, the logs playback is a riot! Super fun to play with! I'd say it works fairly well on Horus. On Taranis it works too, but it's really eating a bunch of memory! I'll see what I can do, but it may be a Horus-only feature. Or, if I can't reduce the memory on Taranis, I may have to scrap it totally :( |
@mikekenyon99 Log playback is in the But it does work and it's really fun to playback flights! Needs a bit of polish and seek controls, but you can stop. Also, arming will stop automatically. |
Hey great work there! unfortunately Im away from my gear for a few days (holiday) so I will have to test next week. I hope you can get it to work on the Taranis without the memory crash and let me know the detailed steps. I will report back. :-) |
@mikekenyon99 works on Taranis (with the slimmest of memory left): To upgrade to the logs build, use the following instructions:
|
@teckel12 Do I read this right. The log build will work with an X9D? |
Hi, I just uploaded this to my Taranis X9D. I turned on TX, then went to the settings and selected a previous log file. I then pressed enter and got a:
Mike |
@mikekenyon99 Out of memory, or you don't have the |
@Jetrell I'm running the On startup, it looks for logs that have been created in the last 2 weeks for the model you currently have selected. The I just thought of something. If your model name includes a space, it appears OpenTX changes spaces to underscores. I've changed the latest Also, the latest |
@mikekenyon99 It's the space in the model's name. OpenTX changes spaces to underscores, which I wasn't doing. Try the latest Also, the latest commit includes other features, like fast forward/reverse using the pitch/elevator right stick and a timer indicator on Taranis. |
Just got latest code, really appreciate your work here, but Im getting these errors, guessing I don't have enough memory :-(
|
@mikekenyon99 You must have something using memory, a different firmware version of OpenTX, or something as it's working on my Q X7. Startup your transmitter and before doing anything, long-press |
@mikekenyon99 Oh, it would also be more possible to work if you were on a view that used less memory, like the classic view. The pilot view uses the most memory so if you were on that view when you started the log playback it has a higher possibility of running out of memory. The Taranis doesn't have much memory to begin with, and OpenTX doesn't allocate much for lua scripts. |
@teckel12 thanks for that my free memory is 28336, so that's my problem. Interestingly, I only have 5 named models, using Crossfire Lua scripts that's all. I will get Googleing to sort that first and then report back. Cheers! |
@mikekenyon99 What version of OpenTX are you running? I believe I'm running v2.2.3. I think older versions of OpenTX didn't allocate as much memory to lua scripts, but I'm not 100% certain. |
@teckel12 using v2.2.3, just checked in classic view and I either get the:
happy to send you the log files if you want to test? |
@mikekenyon99 The log file would at least allow me to rule other things out. It's possible (for example) that you have missing sensors in your logs. It's expecting the log file to match the sensors you currently have. If something is missing, it could also cause this error. |
Archive.zip |
@mikekenyon99 Okay... Reviewed your logs. First off, you're not recording telemetry data. If you look at your logs, the telemetry sensors are all blank or zero (except for the So, you'll need to set each telemetry sensor to log and then do another flight. Looking at the logs, you'll see the difference right away as there will be data in your logs after you do this. Also, your memory situation is probably going to make it difficult to work anyway. When I boot my Q X7 before running anything else I have over 37,000b of free memory. That's the free memory after running Lua Telemetry's bootup and background process. It will go about 10k less once you view Lua Telemetry as the view needs to load. |
Thanks for helping, I have just checked and I do have logs ticked against the telemetry sensors. This file is an example (attached), so I just renamed the filename so it would show up. I loaded the file and got the:
looking at the file, sure there are 0's because I turn on the TX and it starts logging, I then plug in RX, fly, then land. So the first rows are 0's, however further down there are values. |
@mikekenyon99 don't have "SD Log" turned on all the time, only have it on when it's armed. i have mine in a special function so that when the arm switch is "on" the sdlogs is active, you'll avoid that issue then |
@wx4cb I thought about that - what happens if something goes wrong and it powers off into the distance? I had this very incident when my RTH failed to work. I hit "disarm" which cut motor (thankfully) but the logs stopped. It only occurred to me about 5 minutes later to undo this so I could get the latest GPS position from telemetry (I found plane 1.5km away from me). The solution is to use another switch, I know... but then you want to remember to switch that on before flying.. :-). In truth if it always logs you never a bad day... all you have to do is occasional clear down your SD card. |
@mikekenyon99 The previous logs you provided had zeros all the way to the bottom of the file. I'll look at your latest ones. Try using the latest Maybe you have an OpenTX build option selected that's causing a bunch of memory to be used? You can uncheck all options (including lua and luac even) and checking all the 'no' options as well as checking the 'eu' option will save a bit of memory. Not sure why you have 10k less than me. |
@wx4cb I have it on my arm switch too, and I would only disarm in a crash, and then nothing is moving anymore anyway. But I only fly quads. |
@teckel12 there should be no reason to disarm while flying. as you say if it's crashed, nothing's moving anyway. in the case of a failsafe, then it should be RTH (imho) which if it's gone into failsafe then you're not getting data anyway most likely otherwise it wouldn't be in failsafe. |
Great read guys. @wx4cb I have my log enable with a mixer that needs arming and the throttle over a set value. |
And the problem with disarm is that you need to remember to put the throttle low to re-arm mid-flight, so you can then be in a panic-situation trying to arm and it won't because your throttle isn't low. I'm in the process of building my first FW, so I'm sure I'll have different opinions on this from a FW perspective. |
Just downloaded the latest build - works a treat!!! Thank you very much :-) Good luck with your flying wing, I used to do quads loads now they gather dust. Something about flying up high and then diving into valleys.. |
I have a Taranis x9D and I use the log function to store my data in case I lose my craft. Is it possible to review this in this tool? Or does it freeze the last known position of the craft?
Thanks
Mike
The text was updated successfully, but these errors were encountered: