Problem with the AP_InertialNav

I am using APM 2.5 with GPS and I am trying to get data such as position and velocity from AP_InertialNav using get_position() and get_velocity(). However, I noticed that the position and velocity provided by these 2 functions are not very accurate. The values keep fluctuating and never converge even my APM module was not moving. Does anyone come across this problem? Any solutions?

inertialnavtest.jpg

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

Join diydrones

Email me when people reply –

Replies

  • Developer

    Hmm.. looks like you're using the example sketch.  Perhaps it's missing some information or parameters (like accel calibratoin parameter) that make it not work.  I think that example sketch was only there to ensure the libraries compiled.  Sorry for the red herring.

    • Ok, just one thing to confirm: now I'm working based on the libraries in ver 3.2.1, in that case, for APM2, the AP_InertialNav library, or more precisely, the "AP_InertialNav.cpp" is actually used by ArduCopter to obtain position information, right?

    • OK, thanks. I fully understand the intent of the example. However, that will make my attempt to build my own flight controller from the libraries trickier!

      Actually I'm trying to build a controller similar to Dr Gareth Owen's (Android Phone->Raspberry pi->APM2). I used his code, but find it quite hard to control using an Android phone in Acro or Stabilized mode, and I've already crashed it once.  So now, I'm thinking of extending to code to implement something like the Loiter mode by adding position and altitude control. 

      Maybe there is an alternative to use the standard firmware and use MavLink to communicate with RPi? That will be another question though.

  • Hi, I'm having exactly the same problem currently. I also noticed that this example has been removed in the latest releases, which are intended for pixhawk only. However, I think this is still a very necessary example for APM2 users. Is there anyone who can answer this?   

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…