Jump to content


a question about ahrs


  • Please log in to reply
7 replies to this topic

#1 odtu_ee

odtu_ee

    Member

  • Members
  • PipPip
  • 13 posts
  • Country: flag of Turkey Turkey

Posted 17 July 2011 - 05:26 PM

There is both an attitude and an ahrs module in the source codes. Which one is being used in the current coptercontrol card to generate "CurrentAttitude" input for the stabilization module?

Edited by odtu_ee, 17 July 2011 - 05:55 PM.


#2 PT_Dreamer

PT_Dreamer

    GCS Core Developer

  • Administrators
  • 1210 posts
  • LocationCaparica, Portugal
  • Country: flag of Portugal Portugal


Posted 17 July 2011 - 06:12 PM

Coptercontrol uses the attitude module, the beta version of the pro platform uses the ahrs module. For a list of the modules used check the makefiles.
Life is just a game, but atleast the graphics are awesome!

#3 odtu_ee

odtu_ee

    Member

  • Members
  • PipPip
  • 13 posts
  • Country: flag of Turkey Turkey

Posted 17 July 2011 - 07:32 PM

which branch in the git is for the pro platform?

#4 osnwt

osnwt

    Core Developer

  • Administrators
  • 1499 posts
  • LocationSevastopol
  • Country: flag of Ukraine Ukraine


Posted 17 July 2011 - 08:20 PM

We don't use different branches for different platforms - master has all code for both CC and Pro.
Branches in git are development ones used for some features. After some feature is complete - that branch will be merged into the master.

CopterControl uses Attitude module.
OpenPilot Pro uses AHRSComms module which updates the attitude from separate AHRS board. That board has its own code located in filght/AHRS/ directory.

#5 odtu_ee

odtu_ee

    Member

  • Members
  • PipPip
  • 13 posts
  • Country: flag of Turkey Turkey

Posted 17 July 2011 - 11:30 PM

I wish you had connected the gps and mags to the AHRS card directly in your pro-platform. With such configuration it would be much easier to use AHRS card as a standalone vehicle or pedestrian navigation unit.

#6 dankers

dankers

    Janitor

  • Administrators
  • 5124 posts
  • Country: flag of Australia Australia


Posted 18 July 2011 - 01:00 AM

On the Pro it is. The Mag is on the INS card and the GPS connects directly to that.

The AHRS hardware is fairly old now and was never released, it just stayed as beta.

#7 odtu_ee

odtu_ee

    Member

  • Members
  • PipPip
  • 13 posts
  • Country: flag of Turkey Turkey

Posted 19 July 2011 - 07:18 AM

I am stucked on a strange question. I could not figure out which function is used on AHRS card to send data to OP.

As far as I can follow here is the program flow:

1. send_attitude() calls AhrsSetData()
2. AhrsSetData() marks the object as dirty using SetObjectDirty()
3. HandleObjectPacket() calls FillObjectPacket()
4. FillObjectPacket() adds each dirty object to "txPacket"

However after this, no function sends this "txPacket" over spi to OP.

SendPacket() is used to send "txPacket" on the OP card. However, "SendPacket" is not defined for "IN_AHRS".

My question is which function on the ahrs side sends the data to the OP part?

Any help is appreciated.

#8 peabody124

peabody124

    Crash Dummy

  • Administrators
  • 4110 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 19 July 2011 - 07:41 AM

IIRC (it's been a while) AHRSPoll on the AHRS side will preload the spi buffer with the next packet.  However the AHRS is a slave device so the OP side is what initiates the transfer from the loop in the AHRSComms module.