[Top][All Lists]

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

Re: [Paparazzi-devel] control of ground station

From: Mitchel Humpherys
Subject: Re: [Paparazzi-devel] control of ground station
Date: Wed, 23 Jul 2008 16:46:21 -0600

but now that I think about it it would be a lot nicer to just do everything through the ivybus...currently investigating.

On Wed, Jul 23, 2008 at 3:55 PM, Mitchel Humpherys <address@hidden> wrote:
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> 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

reply via email to

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