paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] MTI on Twog problem


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] MTI on Twog problem
Date: Tue, 01 Sep 2009 19:26:59 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Hi,

The module mechanism only replaces a part of the makefile and the configuration, and I add the 3 different file for xsens module as examples. So it was on purpose that the default Uart is not set (Uart0 for a TWOG, but Uart1 for modified Tiny1!). You have to define the flag INS_LINK somewhere in the makefile section of your airframe (ap.CFLAGS += -DINS_LINK=UartX) or in your custom module configuration file (<flag name="INS_LINK" value="UartX"/>).

If you are using the MTi-G, you have to compile gps_xsens.c and I think it's better to do it in the traditional makefile section (ap.srcs += gps_xsens.c in place of gps_ubx.c) as it is part of a "gps module" that doesn't exist because it would breaks everything... (in fact I don't know if it's a good solution or not)

Add the event function is not completely finish. You should get it work by adding something like <event fun="InsEventCheckAndHandle(estimator_update_state_gps)"/> in the module file. Not sure it really works... but the idea is that you don't have to change main_ap.

I might be wrong since I have never tested the module on fixed wing aircrafts. Tell me If you still have troubles with it.

Gautier

Andreas Gaeb a écrit :
Hi Franck,

Franck Marchand schrieb:
Hello,

I am trying to plug a MTI IMU on a TWOG for a fixed wing aircraft. The MTI
is plug on the Uart0 and I am trying to use the module "INS_XSENS" as
explain on the wiki.
The module ins_xsens.xml seems to be incomplete, I use
ins_xsens_MTiG_Uart0.xml instead which works fine.

I hope you are using a level converter (MAX232 or the like), I fried my
Uarts by not using one.

After the configuration of my airframe, I've got the
following message when I built:

...
/home/franck/paparazzi3/sw/airborne/modules/ins/ins_xsens.c:140: warning:
nested extern declaration of `INS_LINKTransmit'
[...]
ins_xsens.c:(.text+0x50): undefined reference to `INS_LINKTransmit'
ins_xsens.c:(.text+0x5c): undefined reference to `INS_LINKTransmit'
This seems to be caused by INS_LINK not being defined. In the module xml
file should be a line like
<flag name="INS_LINK" value="Uart0" />
which is in ins_xsens_MTiG_Uart0.xml but not in ins_xsens.xml.


Btw, if you have an MTi-G and want to use its GPS, you'll have to add
something like
<file name="../../gps_xsens.c />
to the module xml and the following code to main_ap.c in the event task
below the corresponding GPS code:

#ifdef USE_GPS_XSENS
#ifndef HITL /* else comes through the datalink */
  if (InsBuffer()) {
    ReadInsBuffer();
  }
#endif
  if (ins_msg_received) {
    parse_ins_msg();
    ins_msg_received = FALSE;
#ifdef ALT_KALMAN
    EstimatorSetAlt(ins_z);
#endif
    if (gps_pos_available) {
      gps_verbose_downlink = !launch;
      UseGpsPosNoSend(estimator_update_state_gps);
      gps_downlink();
      gps_pos_available = FALSE;
    }
  }
#endif // USE_GPS_XSENS

HTH.

Regards,
        Andreas


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]