[Top][All Lists]

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

Re: [Paparazzi-devel] control of ground station

From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] control of ground station
Date: Thu, 24 Jul 2008 10:08:31 +0200
User-agent: Thunderbird (X11/20080505)


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", Automove_wp.automove_waypoint)address@hidden)

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 <address@hidden <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
    address@hidden <mailto:address@hidden>


Paparazzi-devel mailing list

reply via email to

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