openvulture-devel Mailing List for OpenVulture
Status: Alpha
Brought to you by:
enferex
You can subscribe to this list here.
2009 |
Jan
(21) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <en...@us...> - 2009-02-02 03:31:00
|
Revision: 36 http://openvulture.svn.sourceforge.net/openvulture/?rev=36&view=rev Author: enferex Date: 2009-02-02 03:30:50 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Initial public realease Added Paths: ----------- tags/openvulture_gnulinux_v0_1_alpha/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 03:29:46
|
Revision: 35 http://openvulture.svn.sourceforge.net/openvulture/?rev=35&view=rev Author: enferex Date: 2009-02-02 03:29:41 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Oops bad name and need to add changelog Removed Paths: ------------- tags/openvulture_linux_v0_1_alpha/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 03:26:04
|
Revision: 34 http://openvulture.svn.sourceforge.net/openvulture/?rev=34&view=rev Author: enferex Date: 2009-02-02 03:26:02 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Initial public release 0.1 (Alpha) Added Paths: ----------- tags/openvulture_linux_v0_1_alpha/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 03:25:43
|
Revision: 33 http://openvulture.svn.sourceforge.net/openvulture/?rev=33&view=rev Author: enferex Date: 2009-02-02 03:25:39 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Added change log Added Paths: ----------- trunk/ChangeLog Added: trunk/ChangeLog =================================================================== --- trunk/ChangeLog (rev 0) +++ trunk/ChangeLog 2009-02-02 03:25:39 UTC (rev 33) @@ -0,0 +1,5 @@ +-- Version 0.1 -- + +2009-02-01 Matt Davis <mat...@gm...> + +* Initial public release (Alpha) aka Shmoocon 2009 release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 03:25:13
|
Revision: 32 http://openvulture.svn.sourceforge.net/openvulture/?rev=32&view=rev Author: enferex Date: 2009-02-02 03:25:10 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Initial version 0.1 release (Alpha) Added Paths: ----------- tags/openvulture_linux_v0_1_alpha/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 02:56:40
|
Revision: 31 http://openvulture.svn.sourceforge.net/openvulture/?rev=31&view=rev Author: enferex Date: 2009-02-02 02:56:38 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Added a comma Modified Paths: -------------- trunk/src/main.h Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-02-02 02:50:59 UTC (rev 30) +++ trunk/src/main.h 2009-02-02 02:56:38 UTC (rev 31) @@ -1,7 +1,7 @@ /***************************************************************************** * main.h * -* Copyright (C) 2009 +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 02:51:04
|
Revision: 30 http://openvulture.svn.sourceforge.net/openvulture/?rev=30&view=rev Author: enferex Date: 2009-02-02 02:50:59 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Minor changes Modified Paths: -------------- trunk/docs/OpenVultureManual.pdf trunk/docs/OpenVultureManual.tex Modified: trunk/docs/OpenVultureManual.pdf =================================================================== (Binary files differ) Modified: trunk/docs/OpenVultureManual.tex =================================================================== --- trunk/docs/OpenVultureManual.tex 2009-02-02 02:44:16 UTC (rev 29) +++ trunk/docs/OpenVultureManual.tex 2009-02-02 02:50:59 UTC (rev 30) @@ -10,7 +10,7 @@ \begin{document} \title{OpenVulture: Manual for the Free and Open Source Multi-Platform Hardware - Automation Control Software \\ For OpenVulture Version: 0.1} + Automation Control Software Package \\ For OpenVulture Version: 0.1} \author{OpenVulture Team at 757Labs.com} \date{\today} @@ -248,12 +248,13 @@ \url{http://www.757labs.com/projects/openvulture/} \section{Writing Your Own Module} -If you cannot find a module that supports your specific hardware device, writing one is -not terribly difficult. The act of creating a single module can be thought of -in few phases: +If you cannot find a module that supports your specific hardware device, +writing one is not terribly difficult. The act of creating a single module +can be thought of in few phases: \begin{enumerate} - \item Obtain the development specs for your hardware (e.g. inputs, outputs) + \item Obtain the development specs for your + hardware (e.g. inputs, outputs). \item Use one of the existing APIs for the hardware type (e.g. If you are creating a GPS module, adhere to the specifications in \texttt{include/vulture/modules/gps.h}. This header is the template @@ -370,7 +371,7 @@ Bells and whistles they can use. \lstset{language=c, caption=mcfoo9000\_module.c: Foo Module for the McFoo9000, - label=listing-module-source basicstyle=\footnotesize} + label=listing-module-source, basicstyle=\footnotesize} \lstinputlisting{mcfoo9000_module.c} \subsubsection{Building Your Home-Brewed Module} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 02:44:21
|
Revision: 29 http://openvulture.svn.sourceforge.net/openvulture/?rev=29&view=rev Author: enferex Date: 2009-02-02 02:44:16 +0000 (Mon, 02 Feb 2009) Log Message: ----------- updated to match tex Modified Paths: -------------- trunk/docs/OpenVultureManual.pdf Modified: trunk/docs/OpenVultureManual.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 02:28:57
|
Revision: 28 http://openvulture.svn.sourceforge.net/openvulture/?rev=28&view=rev Author: enferex Date: 2009-02-02 02:28:49 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Remove todo list Removed Paths: ------------- trunk/TODO Deleted: trunk/TODO =================================================================== --- trunk/TODO 2009-02-02 02:26:45 UTC (rev 27) +++ trunk/TODO 2009-02-02 02:28:49 UTC (rev 28) @@ -1 +0,0 @@ -* Add signal handlers This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 02:26:48
|
Revision: 27 http://openvulture.svn.sourceforge.net/openvulture/?rev=27&view=rev Author: enferex Date: 2009-02-02 02:26:45 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Updated copyright date and/or added copyright info Modified Paths: -------------- trunk/include/vulture/conf.h trunk/include/vulture/errors.h trunk/include/vulture/module.h trunk/include/vulture/modules/gps.h trunk/include/vulture/modules/imu.h trunk/include/vulture/modules/servo.h trunk/include/vulture/plan.h trunk/include/vulture/vulture.h trunk/modules/default_gps.c trunk/modules/default_imu.c trunk/modules/default_servo.c trunk/modules/fake_gps.c trunk/src/command.c trunk/src/command.h trunk/src/log.c trunk/src/log.h trunk/src/main.c trunk/src/main.h trunk/src/mastercontrol.c trunk/src/mastercontrol.h trunk/src/prompt.c trunk/src/prompt.h trunk/src/server.c trunk/src/server.h trunk/srclib/conf.c trunk/srclib/gps.c trunk/srclib/imu.c trunk/srclib/module.c trunk/srclib/plan.c trunk/srclib/planparse.l trunk/srclib/planparse.tab.c trunk/srclib/planparse.tab.h trunk/srclib/planparse.y trunk/srclib/planparse.yy.c trunk/srclib/servo.c Modified: trunk/include/vulture/conf.h =================================================================== --- trunk/include/vulture/conf.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/conf.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* conf.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef _VUL_CONF_H_INCLUDE #define _VUL_CONF_H_INCLUDE Modified: trunk/include/vulture/errors.h =================================================================== --- trunk/include/vulture/errors.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/errors.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* errors.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_ERROR_H_INCLUDE #define VULTURE_ERROR_H_INCLUDE Modified: trunk/include/vulture/module.h =================================================================== --- trunk/include/vulture/module.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/module.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* module.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_MODULE_H_INCLUDE #define VULTURE_MODULE_H_INCLUDE Modified: trunk/include/vulture/modules/gps.h =================================================================== --- trunk/include/vulture/modules/gps.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/modules/gps.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* gps.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_MODULE_GPS_H_INCLUDE #define VULTURE_MODULE_GPS_H_INCLUDE Modified: trunk/include/vulture/modules/imu.h =================================================================== --- trunk/include/vulture/modules/imu.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/modules/imu.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* imu.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_MODULE_IMU_H_INCLUDE #define VULTURE_MODULE_IMU_H_INCLUDE Modified: trunk/include/vulture/modules/servo.h =================================================================== --- trunk/include/vulture/modules/servo.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/modules/servo.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* servo.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_MODULE_SERVO_H_INCLUDE #define VULTURE_MODULE_SERVO_H_INCLUDE Modified: trunk/include/vulture/plan.h =================================================================== --- trunk/include/vulture/plan.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/plan.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* plan.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_PLAN_H_INCLUDE #define VULTURE_PLAN_H_INCLUDE Modified: trunk/include/vulture/vulture.h =================================================================== --- trunk/include/vulture/vulture.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/include/vulture/vulture.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* vulture.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #ifndef VULTURE_H_INCLUDE #define VULTURE_H_INCLUDE Modified: trunk/modules/default_gps.c =================================================================== --- trunk/modules/default_gps.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/modules/default_gps.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* default_gps.c +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> Modified: trunk/modules/default_imu.c =================================================================== --- trunk/modules/default_imu.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/modules/default_imu.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* default_imu.c +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> Modified: trunk/modules/default_servo.c =================================================================== --- trunk/modules/default_servo.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/modules/default_servo.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* default_servo.c +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> Modified: trunk/modules/fake_gps.c =================================================================== --- trunk/modules/fake_gps.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/modules/fake_gps.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,3 +1,24 @@ +/***************************************************************************** +* fake_gps.c +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of libvulture. +* +* libvulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* libvulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with libvulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> Modified: trunk/src/command.c =================================================================== --- trunk/src/command.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/command.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * command.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/command.h =================================================================== --- trunk/src/command.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/command.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * command.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/log.c =================================================================== --- trunk/src/log.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/log.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * log.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/log.h =================================================================== --- trunk/src/log.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/log.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * log.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/main.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * main.c * -* Copyright (C) 2008, +* Copyright (C) 2009 * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. @@ -142,13 +142,14 @@ int i, j; /* GNU License info */ - printf(NAME": Copyright (C) 2008 Matt Davis (enferex), Ethan O'Toole, \n" - "and 757Labs <www.757labs.com>\n\n" - "This program comes with ABSOLUTELY NO WARRANTY\n" - "This is free software, and you are welcome to redistribute it\n" - "under certain conditions. For details see the file 'LICENSES'\n" - "that came with this software or visit:\n" - "<http://www.gnu.org/licenses/gpl-3.0.txt>\n\n"); + printf( +NAME": Copyright (C) 2009 Matt Davis (enferex), Ethan O'Toole, \n" +"and 757Labs <www.757labs.com>\n\n" +"This program comes with ABSOLUTELY NO WARRANTY\n" +"This is free software, and you are welcome to redistribute it\n" +"under certain conditions. For details see the file 'LICENSES'\n" +"that came with this software or visit:\n" +"<http://www.gnu.org/licenses/gpl-3.0.txt>\n\n"); /* App name */ printf("%s -- v%s\n", NAME, VERSION); Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/main.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * main.h * -* Copyright (C) 2008, +* Copyright (C) 2009 * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/mastercontrol.c =================================================================== --- trunk/src/mastercontrol.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/mastercontrol.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * mastercontrol.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/mastercontrol.h =================================================================== --- trunk/src/mastercontrol.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/mastercontrol.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * mastercontrol.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/prompt.c =================================================================== --- trunk/src/prompt.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/prompt.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * prompt.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/prompt.h =================================================================== --- trunk/src/prompt.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/prompt.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * prompt.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/server.c =================================================================== --- trunk/src/server.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/server.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * server.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/src/server.h =================================================================== --- trunk/src/server.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/src/server.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * server.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of Vulture. Modified: trunk/srclib/conf.c =================================================================== --- trunk/srclib/conf.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/conf.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * conf.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/gps.c =================================================================== --- trunk/srclib/gps.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/gps.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * gps.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/imu.c =================================================================== --- trunk/srclib/imu.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/imu.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * imu.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/module.c =================================================================== --- trunk/srclib/module.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/module.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * module.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/plan.c =================================================================== --- trunk/srclib/plan.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/plan.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * plan.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/planparse.l =================================================================== --- trunk/srclib/planparse.l 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/planparse.l 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * planparse.l * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/planparse.tab.c =================================================================== --- trunk/srclib/planparse.tab.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/planparse.tab.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * planparse.tab.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture and was originally automatically generated Modified: trunk/srclib/planparse.tab.h =================================================================== --- trunk/srclib/planparse.tab.h 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/planparse.tab.h 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * planparse.tab.h * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture and was originally automatically generated Modified: trunk/srclib/planparse.y =================================================================== --- trunk/srclib/planparse.y 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/planparse.y 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * planparse.y * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. Modified: trunk/srclib/planparse.yy.c =================================================================== --- trunk/srclib/planparse.yy.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/planparse.yy.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * planparse.yy.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture and was originally automatically generated Modified: trunk/srclib/servo.c =================================================================== --- trunk/srclib/servo.c 2009-02-02 01:54:50 UTC (rev 26) +++ trunk/srclib/servo.c 2009-02-02 02:26:45 UTC (rev 27) @@ -1,7 +1,7 @@ /***************************************************************************** * servo.c * -* Copyright (C) 2008, +* Copyright (C) 2009, * Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> * * This file is part of libvulture. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 01:55:10
|
Revision: 23 http://openvulture.svn.sourceforge.net/openvulture/?rev=23&view=rev Author: enferex Date: 2009-02-02 01:33:41 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Remove the demo Removed Paths: ------------- trunk/demo/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 01:55:01
|
Revision: 24 http://openvulture.svn.sourceforge.net/openvulture/?rev=24&view=rev Author: enferex Date: 2009-02-02 01:47:18 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Reduce line length by making -L option description use multiple lines Modified Paths: -------------- trunk/src/main.c Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-02-02 01:33:41 UTC (rev 23) +++ trunk/src/main.c 2009-02-02 01:47:18 UTC (rev 24) @@ -76,8 +76,8 @@ .opts={0}, .run=cli_foreground}, {.cmd="-p", .desc="Load Flight Plan", .opts={CMD_OPT_FNAME | CMD_OPT_REQUIRED}, .run=cli_plan}, - {.cmd="-L", .desc="Output verbose data to logfile (enables " - "verbosity to the log and not stdout)", + {.cmd="-L", .desc="Output verbose data to logfile (enables \n" + "\tverbosity to the log and not stdout)", .opts={CMD_OPT_FNAME | CMD_OPT_REQUIRED}, .run=cli_log}, {.cmd="-v", .desc="Verbose", .opts={0}, .run=cli_verbose}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 01:54:53
|
Revision: 26 http://openvulture.svn.sourceforge.net/openvulture/?rev=26&view=rev Author: enferex Date: 2009-02-02 01:54:50 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Not used here Removed Paths: ------------- trunk/src/conf.c Deleted: trunk/src/conf.c =================================================================== --- trunk/src/conf.c 2009-02-02 01:53:07 UTC (rev 25) +++ trunk/src/conf.c 2009-02-02 01:54:50 UTC (rev 26) @@ -1,32 +0,0 @@ -/***************************************************************************** -* conf.c -* -* Copyright (C) 2008, -* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> -* -* This file is part of Vulture. -* -* Vulture is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Vulture is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Vulture. If not, see <http://www.gnu.org/licenses/>. -*****************************************************************************/ -#include <vulture/conf.h> -#include "main.h" - - -/* Treat this as a separate translation unit so that linking this does not get - * rolled in with main() - */ -const VulConf *main_get_config(void) -{ - return (const VulConf *)main_config; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 01:54:49
|
Revision: 25 http://openvulture.svn.sourceforge.net/openvulture/?rev=25&view=rev Author: enferex Date: 2009-02-02 01:53:07 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Update copyright Modified Paths: -------------- trunk/docs/OpenVultureManual.pdf trunk/docs/OpenVultureManual.tex Modified: trunk/docs/OpenVultureManual.pdf =================================================================== (Binary files differ) Modified: trunk/docs/OpenVultureManual.tex =================================================================== --- trunk/docs/OpenVultureManual.tex 2009-02-02 01:47:18 UTC (rev 24) +++ trunk/docs/OpenVultureManual.tex 2009-02-02 01:53:07 UTC (rev 25) @@ -1,7 +1,7 @@ % manual.tex % % This file is part of the OpenVulture Reference Manual -% Copyright (C) 2008 +% Copyright (C) 2009 % Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com>. % See the file 'COPYING' for copying conditions @@ -17,7 +17,7 @@ \maketitle \newpage -\noindent Copyright (C) 2008, 2009 \\ +\noindent Copyright (C) 2009 \\ Matt Davis (enferex), Ethan O'Toole, and 757Labs \url{www.757labs.com} \\ Permission is granted to copy, distribute and/or modify This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 00:26:51
|
Revision: 22 http://openvulture.svn.sourceforge.net/openvulture/?rev=22&view=rev Author: enferex Date: 2009-02-02 00:26:48 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Use the proper variable in the debuging output. Modified Paths: -------------- trunk/src/process.c Modified: trunk/src/process.c =================================================================== --- trunk/src/process.c 2009-02-02 00:09:59 UTC (rev 21) +++ trunk/src/process.c 2009-02-02 00:26:48 UTC (rev 22) @@ -298,8 +298,8 @@ heading = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); MAIN_VERBOSE_GPS( "Direction to waypoint: %d degrees (%f radians)\n", - ((int)(360.0 + VUL_GPS_RADIANS_TO_DEGREES(bearing)) % 360), - bearing); + ((int)(360.0 + VUL_GPS_RADIANS_TO_DEGREES(heading)) % 360), + heading); /* FIXME: This assumes your GPS is off, and you are going relative * to a starting direction of 0.0. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-02-02 00:10:02
|
Revision: 21 http://openvulture.svn.sourceforge.net/openvulture/?rev=21&view=rev Author: enferex Date: 2009-02-02 00:09:59 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Added some debugging output for waypoint status Modified Paths: -------------- trunk/src/main.h trunk/src/process.c Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-01-31 16:45:12 UTC (rev 20) +++ trunk/src/main.h 2009-02-02 00:09:59 UTC (rev 21) @@ -30,9 +30,9 @@ /* Naming */ -#define NAME "Vulture" -#define MAIN_TAG "[Vulture]" -#define MAIN_EXE_NAME "vulture" +#define NAME "Vulture" +#define MAIN_TAG "[Vulture]" +#define MAIN_EXE_NAME "vulture" /* Version */ Modified: trunk/src/process.c =================================================================== --- trunk/src/process.c 2009-01-31 16:45:12 UTC (rev 20) +++ trunk/src/process.c 2009-02-02 00:09:59 UTC (rev 21) @@ -289,10 +289,17 @@ /* If we are to go in current direction (degree of 0) */ if (to_degree == 0) - return TRUE; + { + MAIN_VERBOSE_GPS("Continue on path\n"); + return TRUE; + } /* Direction I am traveling (if non-zero coordinates) */ heading = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); + MAIN_VERBOSE_GPS( + "Direction to waypoint: %d degrees (%f radians)\n", + ((int)(360.0 + VUL_GPS_RADIANS_TO_DEGREES(bearing)) % 360), + bearing); /* FIXME: This assumes your GPS is off, and you are going relative * to a starting direction of 0.0. @@ -393,6 +400,6 @@ plan->rem_duration = plan->duration; } - MAIN_VERBOSE("Obtaining the next plan event.\n"); + MAIN_VERBOSE_GPS("Obtaining the next plan event.\n"); return plan; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-31 16:45:17
|
Revision: 20 http://openvulture.svn.sourceforge.net/openvulture/?rev=20&view=rev Author: enferex Date: 2009-01-31 16:45:12 +0000 (Sat, 31 Jan 2009) Log Message: ----------- Spelling/grammar proof-reading Include the license as a chapter Added info for obtaining non-default modules Modified Paths: -------------- trunk/docs/OpenVultureManual.pdf trunk/docs/OpenVultureManual.tex Modified: trunk/docs/OpenVultureManual.pdf =================================================================== (Binary files differ) Modified: trunk/docs/OpenVultureManual.tex =================================================================== --- trunk/docs/OpenVultureManual.tex 2009-01-25 19:12:22 UTC (rev 19) +++ trunk/docs/OpenVultureManual.tex 2009-01-31 16:45:12 UTC (rev 20) @@ -9,16 +9,18 @@ \usepackage{hyperref, alltt, listings} \begin{document} -\title{OpenVulture: Manual for the Free and Open Source Automation - Platform Software\\For OpenVulture Version: 0.1} +\title{OpenVulture: Manual for the Free and Open Source Multi-Platform Hardware + Automation Control Software \\ For OpenVulture Version: 0.1} \author{OpenVulture Team at 757Labs.com} + \date{\today} \maketitle \newpage \noindent Copyright (C) 2008, 2009 \\ Matt Davis (enferex), Ethan O'Toole, and 757Labs -\url{www.757labs.com}\\ Permission is granted to copy, distribute and/or modify + \url{www.757labs.com} \\ +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of @@ -34,18 +36,19 @@ and the open source community. The primary purpose of this project is to provide a simple, free and nearly-dependency-free application (Vulture) and library(libvulture) to facilitate the software needs of an autonomous platform. -Such platforms (e.g. UAV, automated R/C car, etc) can be constructed cheaply -and employ aspects of the OpenVulture software to act as the "brain" of the -platform, steering it to waypoints and directing the platform in following -pre-planed patterns/paths. +Free, in former case, refers to both freedom and cost. Such platforms (e.g. +UAV, automated R/C car, etc) can be constructed cheaply and employ aspects of +the OpenVulture software to act as the "brain" of the platform, steering it to +waypoints and directing the platform in following pre-planed patterns/paths. \section{Concept} Ideas behind the software: \begin{itemize} \item Keep things pretty simple. \item Keep things cheap! (Everyone needs their own drone!) - \item Avoid numerous dependencies required to build the software (e.g. try - to libraries not defined by a POSIX standard or C99 standard). + \item Avoid numerous dependencies required to build the software (e.g. + avoid using libraries not defined by a POSIX or C99 standard). + \item Provide flexibility to support numerous autonomous vehicle types \end{itemize} \section{Capabilities} @@ -56,7 +59,7 @@ be chained into using the application. To clarify, the Vulture application is responsible for initializing the hardware modules (e.g. GPS , Servo controllers, etc). Such modules are built following an API defined in -libvulture. By following such an API, other libvulture based application can +libvulture. By following such an API, other libvulture based applications can use the same modules. The Vulture application also provides the main control-loop driving the platform and determining if such a platform has met one aspect of a pre-defined "flight-plan." Vulture also provides a @@ -71,8 +74,8 @@ This library provides: \begin{itemize} \item API for creating modules (e.g. IMU, GPS, servo) allowing the - communication between your vulture-based application and hardware. - \item Parser for reading in a route-plan for your platform to follow + communication between your vulture-based application and hardware + \item Parser for reading-in a route-plan for your platform to follow \item Error handler \item Configuration manager for managing configuration options for a vulture application @@ -86,17 +89,22 @@ This application provides: \begin{itemize} - \item Steering a platform to a waypoint or set of waypoints. - \item Server that can be shelled into via network socket (think telnet). + \item Steering a platform to a waypoint or set of waypoints + \item Server that can be shelled into via network socket (think telnet) \item Platform status queries \end{itemize} -\section{Components / block diag} - \chapter{Obtaining the Software} The OpenVulture software can be obtained at 757Labs.com: -\url{http://www.757labs.com/projects/vulture} +\url{http://www.757labs.com/projects/vulture} \\ +The development version can be downloaded via Subversion (SVN) from +\url{https://openvulture.svn.sourceforge.net}. To download a SVN development +version into a directory called 'openvulture\_devel' issue the following +command (all on one line): \\ +\texttt{svn co https://openvulture.svn.sourceforge.net/openvulture/svnroot/ + openvulture/trunk openvulture\_devel} \\ + To keep things simple, both the library and application are available as a single download. However, if it is only the library you want, then that is all that has to be compiled. @@ -105,11 +113,13 @@ \section{Software Requirements} If you run a GNU based system, you should be set as long as you have GCC \url{http://gcc.gnu.org} and the Binutils tools -(\url{http://www.gnu.org/software/binutils/}). +(\url{http://www.gnu.org/software/binutils/}). Chances are, if you have GCC +you probably have the binutils package. Other requirements: \begin{itemize} - \item POSIX compliant operating system (Linux preferred with USB support) + \item POSIX compliant operating system + (GNU/Linux preferred with USB support) \item GNUMake (\url{http://www.gnu.org/software/make/}) to aid in building the software (If you have a GNU/Linux operating system, then you are probably set.) @@ -118,8 +128,7 @@ \end{itemize} \section{Quick Install Guide} -For the informed or impatient) -Obtain and untar the sources then: +For the informed or impatient. Obtain and untar the sources then: \begin{alltt} cd openvulture-XXXX configure @@ -131,7 +140,7 @@ \subsection{Building OpenVulture} \begin{itemize} \item Obtain the source either as a gzipped tarball (.tar.gz) or bzipped - tarball (.tar.bz2). + tarball (.tar.bz2) \item Untar the gzipped source: \begin{alltt}tar -zxvf openvulture-XXXX.tar.gz\end{alltt} \item If you obtained the bzipped source instead, that can be untarred @@ -140,14 +149,14 @@ \end{itemize} \subsection{Configuring the Build} -Before the vulture application or the library can be built it necessary to +Before the vulture application or the library can be built, it is necessary to generate the proper makefiles. These files can be automatically generated via -the configure script in the toplevel openvulture directory. +the configure script located in the toplevel openvulture directory. To configure openvulture with the default build options (debugging off and -install path to \texttt{/usr/local/}) merely run \texttt{./configure} +install path set to \texttt{/usr/local/}) merely run \texttt{./configure} -If you want to specify an install path run configure using the \texttt{--prefix=} flag: +If you want to specify an install path, run configure using the \texttt{--prefix=} flag: \begin{alltt} ./configure --prefix=/my/desired/install/path/ \end{alltt} @@ -160,7 +169,7 @@ \subsection{Building the Software} OpenVulture can be built in two primary ways. Either you can build the vulture -library, or you can build Vulture application. If you build the application +library, or you can build the Vulture application. If you build the application then the library will automatically build. \subsubsection{Building the Vulture Application} @@ -168,12 +177,12 @@ begin building the application, start from the toplevel openvulture-XXXX directory (where you just configured) and execute the make command: \begin{alltt} -"make" +make \end{alltt} \subsubsection{Building the Vulture Library} \label{sec:building_the_vulture_library} -If you have built the Vulture application, then you can ignore this section. +If you have just built the Vulture application, then you can ignore this section. However, if you do desire to build just the library and its associated modules, then you have arrived at the right place. From the toplevel openvulture-XXXX directory (where you ran the configure script) execute the make command with @@ -204,9 +213,10 @@ et.al.) you might want to make sure that the modules path is in your \texttt{/etc/ld.so.conf} path file. This will ensure that when you build future vulture-based applications, the modules that such an application can -control (such as GPS, servos, etc) can be linked during the compilation phase. -These modules are all located in \texttt{<install-prefix>/vulture/modules/} -directory. Assuming a default install would place such modules in +control (such as GPS, servos, etc) can be linked during the compilation phase +and runtime. These modules are all located in the +\texttt{<install-prefix>/vulture/modules/} directory. The following assumes a +default install would place such modules in \texttt{/usr/local/lib/vulture/modules/}. To make sure your linker knows about these modules (so that they can be linked with) you will probably want to add this newly installed module directory to the list specified in the @@ -215,8 +225,7 @@ added, the \texttt{ldconfig} application is called to rebuild the table of shared libraries. \begin{alltt} -echo "/usr/local/lib/vulture/modules/" >> /etc/ld.so.conf -ldconfig +echo "/usr/local/lib/vulture/modules/" >> /etc/ld.so.conf ldconfig \end{alltt} That's it! If all of these steps have succeeded, you should be set! @@ -224,20 +233,22 @@ \chapter{Modules} OpenVulture modules are software-to-hardware interfaces built using the vulture library. Such modules allow the generic API provided by the aforementioned -library to interact with the hardware controlling the platform. The base -install of the vulture library includes a set of modules that, if they do not -support your specific platform's hardware, can be ignored. However, looking at -how these modules are created might provide some insight if there is a need to -create your own. +library to interact with the hardware devices to control your vulture platform. +The base install of the vulture library includes a set of modules that, if they +do not support your specific platform's hardware, can be ignored. However, +looking at how these modules are created might provide some insight if there is +a need to create your own. \section{Obtaining Modules for your Hardware} -While not in place, the OpenVulture team would like to have a single repository -that contains all modules written for specific hardware. In other words, a -one-stop-spot to get all the stuff you need so that you can get your platform -up and running as fast as possible. +The OpenVulture team provides a single repository that contains all modules +written for specific hardware that is not available default in the OpenVulture +download package. In other words, a one-stop-spot to get all the stuff you +need, so that you can get your platform up and running as fast as possible. The +additional modules can be located at the project site: +\url{http://www.757labs.com/projects/openvulture/} \section{Writing Your Own Module} -If you cannot find a module that supports your specific module, writing one is +If you cannot find a module that supports your specific hardware device, writing one is not terribly difficult. The act of creating a single module can be thought of in few phases: @@ -262,13 +273,14 @@ followed. However, if one desires to acquire a new kind of hardware device that does not already have an API defined for it, the vulture library API should be extended to allow support of this new hardware device type. The -following example will aid in extending the libvulture API adding a new device +following example will demonstrate extending the libvulture API to add a new device type. -\subsection{Writing an API for a Module Type that does Not Exist} Assuming the -vulture library does not have an api defined for your needs, then there will be -the case such a API needs to be created, this section describes that process. -The following list provides a few bullets regarding vulture module APIs: +\subsection{Writing an API for a Module Type that Does Not Exist} +Assuming the vulture library does not have an API defined for your needs, then +there will be the case such a API needs to be created. This section describes +that process. The following list provides a few key points regarding vulture +module APIs: \begin{itemize} \item All module APIs exist in @@ -279,44 +291,51 @@ reported latitude and longitude values. \end{itemize} -For a simple example lets assume a new kind of hardware device has come on the +For a simple example, lets assume a new kind of hardware device has come on the market and your automated-drone absolutely must utilize the functionality of -this way-cool device to boost its drone 31337ness. In fact, this device will +this way-cool device (to boost its drone 31337ness). In fact, this device will have numerous manufacturers and each manufacturer might implement the innards -of their version of this mythical device slightly differently. Therefore, you -decide to be a hero and write a vulture API for this type of device. This -example is similar to the GPS market and how there are numerous GPS device -manufacturers providing roughly the same output (position), but how each device -acquires and spits this position data out varies across models and -manufacturers. For all intensive purposes lets assume this device is called a +of their version of this mythical device differently. Therefore, you +decide to be a hero and write a vulture API for this type of device. All +devices of this type will follow the API, therefore the most common functions +that such devices provide should be available in your API. This example is +similar to the GPS market and how there are numerous GPS device manufacturers +providing roughly the same output (position), but how each device acquires and +spits this position data out varies across models and manufacturers. For all +intensive purposes lets assume this device you need to create is called a \emph{Foo}. So that your vulture application can utilize the capabilities such a device provides, lets write a foo module, but before we get ahead of ourselves, a foo API needs to be written as a guideline for all foo devices to follow. It will be up to other manufacturers and hackers to create a module specific to their platform, but as long as it adheres to the foo API, then -things should be cool. Listing \ref{listing-module-header} is a new header -file for the foo API. This is the API defining the commands a vulture -application can issue to a foo device. +things should be cool. Listing \ref{listing-module-header} is a new header file +for the foo API. This is the API defining the commands a vulture application +can issue to a foo device. + \lstset{language=c, caption=foo.h: FooModule Vulture API, - label=listing-module-header} + label=listing-module-header, basicstyle=\footnotesize} \lstinputlisting{foo.h} -With an API defined. It is also nice to create a routine that allows any foo -module from any vendor to have its routines tickled. In such a case we will -need a simple routine that takes in a foo module of any persuasion and then -calls the routine that all foo modules have; the routine you defined in the foo -API \texttt{vul\_foo\_what\_do\_you\_foo} +With an API defined. The goal of this API is to allow any foo module from any +foo manufacturer to have its main functionality tickled. Foo's are pretty +simple, and the main purpose of any foo is to output a way-cool string of text. +Some foo manufactures have other routines, but they are not ubiquitous across +all foo's, so we will avoid throwing those into our API. Anyways, we still need +a means of binding our generic foo API to a specific foo module. To accomplish +this binding, we will need to create a simple routine that takes in a foo module +of any persuasion (manufacturer) and then calls the routine that all foo modules +have; the routine you defined in the foo API +\texttt{vul\_foo\_what\_do\_you\_foo} This is the actual code-piece that will require an addition to the vulture library. It is important to note that adding to the API should be considered a -special case, because doing such deviates a base vulture library that everyone -can obtain to a more specific-vulture-library that you might be dispensing -among your peers. +special case, because doing such deviates the public/base vulture library that +everyone can obtain to a more specific-vulture-library. Listing \ref{listing-module-api-source} implements the foo API's \texttt{vul\_foo\_what\_do\_you\_foo} routine. \lstset{language=c, caption=foo.c: Foo Module Vulture API Implementation, - label=listing-module-api-source} + label=listing-module-api-source, basicstyle=\footnotesize} \lstinputlisting{foo.c} This routine merely interfaces a vulture application to the specific foo @@ -329,58 +348,65 @@ module. Commandments any module should follow: \begin{itemize} -\item All modules have an initialization routine -\item All modules have a cleanup (de-initialization) routine -\item All modules should follow the API defined for them. If a routine is -impossible to implement, make sure its moot effect has no drastic consequences -if that routine were to be called. In other words, make sure that absent -routine does exists and safely returns. -\item Aside from the base module structure that defines a generic module, -located in \texttt{include/vulture/module.h}, the specific API should be -followed in \texttt{include/vulture/modules/}. -\item Each module has a list of operations that it should be able to safely -execute. This structure of options is listed in the aforementioned specific -module API. + \item All modules have an initialization routine + \item All modules have a cleanup (de-initialization) routine + \item All modules should follow the API defined for them. If a routine is + impossible to implement, make sure no drastic consequences occur if + that routine were to be called. In other words, make sure that absent + routine exists and safely returns. + \item Aside from the base module structure that defines a generic module, + located in \texttt{include/vulture/module.h}, the specific API should + be followed in \texttt{include/vulture/modules/}. + \item Each module has a list of operations that it should be able to safely + execute. This structure of options is listed in the aforementioned + specific module API (\texttt{include/vulture/modules/}). \end{itemize} Listing \ref{listing-module-source} illustrates what a basic foo module should implement. In this case, the manufacturer of your foo, McFoo Enterprises, is pretty popular, and their device model is called a McFoo9000. The following is -how a McFoo900 module implementation of the foo API. The competition, -TacoFoo, would implement their version similarly, however they might have a few -extra Bells and whistles they can use. +a McFoo900 module implementation of the foo API. The competition, TacoFoo, +would implement their version similarly, however they might have a few extra +Bells and whistles they can use. + \lstset{language=c, caption=mcfoo9000\_module.c: Foo Module for the McFoo9000, - label=listing-module-source} + label=listing-module-source basicstyle=\footnotesize} \lstinputlisting{mcfoo9000_module.c} -\subsubsection{Building Your Home-brewed Module} Now that you have a module -created, the next step is to make sure it builds. To continue with our Foo -example, the following lines exlemplify turning your foo module code into a -shared library that can be used with any vulture application. However, it -would be best that such an application has the API extension to access routines -on the foo module (e.g. vul\_foo\_what\_do\_you\_foo) +\subsubsection{Building Your Home-Brewed Module} +Now that you have a module created, the next step is to make sure it builds. To +continue with our Foo example, the following lines exemplify turning your foo +module code into a shared library that can be used with any vulture application. +However, it would be best that such an application has the API extension to +access routines on the foo module (e.g. vul\_foo\_what\_do\_you\_foo) \begin{alltt} gcc -c mcfoo9000\_module.c -fPIC gcc -shared -o libmcfoo9000.so mcfoo9000\_module.o \end{alltt} -That should build yourself a mcfoo9000 foo module as a shared library from -which you can pass around to all your great friends and have them up and -foo-ing on the wings of a vulture. +That should build yourself a mcfoo9000 foo module as a shared library. Now +you can pass around this libaray to all of your great friends and have them up and +foo-ing on the wings of a vulture. Just make sure they have the extended +version of libvulture, you know, the one with the added foo API. \section{Distributing Your Module} \label{sec:module-distributing} +To have your module available to the public, the OpenVulture team at 757labs.com +maintains a public repository of user-contributed modules. These modules are +available at the project page located at +\url{http://www.757labs.com/projects/openvulture/}. Submit your module and a +description of it to the contacts at the project site. \section{Building a Vulture Application} When building a vulture application you will need to link your application with the vulture modules and vulture library. The following is a basic example of a building a hypothetical vulture application that only requires the GPS and IMU -modules. +modules. \begin{alltt} -gcc -o scavenger scavenger.c -lvulture -lgps -limu +gcc -o scavenger scavenger.c -lvulture -lvendorx\_gps -lvendorx\_imu \end{alltt} -It is assumed that the dirctory containing the vulture library modules is in +It is assumed that the directory containing the vulture library modules is in your \texttt{ldconfig} table typically specified in \texttt{/etc/ld.so.conf}. Section \ref{sec:building_the_vulture_library} explains this. If you do not want the \texttt{ldconfig} tool to know about the modules path you can use the @@ -388,7 +414,7 @@ The following might clarify this concept: \begin{alltt} gcc -o scavenger scavenger.c -L<dir\_where\_vulture\_library\_is> -lvulture --L<directory\_where \_vulture\_modules\_are> -limu -lgps +-L<directory\_where \_vulture\_modules\_are> -lvendorx\_imu -lvendorx\_gps \end{alltt} The aforementioned is a single command but was split on two lines here for the @@ -399,10 +425,10 @@ initialization of your vulture based application rather simple. This configuration file is read into a single structure that can be accessed via the vulture library API. The default configuration file, if it exists, is located -in your current running directory and is named \texttt{.config}. +in your current working directory and is named \texttt{.config}. \section{Configuration File Format} -The format of the configuration file is straight forward, and adheres to the +The format of the configuration file is straight-forward, and adheres to the following notes: \begin{itemize} \item Comments follow the \texttt{\#} character. All text after that @@ -429,30 +455,30 @@ \begin{enumerate} \item Add an enumeration to represent your parameter into - \texttt{include/vulture/conf.h}. This value should be added before the - \texttt{VUL\_CONF\_FIELD\_LAST} parameter. That "LAST" enumeration should - always be the last enumeration, as it aids in determining the size of the - enumerated type. - \item In the same file, but in a different structure, a mapping between - your added enumerated value and its literal string name needs to be - inserted. This mapping should be inserted into the \texttt{id\_to\_name} - structure, in the same place as it appears, in number/order, in the - enumeration. + \texttt{include/vulture/conf.h}. This value should be added before + the \texttt{VUL\_CONF\_FIELD\_LAST} parameter. That "LAST" + enumeration should always be the last enumeration, as it aids in + determining the count of the enumerated type. + \item In the same file, but in a different structure, a mapping between your + added enumerated value and its literal string name needs to be + inserted. This mapping should be inserted into the + \texttt{id\_to\_name} structure, in the same place as it appears, in + number/order, in the enumeration. \end{enumerate} That's it. The vulture library should now be able to handle the newly added -configuration parameter. Just remember, the literal string name, is how the +configuration parameter. Just remember, the literal string name is how the parser will match your enumeration to the value. In other words, the configuration file must use that string name to be effective. \chapter{Plan Files} Plan files (.plan) are a means of directing your platform typically through a latitude and longitudinal coordinate pair. Essentially, these user defined -files represent a set of waypoints the platform is to be directed to. Reading -these files is handled in the libvulture API. +files represent a set of waypoints the platform is to be directed to follow. +Reading these files is handled in the libvulture API. \section{Plan File Format} -The format of a plan file is relative basic. The first rule of plan file is +The format of a plan file is relatively basic. The first rule of plan file is you do not talk about plan file. The second rule is that all plan files must end with a \texttt{.plan} extension. Each entry in the plan file is delimited by a newline character. Each line in the plan file is considered an @@ -460,7 +486,7 @@ your platform to follow a path, just put a bunch of coordinate events in your plan that describe the points of the desired route. Also, comments are allowed in plan files as long as they are prefixed with a '\#' character. All data -after that comment-character is ignored. +after that comment-character are ignored. There are two kinds of events that can make up a plan file: \texttt{go} commands and \texttt{load} commands. The \texttt{go} style of command can @@ -471,13 +497,17 @@ Thereby allowing plans to load plans. Such a concept might be useful if you want your platform to perform a specific pattern. -Both \texttt{go} and \texttt{load} events allow for a duration in seconds. -Once that duration has elapsed the next event should commence. If a waypoint -is acquired before the duration has elapsed, the next event in the plan is -conducted. However, if you are performing a turn using the \texttt{degree} -syntax, then the plan will continue to move in that direction until time has -elapsed. Also, a degree of '0' means to straighten up the flaps/servos/wheel -and go straight for the given duration. +Both \texttt{go} and \texttt{load} events allow for a duration in seconds. Once +that duration has elapsed, the next event should commence. However, the use of +these values is handled by the specific vulture application that is reading the +parsed plan data. Libvulture is only responsible for parsing the plan file and +providing that data to a vulture application. How the application interprets +that data is specific to that vulture application. If a waypoint is acquired +before the duration has elapsed, the next event in the plan is conducted. +However, if you are performing a turn using the \texttt{degree} syntax, then the +plan will continue to move in that direction until time has elapsed. Also, a +degree of '0' means to straighten up the flaps/servos/wheel and go straight for +the given duration. \section{Plan File Example} \begin{alltt} @@ -489,6 +519,12 @@ go 0 degrees 5 # Continue traveling straight in the same direction \end{alltt} +\chapter{GNU Free Documentation License} +\begin{alltt} +\input{COPYING} +\end{alltt} + + %% The following is already covered above %\chapter{Configuration File} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-25 19:12:32
|
Revision: 19 http://openvulture.svn.sourceforge.net/openvulture/?rev=19&view=rev Author: enferex Date: 2009-01-25 19:12:22 +0000 (Sun, 25 Jan 2009) Log Message: ----------- Added initlize coordinate macro Added routine to turn no matter the heading (just turn!) Acknowledge when a plan has ended Modified Paths: -------------- trunk/include/vulture/plan.h trunk/src/main.c trunk/src/process.c Modified: trunk/include/vulture/plan.h =================================================================== --- trunk/include/vulture/plan.h 2009-01-25 04:49:01 UTC (rev 18) +++ trunk/include/vulture/plan.h 2009-01-25 19:12:22 UTC (rev 19) @@ -14,6 +14,14 @@ #define VUL_PLAN_MAX_NAME_LENGTH 256 +/* Zero the coordinates */ +#define VUL_PLAN_COORD_INIT(_c) {_c[0] = 0.0; _c[1] = 0.0;} + + +/* Determine if the coordinates have just been initalized */ +#define VUL_PLAN_COORD_JUST_INIT(_c) ((_c[0] == 0.0) && !(_c[1] == 0.0)) + + /* LAT/LON are used as indices to obtain either latitude or longitude from a * 2-element array organized as {latitude, longitude} */ Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-01-25 04:49:01 UTC (rev 18) +++ trunk/src/main.c 2009-01-25 19:12:22 UTC (rev 19) @@ -458,7 +458,7 @@ VUL_PRINT_ERR("Loaded servo but failed to initalize the module"); return err; } -#endif +#endif /* USE_SERVO */ return VUL_SUCCESS; } Modified: trunk/src/process.c =================================================================== --- trunk/src/process.c 2009-01-25 04:49:01 UTC (rev 18) +++ trunk/src/process.c 2009-01-25 19:12:22 UTC (rev 19) @@ -39,9 +39,17 @@ * Macros */ +/* Seconds since Epoch (1970) */ #define get_secs() time(NULL) +/* How much 0-100 we should trun, 0-100% based on bearing + * This is probably not correct but an idea right now. + * _direction: Direction to turn (in radians) + */ +#define TURN_AMOUNT(_direction) (_direction * (100.0 / M_PI)) + + /* * Forwards */ @@ -59,6 +67,7 @@ VulModule *servo, VulModule *imu); static int steer_to_direction(double direction, VulModule *servo); +static void steer_relative(double radians, VulModule *servo); static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs); @@ -74,7 +83,7 @@ static double lat, lon; VulModule *gps, *servo, *imu; VulPlan *plan, *last_event; - VulPlanCoord my_coord, prev_coord = {0.0, 0.0}; + VulPlanCoord my_coord, prev_coord; MasterControl *ctrl = (MasterControl *)control; Log log = main_get_log_file(); @@ -106,9 +115,13 @@ return NULL; } + /* Initalize */ + VUL_PLAN_COORD_INIT(my_coord); + VUL_PLAN_COORD_INIT(prev_coord); plan = last_event = NULL; lat = lon = delta_secs = 0; + /* Loop until we are told to stop */ while (!ctrl->kill_thread) { /* If we have no plan, or just finished a plan, @@ -187,7 +200,10 @@ /* Handle a plan that must have just finished */ if (!plan) - main_destroy_plan(); + { + MAIN_VERBOSE("Plan has completed\n"); + main_destroy_plan(); + } /* Give the modules time to work */ memcpy(prev_coord, my_coord, sizeof(VulPlanCoord)); @@ -269,17 +285,23 @@ VulModule *servo, VulModule *imu) { - double bearing; + double heading; /* If we are to go in current direction (degree of 0) */ if (to_degree == 0) return TRUE; - /* Direction I am traveling */ - bearing = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); + /* Direction I am traveling (if non-zero coordinates) */ + heading = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); + /* FIXME: This assumes your GPS is off, and you are going relative + * to a starting direction of 0.0. + */ + if (!heading) + steer_relative(VUL_GPS_DEGREES_TO_RADIANS(to_degree), servo); + /* Tell servo which direction to turn */ - steer_to_direction(bearing, servo); + steer_to_direction(heading, servo); /* Assume turning the servos once will set us on the proper direction */ return TRUE; @@ -295,10 +317,7 @@ { double turn_amount; - /* How much 0-100 we should trun, 0-100% based on bearing - * This is probably not correct but an idea right now - */ - turn_amount = direction * (100.0 / M_PI); + turn_amount = TURN_AMOUNT(direction); #ifdef USE_SERVO if ((direction > 0.0) && (direction < (M_PI / 2.0))) @@ -324,6 +343,36 @@ } +/* Simplified version of "steer_to_direction" + * This routine just moves the servos based on the amount told. + * The direction argument should be in RADIANS. + */ +static void steer_relative(double radians, VulModule *servo) +{ + double turn_amount; + VUL_SERVO_DIRECTION dir; + + /* Quadrant I */ + if (radians >= 0.0 && radians <= 90.0) + dir = RIGHT; + + /* Quadrant II */ + else if (radians >= 90.0 && radians <= 180.0) + dir = LEFT; + + /* Quadrant III */ + else if (radians >= 180.0 && radians <= 270.0) + dir = LEFT; + + /* Quadrant IV */ + else + dir = RIGHT; + + turn_amount = TURN_AMOUNT(radians); + vul_servo_move(servo, dir, turn_amount); +} + + /* Get the next plan event, and set the duration counter if needed * If the parent duration is the one that lapsed, skip all subtasks */ @@ -344,6 +393,6 @@ plan->rem_duration = plan->duration; } - MAIN_VERBOSE("Obtaining the next plan event."); + MAIN_VERBOSE("Obtaining the next plan event.\n"); return plan; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-25 04:49:04
|
Revision: 18 http://openvulture.svn.sourceforge.net/openvulture/?rev=18&view=rev Author: enferex Date: 2009-01-25 04:49:01 +0000 (Sun, 25 Jan 2009) Log Message: ----------- Space between the output tag string and the message Modified Paths: -------------- trunk/include/vulture/vulture.h Modified: trunk/include/vulture/vulture.h =================================================================== --- trunk/include/vulture/vulture.h 2009-01-24 19:59:04 UTC (rev 17) +++ trunk/include/vulture/vulture.h 2009-01-25 04:49:01 UTC (rev 18) @@ -8,7 +8,7 @@ #ifdef DEBUG #define VUL_DEBUG(...) \ - printf(VUL_TAG __VA_ARGS__) + printf(VUL_TAG " " __VA_ARGS__) #else #define VUL_DEBUG(_s, ...) /* Nothing */ #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 19:59:08
|
Revision: 17 http://openvulture.svn.sourceforge.net/openvulture/?rev=17&view=rev Author: enferex Date: 2009-01-24 19:59:04 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Reflect information about traveling straight given a direction of '0' Modified Paths: -------------- trunk/docs/OpenVultureManual.pdf trunk/docs/OpenVultureManual.tex Modified: trunk/docs/OpenVultureManual.pdf =================================================================== (Binary files differ) Modified: trunk/docs/OpenVultureManual.tex =================================================================== --- trunk/docs/OpenVultureManual.tex 2009-01-24 19:32:47 UTC (rev 16) +++ trunk/docs/OpenVultureManual.tex 2009-01-24 19:59:04 UTC (rev 17) @@ -472,15 +472,21 @@ want your platform to perform a specific pattern. Both \texttt{go} and \texttt{load} events allow for a duration in seconds. -Once that duration has elapsed the next event should commence. +Once that duration has elapsed the next event should commence. If a waypoint +is acquired before the duration has elapsed, the next event in the plan is +conducted. However, if you are performing a turn using the \texttt{degree} +syntax, then the plan will continue to move in that direction until time has +elapsed. Also, a degree of '0' means to straighten up the flaps/servos/wheel +and go straight for the given duration. \section{Plan File Example} \begin{alltt} # This is an example of a plan go 42.01, -76.55 2 # Travel to latitude 42 longitude -76 for at most 2 seconds -go 45 5 # Travel 45 degrees for 5 seconds +go 45 degrees 5 # Turn to 45 degrees for 5 seconds load foo.plan 5 # Load another plan file, and act on that for 5 seconds go 32.002, 44.3 9 # Travel to 32.002 latitude and 4.3 longitude for 9 seconds +go 0 degrees 5 # Continue traveling straight in the same direction \end{alltt} %% The following is already covered above This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 19:32:48
|
Revision: 16 http://openvulture.svn.sourceforge.net/openvulture/?rev=16&view=rev Author: enferex Date: 2009-01-24 19:32:47 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Reset servos after turning Modified Paths: -------------- trunk/include/vulture/modules/servo.h trunk/src/main.h trunk/src/process.c Modified: trunk/include/vulture/modules/servo.h =================================================================== --- trunk/include/vulture/modules/servo.h 2009-01-24 19:32:16 UTC (rev 15) +++ trunk/include/vulture/modules/servo.h 2009-01-24 19:32:47 UTC (rev 16) @@ -13,7 +13,7 @@ typedef enum _VUL_SERVO_DIRECTION VUL_SERVO_DIRECTION; enum _VUL_SERVO_DIRECTION { - CENTER, + CENTER, /* <---- Reset the servos to go straight */ UP, DOWN, LEFT, @@ -36,7 +36,9 @@ /* vul_servo_move * - * Control the servos to the specified direction at the specified amount + * Control the servos to the specified direction at the specified amount. + * If the 'CENTER' direction is specified, the amount argument can probably + * be ignored. */ extern VUL_ERR vul_servo_move( VulModule *servo, Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-01-24 19:32:16 UTC (rev 15) +++ trunk/src/main.h 2009-01-24 19:32:47 UTC (rev 16) @@ -46,8 +46,8 @@ /* Debugging */ -#undef USE_IMU -#undef USE_SERVO +#define USE_IMU +#define USE_SERVO /* Flags */ Modified: trunk/src/process.c =================================================================== --- trunk/src/process.c 2009-01-24 19:32:16 UTC (rev 15) +++ trunk/src/process.c 2009-01-24 19:32:47 UTC (rev 16) @@ -34,7 +34,15 @@ #include "main.h" #include "log.h" + /* + * Macros + */ + +#define get_secs() time(NULL) + + +/* * Forwards */ @@ -51,7 +59,6 @@ VulModule *servo, VulModule *imu); static int steer_to_direction(double direction, VulModule *servo); -static time_t get_secs(void); static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs); @@ -145,44 +152,61 @@ /* Handle plan action */ if (plan) - switch (plan->type) - { - case VUL_PLAN_COORD: - if (process_to_coord(prev_coord, my_coord, - plan->data.coord, - servo, imu)) - plan = next_plan_event(plan, &start_secs); - break; + { + switch (plan->type) + { + case VUL_PLAN_COORD: + if (process_to_coord(prev_coord, my_coord, + plan->data.coord, + servo, imu)) + plan = next_plan_event(plan, &start_secs); + break; - /* Degree events are duration based. - * Once the turn is made avoid turning again for the same - * event. The duration will call for the next plan. - */ - case VUL_PLAN_DEGREE: - if (plan != last_event) - { - process_to_degree(prev_coord, my_coord, - plan->data.degree, - servo, imu); - } - break; + /* Degree events are duration based. + * Once the turn is made avoid turning again for the same + * event. The duration will call for the next plan. + */ + case VUL_PLAN_DEGREE: + if (plan != last_event) + { + process_to_degree(prev_coord, my_coord, + plan->data.degree, + servo, imu); + } + /* Else, check to see if we are at proper direction */ + else + { + /* TODO */ + } + break; - default: - break; - } + default: + break; + } + } /* Handle a plan that must have just finished */ if (!plan) main_destroy_plan(); - /* And im spent.... */ - last_event = plan; + /* Give the modules time to work */ memcpy(prev_coord, my_coord, sizeof(VulPlanCoord)); start_secs = get_secs(); sleep(ctrl->delay_seconds); + + /* Lastly, should we reset servo (straighten up the wheel jeeves!) + * Being that we might have just turned, we probably need to + * continue on a straight path in that new "turned-to" direction. + */ + if (last_event && (last_event != plan) && + (last_event->type == VUL_PLAN_DEGREE)) + vul_servo_move(servo, CENTER, 0.0); + + /* Lastly */ + last_event = plan; } - /* *Lights a cig* ... yeah that was wild */ + /* Wait for a new plan to be created */ sleep(ctrl->delay_seconds); } @@ -247,6 +271,10 @@ { double bearing; + /* If we are to go in current direction (degree of 0) */ + if (to_degree == 0) + return TRUE; + /* Direction I am traveling */ bearing = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); @@ -272,7 +300,7 @@ */ turn_amount = direction * (100.0 / M_PI); -#if defined(USE_IMU) && defined(USE_SERVO) +#ifdef USE_SERVO if ((direction > 0.0) && (direction < (M_PI / 2.0))) { MAIN_VERBOSE_GPS("Turn left\n") @@ -289,19 +317,13 @@ { MAIN_VERBOSE_GPS("Waypoint is behind\n") } -#endif /* USE_IMU USE_SERVO */ +#endif /* USE_SERVO */ /* If we get here, we have not made a turning adjustment */ return FALSE; } -static time_t get_secs(void) -{ - return time(NULL); -} - - /* Get the next plan event, and set the duration counter if needed * If the parent duration is the one that lapsed, skip all subtasks */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 19:32:20
|
Revision: 15 http://openvulture.svn.sourceforge.net/openvulture/?rev=15&view=rev Author: enferex Date: 2009-01-24 19:32:16 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Demo plan for shmoo Added Paths: ----------- trunk/demo/ trunk/demo/straight_and_turn.plan Added: trunk/demo/straight_and_turn.plan =================================================================== --- trunk/demo/straight_and_turn.plan (rev 0) +++ trunk/demo/straight_and_turn.plan 2009-01-24 19:32:16 UTC (rev 15) @@ -0,0 +1,4 @@ +# Move straight for x seconds and then turn and move in that direction +go 0 degrees 5 # Travel straight +go 90 degrees 2 # Turn 90 for two seconds +go 0 degrees 5 # Continue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 18:38:00
|
Revision: 14 http://openvulture.svn.sourceforge.net/openvulture/?rev=14&view=rev Author: enferex Date: 2009-01-24 18:37:58 +0000 (Sat, 24 Jan 2009) Log Message: ----------- All degree events in a plan are duration based. Modified Paths: -------------- trunk/src/main.h trunk/src/process.c Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-01-24 16:31:38 UTC (rev 13) +++ trunk/src/main.h 2009-01-24 18:37:58 UTC (rev 14) @@ -46,8 +46,8 @@ /* Debugging */ -#define USE_IMU -#define USE_SERVO +#undef USE_IMU +#undef USE_SERVO /* Flags */ Modified: trunk/src/process.c =================================================================== --- trunk/src/process.c 2009-01-24 16:31:38 UTC (rev 13) +++ trunk/src/process.c 2009-01-24 18:37:58 UTC (rev 14) @@ -28,6 +28,7 @@ #include <vulture/plan.h> #include <vulture/module.h> #include <vulture/modules/gps.h> +#include <vulture/modules/imu.h> #include <vulture/modules/servo.h> #include "main.h" @@ -65,7 +66,7 @@ time_t start_secs, delta_secs; static double lat, lon; VulModule *gps, *servo, *imu; - VulPlan *plan; + VulPlan *plan, *last_event; VulPlanCoord my_coord, prev_coord = {0.0, 0.0}; MasterControl *ctrl = (MasterControl *)control; Log log = main_get_log_file(); @@ -98,7 +99,7 @@ return NULL; } - plan = NULL; + plan = last_event = NULL; lat = lon = delta_secs = 0; while (!ctrl->kill_thread) @@ -153,11 +154,17 @@ plan = next_plan_event(plan, &start_secs); break; + /* Degree events are duration based. + * Once the turn is made avoid turning again for the same + * event. The duration will call for the next plan. + */ case VUL_PLAN_DEGREE: - if (process_to_degree(prev_coord, my_coord, + if (plan != last_event) + { + process_to_degree(prev_coord, my_coord, plan->data.degree, - servo, imu)) - plan = next_plan_event(plan, &start_secs); + servo, imu); + } break; default: @@ -169,6 +176,7 @@ main_destroy_plan(); /* And im spent.... */ + last_event = plan; memcpy(prev_coord, my_coord, sizeof(VulPlanCoord)); start_secs = get_secs(); sleep(ctrl->delay_seconds); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 16:31:40
|
Revision: 13 http://openvulture.svn.sourceforge.net/openvulture/?rev=13&view=rev Author: enferex Date: 2009-01-24 16:31:38 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Updated configure for generating makefile for the, now removed, test directory Modified Paths: -------------- trunk/configure trunk/configure.ac Modified: trunk/configure =================================================================== --- trunk/configure 2009-01-24 16:28:42 UTC (rev 12) +++ trunk/configure 2009-01-24 16:31:38 UTC (rev 13) @@ -5494,7 +5494,7 @@ -ac_config_files="$ac_config_files Makefile modules/Makefile src/Makefile srclib/Makefile tests/Makefile" +ac_config_files="$ac_config_files Makefile modules/Makefile src/Makefile srclib/Makefile" cat >confcache <<\_ACEOF @@ -6068,7 +6068,6 @@ "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "srclib/Makefile") CONFIG_FILES="$CONFIG_FILES srclib/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2009-01-24 16:28:42 UTC (rev 12) +++ trunk/configure.ac 2009-01-24 16:31:38 UTC (rev 13) @@ -49,7 +49,6 @@ AC_CONFIG_FILES([Makefile modules/Makefile src/Makefile - srclib/Makefile - tests/Makefile]) + srclib/Makefile]) AC_OUTPUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2009-01-24 16:28:45
|
Revision: 12 http://openvulture.svn.sourceforge.net/openvulture/?rev=12&view=rev Author: enferex Date: 2009-01-24 16:28:42 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Broke the process point logic into its own translation unit Cleaned up some macros Modified Paths: -------------- trunk/src/Makefile.in trunk/src/main.c trunk/src/main.h Added Paths: ----------- trunk/src/process.c trunk/src/process.h Modified: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in 2009-01-24 16:06:12 UTC (rev 11) +++ trunk/src/Makefile.in 2009-01-24 16:28:42 UTC (rev 12) @@ -11,6 +11,7 @@ log.o \ command.o \ prompt.o \ + process.o \ server.o \ mastercontrol.o \ Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-01-24 16:06:12 UTC (rev 11) +++ trunk/src/main.c 2009-01-24 16:28:42 UTC (rev 12) @@ -22,31 +22,26 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <time.h> #include <unistd.h> #include <pthread.h> -#include "main.h" -#include "log.h" -#include "prompt.h" -#include "server.h" -#include "command.h" -#include "mastercontrol.h" - #include <vulture/vulture.h> #include <vulture/errors.h> -#include <vulture/plan.h> #include <vulture/conf.h> #include <vulture/module.h> #include <vulture/modules/gps.h> #include <vulture/modules/imu.h> #include <vulture/modules/servo.h> +#include "main.h" +#include "log.h" +#include "prompt.h" +#include "server.h" +#include "command.h" +#include "process.h" +#include "mastercontrol.h" -#define USE_IMU -#define USE_SERVO - VulConf main_config; VulPlan *main_plan = NULL; FlagType main_flags = MAIN_FLAG_NONE; @@ -69,22 +64,6 @@ static VUL_ERR init_modules(void); static void *start_server_as_thread(void *nada); -static void *start_process_loop(void *control); -static int process_to_coord( - const VulPlanCoord previous_coord, - const VulPlanCoord my_coord, - const VulPlanCoord to_coord, - VulModule *servo, - VulModule *imu); -static int process_to_degree( - const VulPlanCoord prev_coord, - const VulPlanCoord my_coord, - const int to_degree, - VulModule *servo, - VulModule *imu); -static int steer_to_direction(double direction, VulModule *servo); -static time_t get_secs(void); -static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs); static Cmd cli[] = @@ -378,7 +357,7 @@ /* Start the processing thread in (but have it do nothing: wait) */ main_master_control->do_process = FALSE; - if (pthread_create(&proc_thread, NULL, start_process_loop, + if (pthread_create(&proc_thread, NULL, process_start_loop, main_master_control) != 0) return VUL_ERR_THREAD; @@ -492,264 +471,3 @@ pthread_exit(NULL); return NULL; } - - -/* Run the process loop as a thread */ -static void *start_process_loop(void *control) -{ - const char *gps_name, *servo_name, *imu_name; - time_t start_secs, delta_secs; - static double lat, lon; - VulModule *gps, *servo, *imu; - VulPlan *plan; - VulPlanCoord my_coord, prev_coord = {0.0, 0.0}; - MasterControl *ctrl = (MasterControl *)control; - Log log = main_get_log_file(); - - /* Obtain GPS module */ - gps_name = vul_conf_get_data(*main_get_config(), - VUL_CONF_FIELD_GPS_MODULE); - - if (!gps_name || !(gps = vul_module_get(VUL_MODULE_GPS, gps_name))) - { - pthread_exit(NULL); - return NULL; - } - - /* Obtain IMU */ - imu_name = vul_conf_get_data(*main_get_config(), - VUL_CONF_FIELD_IMU_MODULE); - if (!imu_name || !(imu = vul_module_get(VUL_MODULE_IMU, imu_name))) - { - pthread_exit(NULL); - return NULL; - } - - /* Obtain servo */ - servo_name = vul_conf_get_data(*main_get_config(), - VUL_CONF_FIELD_SERVO_MODULE); - if (!servo_name || !(servo = vul_module_get(VUL_MODULE_SERVO, servo_name))) - { - pthread_exit(NULL); - return NULL; - } - - plan = NULL; - lat = lon = delta_secs = 0; - - while (!ctrl->kill_thread) - { - /* If we have no plan, or just finished a plan, - * check to see if the user has loaded one. - */ - if (!(plan = _get_plan())) - { - pthread_exit(NULL); - return NULL; - } - - start_secs = get_secs(); - while (plan && ctrl->do_process) - { - /* Skip plan in plan header */ - if (plan->type == VUL_PLAN_PLAN) - plan = next_plan_event(plan, &start_secs); - - /* Get current position */ - vul_gps_get_lat_lon_double(gps, &my_coord[LAT], &my_coord[LON]); - - /* Update log */ - log_string(log, gps->get_log_string()); - log_string(log, imu->get_log_string()); - log_string(log, servo->get_log_string()); - - /* Check duration */ - if (plan->duration) - { - plan->rem_duration -= get_secs() - start_secs; - if (plan->parent) - plan->parent->rem_duration -= get_secs() - start_secs; - - if ((plan->rem_duration <= 0) || - (plan->parent && plan->parent->rem_duration <= 0)) - { - VUL_DEBUG("Plan duration elapsed\n"); - plan = next_plan_event(plan, &start_secs); - } - } - - /* Handle plan action */ - if (plan) - switch (plan->type) - { - case VUL_PLAN_COORD: - if (process_to_coord(prev_coord, my_coord, - plan->data.coord, - servo, imu)) - plan = next_plan_event(plan, &start_secs); - break; - - case VUL_PLAN_DEGREE: - if (process_to_degree(prev_coord, my_coord, - plan->data.degree, - servo, imu)) - plan = next_plan_event(plan, &start_secs); - break; - - default: - break; - } - - /* Handle a plan that must have just finished */ - if (!plan) - main_destroy_plan(); - - /* And im spent.... */ - memcpy(prev_coord, my_coord, sizeof(VulPlanCoord)); - start_secs = get_secs(); - sleep(ctrl->delay_seconds); - } - - /* *Lights a cig* ... yeah that was wild */ - sleep(ctrl->delay_seconds); - } - - pthread_exit(NULL); - return NULL; -} - - -/* Return true only when we achieve the waypoint, false otherwise */ -static int process_to_coord( - const VulPlanCoord prev_coord, - const VulPlanCoord my_coord, - const VulPlanCoord to_coord, - VulModule *servo, - VulModule *imu) -{ - double dist, bearing, pitch[3], roll[3]; - - /* Distance to my coord */ - dist = vul_gps_distance(my_coord, to_coord); - MAIN_VERBOSE_GPS("Distance to waypoint: %f miles\n", dist); - - /* TODO: Add check here to determine if we are "at" the waypoint, - * and return true if that is the case. - */ - - /* Direction to to_coord the normalization to degrees was obtained from - * http://www.movable-type.co.uk/scripts/latlong.html - */ - bearing = fabs(vul_gps_radians_between_points(my_coord, to_coord)); - MAIN_VERBOSE_GPS( - "Direction to waypoint: %d degrees (%f radians)\n", - ((int)(360.0 + VUL_GPS_RADIANS_TO_DEGREES(bearing)) % 360), - bearing); - - /* Attempt to turn craft to a given direction. - * If we do not turn, level-off */ - if (!steer_to_direction(bearing, servo)) - { - /* Level off: get tilt information from IMU */ - vul_imu_get_pitch(imu, pitch); - vul_imu_get_roll(imu, roll); - - printf("Pitch: %f,%f,%f\nRoll: %f,%f,%f\n", - pitch[0], pitch[1], pitch[2], - roll[0], roll[1], roll[2]); - } - - return FALSE; -} - - -/* Process our current heading and steer craft amount of degrees. - * Returns true when we achieve the direction, false otherwise - */ -static int process_to_degree( - const VulPlanCoord prev_coord, - const VulPlanCoord my_coord, - const int to_degree, - VulModule *servo, - VulModule *imu) -{ - double bearing; - - /* Direction I am traveling */ - bearing = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); - - /* Tell servo which direction to turn */ - steer_to_direction(bearing, servo); - - /* Assume turning the servos once will set us on the proper direction */ - return TRUE; -} - - -/* Given a direction in RADIANS, steer the craft to that direction - * This assumes NORTH points to 0 degrees or radians. - * - * Returns true if we made the "steer" - */ -static int steer_to_direction(double direction, VulModule *servo) -{ - double turn_amount; - - /* How much 0-100 we should trun, 0-100% based on bearing - * This is probably not correct but an idea right now - */ - turn_amount = direction * (100.0 / M_PI); - -#if defined(USE_IMU) && defined(USE_SERVO) - if ((direction > 0.0) && (direction < (M_PI / 2.0))) - { - MAIN_VERBOSE_GPS("Turn left\n") - vul_servo_move(servo, LEFT, turn_amount); - return TRUE; - } - else if ((direction < (2.0*M_PI)) && (direction > (M_PI + M_PI/4.0))) - { - MAIN_VERBOSE_GPS("Turn right\n") - vul_servo_move(servo, RIGHT, turn_amount); - return TRUE; - } - else if ((direction > M_PI/2.0) && (direction < (M_PI + M_PI/4.0))) - { - MAIN_VERBOSE_GPS("Waypoint is behind\n") - } -#endif /* USE_IMU USE_SERVO */ - - /* If we get here, we have not made a turning adjustment */ - return FALSE; -} - - -static time_t get_secs(void) -{ - return time(NULL); -} - - -/* Get the next plan event, and set the duration counter if needed - * If the parent duration is the one that lapsed, skip all subtasks - */ -static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs) -{ - if (start_secs) - *start_secs = 0; - - /* Parent plan elapsed, skip over all its subtasks */ - if (plan->parent && (plan->parent->rem_duration <= 0)) - while (plan && plan->parent) - plan = plan->next; - - else if ((plan = plan->next)) - { - if (plan->duration && start_secs) - *start_secs = get_secs(); - plan->rem_duration = plan->duration; - } - - MAIN_VERBOSE("Obtaining the next plan event."); - return plan; -} Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2009-01-24 16:06:12 UTC (rev 11) +++ trunk/src/main.h 2009-01-24 16:28:42 UTC (rev 12) @@ -29,16 +29,27 @@ #include "mastercontrol.h" +/* Naming */ #define NAME "Vulture" #define MAIN_TAG "[Vulture]" #define MAIN_EXE_NAME "vulture" + + +/* Version */ #define _VERSION(_ma, _mi) #_ma"."#_mi #define VERSION _VERSION(0, 1) /* Major, Minor */ + +/* Truth */ #define TRUE 1 #define FALSE 0 +/* Debugging */ +#define USE_IMU +#define USE_SERVO + + /* Flags */ typedef unsigned short int FlagType; #define MAIN_FLAG_NONE 0x00 Added: trunk/src/process.c =================================================================== --- trunk/src/process.c (rev 0) +++ trunk/src/process.c 2009-01-24 16:28:42 UTC (rev 12) @@ -0,0 +1,319 @@ +/***************************************************************************** +* process.c +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of Vulture. +* +* Vulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Vulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with Vulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <pthread.h> + +#include <vulture/plan.h> +#include <vulture/module.h> +#include <vulture/modules/gps.h> +#include <vulture/modules/servo.h> + +#include "main.h" +#include "log.h" + +/* + * Forwards + */ + +static int process_to_coord( + const VulPlanCoord prev_coord, + const VulPlanCoord my_coord, + const VulPlanCoord to_coord, + VulModule *servo, + VulModule *imu); +static int process_to_degree( + const VulPlanCoord prev_coord, + const VulPlanCoord my_coord, + const int to_degree, + VulModule *servo, + VulModule *imu); +static int steer_to_direction(double direction, VulModule *servo); +static time_t get_secs(void); +static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs); + + +/* + * Defined + */ + +/* Run as a thread */ +void *process_start_loop(void *control) +{ + const char *gps_name, *servo_name, *imu_name; + time_t start_secs, delta_secs; + static double lat, lon; + VulModule *gps, *servo, *imu; + VulPlan *plan; + VulPlanCoord my_coord, prev_coord = {0.0, 0.0}; + MasterControl *ctrl = (MasterControl *)control; + Log log = main_get_log_file(); + + /* Obtain GPS module */ + gps_name = vul_conf_get_data(*main_get_config(), + VUL_CONF_FIELD_GPS_MODULE); + + if (!gps_name || !(gps = vul_module_get(VUL_MODULE_GPS, gps_name))) + { + pthread_exit(NULL); + return NULL; + } + + /* Obtain IMU */ + imu_name = vul_conf_get_data(*main_get_config(), + VUL_CONF_FIELD_IMU_MODULE); + if (!imu_name || !(imu = vul_module_get(VUL_MODULE_IMU, imu_name))) + { + pthread_exit(NULL); + return NULL; + } + + /* Obtain servo */ + servo_name = vul_conf_get_data(*main_get_config(), + VUL_CONF_FIELD_SERVO_MODULE); + if (!servo_name || !(servo = vul_module_get(VUL_MODULE_SERVO, servo_name))) + { + pthread_exit(NULL); + return NULL; + } + + plan = NULL; + lat = lon = delta_secs = 0; + + while (!ctrl->kill_thread) + { + /* If we have no plan, or just finished a plan, + * check to see if the user has loaded one. + */ + if (!(plan = main_get_plan())) + { + pthread_exit(NULL); + return NULL; + } + + start_secs = get_secs(); + while (plan && ctrl->do_process) + { + /* Skip plan in plan header */ + if (plan->type == VUL_PLAN_PLAN) + plan = next_plan_event(plan, &start_secs); + + /* Get current position */ + vul_gps_get_lat_lon_double(gps, &my_coord[LAT], &my_coord[LON]); + + /* Update log */ + log_string(log, gps->get_log_string()); + log_string(log, imu->get_log_string()); + log_string(log, servo->get_log_string()); + + /* Check duration */ + if (plan->duration) + { + plan->rem_duration -= get_secs() - start_secs; + if (plan->parent) + plan->parent->rem_duration -= get_secs() - start_secs; + + if ((plan->rem_duration <= 0) || + (plan->parent && plan->parent->rem_duration <= 0)) + { + VUL_DEBUG("Plan duration elapsed\n"); + plan = next_plan_event(plan, &start_secs); + } + } + + /* Handle plan action */ + if (plan) + switch (plan->type) + { + case VUL_PLAN_COORD: + if (process_to_coord(prev_coord, my_coord, + plan->data.coord, + servo, imu)) + plan = next_plan_event(plan, &start_secs); + break; + + case VUL_PLAN_DEGREE: + if (process_to_degree(prev_coord, my_coord, + plan->data.degree, + servo, imu)) + plan = next_plan_event(plan, &start_secs); + break; + + default: + break; + } + + /* Handle a plan that must have just finished */ + if (!plan) + main_destroy_plan(); + + /* And im spent.... */ + memcpy(prev_coord, my_coord, sizeof(VulPlanCoord)); + start_secs = get_secs(); + sleep(ctrl->delay_seconds); + } + + /* *Lights a cig* ... yeah that was wild */ + sleep(ctrl->delay_seconds); + } + + pthread_exit(NULL); + return NULL; +} + + +/* Return true only when we achieve the waypoint, false otherwise */ +static int process_to_coord( + const VulPlanCoord prev_coord, + const VulPlanCoord my_coord, + const VulPlanCoord to_coord, + VulModule *servo, + VulModule *imu) +{ + double dist, bearing, pitch[3], roll[3]; + + /* Distance to my coord */ + dist = vul_gps_distance(my_coord, to_coord); + MAIN_VERBOSE_GPS("Distance to waypoint: %f miles\n", dist); + + /* TODO: Add check here to determine if we are "at" the waypoint, + * and return true if that is the case. + */ + + /* Direction to to_coord the normalization to degrees was obtained from + * http://www.movable-type.co.uk/scripts/latlong.html + */ + bearing = fabs(vul_gps_radians_between_points(my_coord, to_coord)); + MAIN_VERBOSE_GPS( + "Direction to waypoint: %d degrees (%f radians)\n", + ((int)(360.0 + VUL_GPS_RADIANS_TO_DEGREES(bearing)) % 360), + bearing); + + /* Attempt to turn craft to a given direction. + * If we do not turn, level-off */ + if (!steer_to_direction(bearing, servo)) + { + /* Level off: get tilt information from IMU */ + vul_imu_get_pitch(imu, pitch); + vul_imu_get_roll(imu, roll); + + printf("Pitch: %f,%f,%f\nRoll: %f,%f,%f\n", + pitch[0], pitch[1], pitch[2], + roll[0], roll[1], roll[2]); + } + + return FALSE; +} + + +/* Process our current heading and steer craft amount of degrees. + * Returns true when we achieve the direction, false otherwise + */ +static int process_to_degree( + const VulPlanCoord prev_coord, + const VulPlanCoord my_coord, + const int to_degree, + VulModule *servo, + VulModule *imu) +{ + double bearing; + + /* Direction I am traveling */ + bearing = fabs(vul_gps_radians_between_points(prev_coord, my_coord)); + + /* Tell servo which direction to turn */ + steer_to_direction(bearing, servo); + + /* Assume turning the servos once will set us on the proper direction */ + return TRUE; +} + + +/* Given a direction in RADIANS, steer the craft to that direction + * This assumes NORTH points to 0 degrees or radians. + * + * Returns true if we made the "steer" + */ +static int steer_to_direction(double direction, VulModule *servo) +{ + double turn_amount; + + /* How much 0-100 we should trun, 0-100% based on bearing + * This is probably not correct but an idea right now + */ + turn_amount = direction * (100.0 / M_PI); + +#if defined(USE_IMU) && defined(USE_SERVO) + if ((direction > 0.0) && (direction < (M_PI / 2.0))) + { + MAIN_VERBOSE_GPS("Turn left\n") + vul_servo_move(servo, LEFT, turn_amount); + return TRUE; + } + else if ((direction < (2.0*M_PI)) && (direction > (M_PI + M_PI/4.0))) + { + MAIN_VERBOSE_GPS("Turn right\n") + vul_servo_move(servo, RIGHT, turn_amount); + return TRUE; + } + else if ((direction > M_PI/2.0) && (direction < (M_PI + M_PI/4.0))) + { + MAIN_VERBOSE_GPS("Waypoint is behind\n") + } +#endif /* USE_IMU USE_SERVO */ + + /* If we get here, we have not made a turning adjustment */ + return FALSE; +} + + +static time_t get_secs(void) +{ + return time(NULL); +} + + +/* Get the next plan event, and set the duration counter if needed + * If the parent duration is the one that lapsed, skip all subtasks + */ +static VulPlan *next_plan_event(VulPlan *plan, time_t *start_secs) +{ + if (start_secs) + *start_secs = 0; + + /* Parent plan elapsed, skip over all its subtasks */ + if (plan->parent && (plan->parent->rem_duration <= 0)) + while (plan && plan->parent) + plan = plan->next; + + else if ((plan = plan->next)) + { + if (plan->duration && start_secs) + *start_secs = get_secs(); + plan->rem_duration = plan->duration; + } + + MAIN_VERBOSE("Obtaining the next plan event."); + return plan; +} Added: trunk/src/process.h =================================================================== --- trunk/src/process.h (rev 0) +++ trunk/src/process.h 2009-01-24 16:28:42 UTC (rev 12) @@ -0,0 +1,34 @@ +/***************************************************************************** +* process.h +* +* Copyright (C) 2009, +* Matt Davis (enferex), Ethan O'Toole, and 757Labs <www.757labs.com> +* +* This file is part of Vulture. +* +* Vulture is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Vulture is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with Vulture. If not, see <http://www.gnu.org/licenses/>. +*****************************************************************************/ +#ifndef _VUL_PROCESS_H_INCLUDE +#define _VUL_PROCESS_H_INCLUDE + + +/* process_start_loop: + * + * This routine should be the callback argument or "start_routine" + * given to a pthread_create() call. + */ +void *process_start_loop(void *control); + + +#endif /* _VUL_PROCESS_H_INCLUDE */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |