aerospace-toolbox

aerospace-toolbox Commit Details

Date:2010-04-27 18:41:01 (8 years 2 months ago)
Author:James Goppert
Branch:master
Commit:ccf5e5f30bf196c675ac76879349c1a04a73f828
Parents: 2416360ba8b75dde69f3018faaedbcf104fc6dde
Message:Added demo/ help files. Deleted extra output.

Changes:
Cskeleton/demos/c_sum.dem.sce → demos/aerospace_toolbox.dem.gateway.sce
Cskeleton/src/cpp/builder_cpp.sce → help/builder_help.sce
Ctemplates/template.sce → help/en_US/build_help.sce
Ademos/flightGearUpdate.dem.sce (full)
Ahelp/en_US/flightGearUpdate.xml (full)
Mbuilder.sce (1 diff)
Metc/aerospace_toolbox.start (1 diff)
Msci_gateway/cpp/sci_flightGear.cpp (1 diff)

File differences

builder.sce
3737
3838
3939
40
40
4141
4242
4343
//tbx_builder_macros(toolbox_dir);
//tbx_builder_src(toolbox_dir);
tbx_builder_gateway(toolbox_dir);
//tbx_builder_help(toolbox_dir);
tbx_builder_help(toolbox_dir);
tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
demos/aerospace_toolbox.dem.gateway.sce
1
2
3
4
5
6
7
8
9
10
11
// ====================================================================
// Copyright INRIA 2008
// Allan CORNET
// This file is released into the public domain
// ====================================================================
demopath = get_absolute_file_path("aerospace_toolbox.dem.gateway.sce");
subdemolist = ["demo flightGearUpdate" ,"flightGearUpdate.dem.sce"];
subdemolist(:,2) = demopath + subdemolist(:,2);
// ====================================================================
demos/flightGearUpdate.dem.sce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// flightGearUpdate.dem.sce
// Copyright (C) James Goppert 2010 <jgoppert@users.sourceforge.net>
//
// flightGearUpdate.dem.sce 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.
//
// flightGearUpdate.dem.sce 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 this program. If not, see <http://www.gnu.org/licenses/>.
//
// ====================================================================
mode(-1);
lines(0);
disp('Please start flightGear with the script in the aerospace-toolbox folder');
disp('./your-path/aerospace-toolbox/fgrun.sh');
disp('Warning: if flightGear is not started this program will freeze scilab.');
disp('type <resume> when flightGear has started.');
pause
disp('aileron, elevator, rudder are mapped from -1 to 1');
disp('throttle is mapped from 0 to 1');
disp('Example: ');
disp('aileron: .1, elevator: .2, rudder: .3, throttle: 1');
disp('y=flightGearUpdate([.1;.2;.3;1])')
y=flightGearUpdate([.1;.2;.3;1])
disp(y)
// ====================================================================
// vim:ts=4:sw=4
etc/aerospace_toolbox.start
2929
3030
3131
32
33
34
35
36
37
38
39
40
32
33
34
35
36
37
38
39
40
4141
4242
4343
44
45
46
47
48
49
44
45
46
47
48
49
5050
5151
5252
// Load and add help chapter
// =============================================================================
//if or(getscilabmode() == ["NW";"STD"]) then
//mprintf("\tLoad help\n");
//path_addchapter = pathconvert(root_tlbx+"/jar");
//if ( isdir(path_addchapter) <> [] ) then
//add_help_chapter("Aerospace Toolbox", path_addchapter, %F);
//clear add_help_chapter;
//end
//clear path_addchapter;
//end
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad help\n");
path_addchapter = pathconvert(root_tlbx+"/jar");
if ( isdir(path_addchapter) <> [] ) then
add_help_chapter("Aerospace Toolbox", path_addchapter, %F);
clear add_help_chapter;
end
clear path_addchapter;
end
// Load demos
// =============================================================================
//if or(getscilabmode() == ["NW";"STD"]) then
//mprintf("\tLoad demos\n");
//pathdemos = pathconvert(root_tlbx+"/demos/aerospace_toolbox.dem.gateway.sce",%F,%T);
//add_demo("Aerospace Toolbox",pathdemos);
//clear pathdemos add_demo;
//end
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad demos\n");
pathdemos = pathconvert(root_tlbx+"/demos/aerospace_toolbox.dem.gateway.sce",%F,%T);
add_demo("Aerospace Toolbox",pathdemos);
clear pathdemos add_demo;
end
clear root_tlbx;
clear etc_tlbx;
help/builder_help.sce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// builder_help.sce
// Copyright (C) James Goppert 2010 <jgoppert@users.sourceforge.net>
//
// builder_help.sce 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.
//
// builder_help.sce 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 this program. If not, see <http://www.gnu.org/licenses/>.
//
help_dir = get_absolute_file_path('builder_help.sce');
tbx_builder_help_lang("en_US", help_dir);
//tbx_builder_help_lang("fr_FR", help_dir);
clear help_dir;
// vim:ts=4:sw=4
help/en_US/build_help.sce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// build_help.sce
// Copyright (C) James Goppert 2010 <jgoppert@users.sourceforge.net>
//
// build_help.sce 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.
//
// builder_help.sce 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 this program. If not, see <http://www.gnu.org/licenses/>.
//
tbx_build_help(TOOLBOX_TITLE,get_absolute_file_path("build_help.sce"));
// vim:ts=4:sw=4
help/en_US/flightGearUpdate.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="UTF-8"?>
<!--
* flightGearUpdate.xml
* Copyright (C) James Goppert 2010 <jgoppert@users.sourceforge.net>
*
* flightGearUpdate.xml 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.
*
* flightGearUpdate.xml 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<refentry version="5.0-subset Scilab" xml:id="flightGearUpdate" xml:lang="en"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns3="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook">
<info>
<pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008)
$</pubdate>
</info>
<refnamediv>
<refname>flightGearUpdate</refname>
<refpurpose>flightGear communication</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>y = flightGearUpdate(u)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>Send control to flightGear and receive the state.</para>
<para>u = [aileron;elevator;rudder;throttle] </para>
<para>aileron, elevator, and rudder are mapped from -1 to 1 </para>
<para>throttle is mapped from 0 to 1</para>
<para>y = [roll;pitch;yaw;p;q;r;lon;lat;alt;vN;vE;vE;vWindN;vWindE;vWindD;Ax;Ay;Az] </para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting role="example">y=flightGearUpdate([0;0;0;0])</programlisting>
</refsection>
<refsection>
<title>Authors</title>
<simplelist type="vert">
<member>James Goppert</member>
</simplelist>
</refsection>
</refentry>
sci_gateway/cpp/sci_flightGear.cpp
177177
178178
179179
180
181
182
183
184
185
186
187180
188181
189182
printf("thetadot(deg/s)=% 3.0f ", fdmRecvBuf.thetadot*rad2deg);
printf("psidot(deg/s)=% 3.0f\n", fdmRecvBuf.psidot*rad2deg);
printf("elevator (deg)= % 3.0f ", fdmRecvBuf.elevator*rad2deg);
printf("left aileron (deg)= % 3.0f ", fdmRecvBuf.left_aileron*rad2deg);
printf("right aileron (deg)= % 3.0f ", fdmRecvBuf.right_aileron*rad2deg);
printf("rudder (deg)= % 3.0f ", fdmRecvBuf.rudder*rad2deg);
printf("rpm = %3.0f\n", fdmRecvBuf.rpm[0]);
printf("Abody (m/s^2) = %10.4f %10.4f %10.4f\n",fdmRecvBuf.A_X_pilot*ft2m,fdmRecvBuf.A_Y_pilot*ft2m,fdmRecvBuf.A_Z_pilot*ft2m);
printf("\n");

Archive Download the corresponding diff file

Branches