[Top][All Lists]

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

Re: [Paparazzi-devel] control of ground station

From: Pascal Brisset
Subject: Re: [Paparazzi-devel] control of ground station
Date: Fri, 08 Aug 2008 16:55:21 +0200
User-agent: Thunderbird (X11/20080724)


concerning waypoints moves, the following messages go through the Ivy bus (cf conf/messages.xml) : - WP_MOVED (telemetry) is sent by the aircraft and forwarded by the link agent on the Ivy bus. This message is periodically sent for each waypoint, *even* if the waypoint is not modified - WAYPOINT_MOVED (ground) is periodically sent by the server agent for every known waypoint - MOVE_WAYPOINT (ground) has to be sent to move a waypoint (e.g. the gcs agent sends this message) - MOVE_WP (datalink) is sent by the server on reception of the MOVE_WAYPOINT message, and forwarded to the aircraft by link.

So a ground application (like the gcs) has to listen to WAYPOINT_MOVED and send MOVE_WAYPOINT


PS: Soon in a wiki page ...

Aniket Aranake wrote:
Hello all,

I have set up a flight plan with a single waypoint. I am trying to move the waypoint like so using ivyprobe:

ground WAYPOINT_MOVED 2 2 40 -88 50

(decimal points omitted from lat/long coordinates)

I have the simulator open, and two consoles. One console is running `ivyprobe ground WAYPOINT_MOVED(.*)`. This screen is constantly being flooded by moving waypoints, even though I am not manually moving them around in GCS. In the second console, I run ivyprobe and type the command shown above. The first ivyprobe window catches this command, but completely discards it and continues flooding the screen with WAYPOINT_MOVED messages.

Any idea what I'm doing wrong?


On Mon, Jul 28, 2008 at 12:50 PM, Gautier Hattenberger <address@hidden <mailto:address@hidden>> wrote:


    Moreover, we now have a Double Beer award in the Airframe
    Configurator un-official contest, open to all OCaml coders ;)


    2008/7/28 Mitchel Humpherys <address@hidden

        You're exactly right and it works perfectly!  Thanks for the
        help.  And hey, at least by trying to do it the wrong way I
        was able to learn some ocaml and some more about the pprz code ;)


        On Thu, Jul 24, 2008 at 2:08 AM, Gautier Hattenberger
        <mailto:address@hidden>> wrote:


            You can't move the WP this way. You just change the
            display in the GCS and after a few seconds the WP are
            updated by the real positions send by the AC (which are
            not changed). Pascal will correct me if I'm wrong: the
            best way to solve your problem is to connect a new agent
            to the Ivy bus and send a message MOVE_WAYPOINT of the
            class GROUND (look in messages.xml) --> It will be catch
            by the server, then it will be logged and send to the AC
            with a MOVE_WP automatically (
            <>). The display in the GCS will be
            updated when the AC acknowledge the new position. And
            that's it !

            Good luck


            Mitchel Humpherys a écrit :

                Funny, I'm actually working on that exact same thing
                this week...My plan is to have an external opencv
                program which updates an xml file with some gps
                coordinates (though I've toyed with the idea of doing
                it through a database which could open up a lot of
                possibilities).  In the meantime paparazzi will read
                this file (or connect to this database) and move a
                waypoint around accordingly. I've been digging into
                the ocaml code and so far I've written a module named
                <> (which, btw, you must add to
                the Makefile to get it to work) with the following
                (very sad) ocaml code:

                open Live
                open Latlong

                (** this function moves a waypoint *)
                (**  *)
                let automove_waypoint = fun () ->
                   let ac = "1" in (* Eventually you won't be forced
                to act on aircraft 1 *)
                   let a = find_ac ac in
                   let (num, first_waypoint) = a.fp_group#index
                (List.nth a.fp_group#waypoints 1) in (* Eventually you
                won't be forced to act on the second waypoint added *)
                 let selected_georef = ref WGS84_dec in
                   first_waypoint#set (geographic_of_coordinates
                !selected_georef "41.822227    -111.987482"); (*
                Eventually this won't be hard coded in, probably read
                from an xml file which will be updated periodically by
                an external program *)
                   commit_changes "1"

                I've just been testing it by adding an item to the
                gcs's right-click popup menu by modifying line 286 of
       <> <> as follows:

                   GToolbox.popup_menu ~entries:([`I ("Load Google
                tile", display_gm); `I ("Automove waypoint",

                But eventually I will just have this function run
                every few seconds or something.
                Anyways, when the function gets run the waypoint
                actually moves to the hard-coded-in gps coords but
                then it jumps right back after about 1/2 second...I'm
                not exactly sure why this happens but I'm assuming
                there's more to do in order to "really" commit the change.

                I don't know if this helps or not (it probably just
                hurts because this ocaml is so broken :) I'm just
                learning it this week).

                --Mitchel Humpherys

                On Wed, Jul 23, 2008 at 9:56 AM, Aniket Aranake
                <mailto:address@hidden>>> wrote:

                   Hello Group,

                   I would like to manipulate some software to drive
                the paparazzi
                   ground station. Specifically, I am interested in
                using one program
                   to move waypoints in GCS. I don't know very much
                about ocaml. Can
                   anyone recommend the best way to do this? I was
                considering using
                   sockets, but I'm not sure if that's the most
                appropriate way to go.

                   Any help will be greatly appreciated. Thanks,

                   Paparazzi-devel mailing list


                Paparazzi-devel mailing list

            Paparazzi-devel mailing list
            address@hidden <mailto:address@hidden>

        Paparazzi-devel mailing list
        address@hidden <mailto:address@hidden>

    Paparazzi-devel mailing list
    address@hidden <mailto:address@hidden>


Paparazzi-devel mailing list

reply via email to

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