APM 2.5 Extending The Log Capacity

I am trying to use my APM 2.5 as a data logger. Ideally I would like to get about 3hrs, storing GPS data at 10hz, and IMU and attitude data at 50hz. In an initial test it looks like the onboard 16mb memory lasts about 30min. Is 30min roughly what should be expected logging this data?

I see two paths to increasing the log duration. First, is it possible to add additional memory to the APM 2.5 in order to increase the log capacity? Perhaps add an external SD card?

Second, are there possibly a more efficient ways to store the log file using the 16mb of dataflash already there? I noticed that the log file exported by the mission planner from my 30 minute test was a 6.7mb ascii file. So, is there other information being written to the onboard memory that uses up the other 9.3mb? If so, can this data be left out, or at least limited in size? Is the log file stored in ascii or binary in the data flash? If the exported ascii file is 6.7mb, is seems like a binary file should be much smaller.

A few other questions about how the log works. When looking at the logs in the mission planner, it says which pages a log starts and ends at. What exactly is a page? And how many pages can be stored on the internal memory?

When plugging my APM in to retrieve the data files the board appears to start logging again as soon as it is powered on, overwritting data if the memory is full. This stops once I change to CLI mode. Is there any way to prevent this initial overwriting if there is data that I want to protect? It looks like there used to be a switch for this, but that is was removed after the APM 1.0.

Analyzing the .log file, there appear to be many lines that are only partially written. Or perhaps that there was a concurrency issue and the GPS and RAW data tried to write to the log at the same time? Is this normal? For example part of my log file is below:

RAW:-0.00,0.00,0.00,0.03,0.02,-9.79,
GPS: 359266400, 0, 0, 0.0000000, 0.0000000, 0, -27.3700, 259.2100, 0.0000, 0.0000
ATT: -6, 5,RAW:-0.00,-0.00,0.00,0.02,00,0.03,0.01,-9.79,
ATT: -6, 5, 18588
RAW:-0.00,-0.00,-0.00,0.01,-0.00,-9.78,

