Test code


I am trying to turn the apm 2.0 into a logger but doesnt know quite where to start. I will try to log gps, compass,mpu,temperature and altitude as fast as possible and just dump it to the serial with the mavlink protocol. I would therefore like to get rid of all the other code and just keep these features.

Should i start with test.pde and somehow modify it or?

All help would be nice.

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

Join diydrones

Email me when people reply –


  • Thanks, im on to it. I am using a rpi to log the sensor from apm and then saved it to file and then transfer it to a server and then put it onto a database.

  • At the moment i only get 25, why not 50hz?

  • Any ideas how i can  modify the code to log faster?

  • I edited GCS_Mavlink file so that apm sends onto serial only the data I need.By simply breaking cases in mavlink_try_send_message:

    case MSG_LOCATION:

    IS it somehow possible to get it to log with 100Hz?

    Интернет-магазин Need.by ручного инструмента и строительных материалов
    Интернет-магазин стройматериалов и ручного инструмента в Минске и Беларуси Need.by - купить строительные материалы и ручной инструмент оптом, в розни…
  • I'm using mavproxy on linux to get the live data from apm. I'm using one of its options to set a higher stream rate. I've read that the max rate is 50Hz, however, I can't get more than 25Hz, no matter how big I set it.
    I edited GCS_Mavlink file so that apm sends onto serial only the data I need.
    Should I follow your previous post anyway to speed things up or is there something else which causes that I cannot reach 50Hz?

  • Start with eg. the ArduPlane directory and get ArduPlane to compile OK. Now delete, in the .pde files, everything you don't want. For example, with attitude and radio control you can delete entire pde files. Others you need to edit to remove eg. control mode. Leave the HAL and all .cpp as is. Work in small steps, getting code to compile again before next kill. And also check that the mavlink and measurement parts still are working.
    Regards, Soren
This reply was deleted.


Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
Benewake LiDAR liked Benewake LiDAR's profile
Apr 12
Gremsy liked Gremsy's profile
Mar 12