I am very new to this, So thanks for the help. And sorry in advance if any of these questions are overly obvious. So far the hardware and software looks great and very powerful.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • As Murray said, start with Arducop.
    Disable in code writing all the other params..if its only GPS you can log (within it) only the interesting parameters. Note GPS logs lot of parameters. I have done logging this way, so if you have coded before should be easy to spot n create your own params.
    Just follow the code flow starting from the place its called (in Arducopter.pde) to how each line in log is written.

    All de best!
    • i am trying to use the apm to log data on our dragster.  i am really currently only interested in speeds and accelerations (gps and imu) and gps position info.  we tried it yesterday at a test and tune session and with wait in line uncertainties i have to leave the apm on for many minutes to get the 15 seconds of data i want.  i have turned off most of the data using the disable feature in terminal but i don't know how to just limit the recording to just the parmeters i want.  can anyone point me in the right direction?  is there a way using the TM link to tun ON and OFF the logging in total - that would be awesome for this application and any other situation where you want intense data capture for a specific event only?   i wonder how hard it would be to add a "switch" to the "action" panel in the mission planner to do that?

      any help would be apprciated.

      dennis

      • Hi Dennis, I presume you are using just a bare APM and do not have it attached to any motors? If you do have a Tx/Rx you can remotely arm/disarm the APM to start/stop logging, however you will also have to send some minimum throttle to avoid the APM timing out and disarming again. You may also encounter issues if you loose radio contact - perhaps setting your throttle failsafe to some value above the normal minimum value might help keep the logging active while out of range... This should allow you to activate the logging for only the period of interest. If you want to limit the recording of parameters even further than what is available in the terminal then you will need to alter the code. This is not as daunting as it sounds - I have added RSSI logging to a version of the early 3.0 code. Removing parameters would be even easier. Let us know how you get on

        • thank you very much for your reply.  no motors - i do have an external gps/compass and may (just for fun) install a pitot static tube for airspeed info.  my apm mount is in an enclosure on top of the roll bar.  i have tm and plan on live, pan/tilt capable video but just haven't got to that yet.  i designed in a video antenna and space for the transmitter when i do that. 

          regarding your answer to my query  - are you telling me (indirectly) that the apm doesn't record a log file when it's not "armed"?   by "armed" i assume you mean normal motor arming which i know works just fine without motors.  that would solve my problem completly because i am in a ground station very near the car all the time so losing contact isn't an issue - i would of course try to disable all the many things that can cause it ot "disarm"...
          i am an engineer and am not afraid of code so that's a viable option -  i just don't know how to start  -  like where are the docs that show the software structure and where is it located?  i hope (and pray) that there is some form of configuration management to keep nut cases (like me) from messing with the production code.  give that would i have to create and compile an entire "custom" firmware load for my apm to do this?
          • Hi Dennis, rather than dragging this thread off topic, how about you start another thread. I'd be happy to help out as best I can there...

            • i will do that...  i really appreciate  your help.  i will post a picture of my 140mph "radio shack thing" which is what the driver called it...   we just call it the "RST" now.

              dennis
  • Has anyone tried just writing less data to the onboard memory? By saving only the parameters you are interested in the recording time could be increased. It seems to me the Log.pde file in the Arducopter code would be the place to start.

  • For a more capable logging solution, you might consider this:

         SSR-1     $149    http://www.slerj.com/ssr-1.html

    Like OPENLOG and LOGOMATIC, it also uses microSD/SDHC.  In addition, it supports recording 3 channels at up to 115200 baud, full bandwidth.

  • Any updates?

  • Have you had any success with extending APM logging capacity?

    I'm surprised that I'm the first to reply to this posting.

    I too, have been wondering about how to get long data logs without having to always use a laptop when I fly.

    The data logged to the on-board flash memory does not seem as robust as the telemetry data.

    My flights typically have been 20 - 35 minutes and the data flash does not seem to have enough capacity for flights of this length.

    I've been looking at standalone data loggers.

    SparkFun has two data loggers that may work.  

    OPENLOG      $25    https://www.sparkfun.com/products/9530

       and

    LOGOMATIC  $60    https://www.sparkfun.com/products/10216

      

    Both of these data loggers can record serial port data directly to a microSD card . 

    Connecting a serial data logger to the telemetry port may give the best result.

    Just think how much telemetry data a  lowly 1GB microSD card could hold!!!

    I suspect that some changes to the APM code will be required in order to "broadcast" telemetry data without a ground station connected.  ( The "heart-beat" signal fail-safe disabled, too )

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @SmallpixelCar: My car was able to go all the way autonomously until the crosswalk. It was only 100 yards from the target. What should b…
yesterday
Liam left a comment on Agricultural UAVs
"Hi
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
Wednesday
DIY Robocars via Twitter
RT @SmallpixelCar: Smart move. The car used the shadow to guide it through the bridge. This was never in the training samples. But it learn…
Wednesday
DIY Robocars via Twitter
RT @SmallpixelCar: Getting closer to the target. Single camera. Untrained road. https://t.co/Wsr7RwDamj
Tuesday
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Tuesday
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Tuesday
DIY Robocars via Twitter
RT @RoboticMasters: #donkeycar https://t.co/czuLoVRcA4
Jun 29
DIY Robocars via Twitter
https://t.co/DKQbNTbz0g
Jun 29
DIY Robocars via Twitter
RT @RoboticMasters: Donkey car, car car car car car car; Donkey car, car car car car car car; Donkey Car. Anyone like our tiny tiny donkey…
Jun 29
DIY Robocars via Twitter
RT @SmallpixelCar: After improving DBSCAN speed, I can get 11 frame per second on @NVIDIAEmbedded Jerson Xavier MAXN mode and the autonomou…
Jun 26
DIY Robocars via Twitter
RT @Heavy02011: Join us at next Virtual Race League: ⁦@diyrobocars⁩ Race #4 - Parking Lot Nerds, August 1st https://t.co/5KUpu7VGaH
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: #CUDA implementation should be easy, because most of the time is on distance calculations berween two points and if the…
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: This is the view from the car. Even my lanenet inference is fast on @NVIDIAEmbedded Jerson Xavier, DBSCAN clustering tak…
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: Ran my car in the park, with single camera and @sparkfun IMU. #TensorRT on @NVIDIAEmbedded Jetson Xavier. Lanenet one fr…
Jun 24
DIY Robocars via Twitter
RT @SmallpixelCar: Making progress on drive the car autonomously in my neighborhood. This run used single camera only. No other sensors. ht…
Jun 24
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars/@donkey_car AI racers are getting *fast* in the simulator, in part because it's so well optimized for reinforc…
Jun 21
More…