CDU: Add CDU(I don't know why)
This commit is contained in:
parent
00adb99e9f
commit
a23fe93321
|
@ -0,0 +1,78 @@
|
|||
#BY FGPRC, WIP
|
||||
|
||||
points = getprop("/autopilot/route-manager/route/num");
|
||||
|
||||
crtPageNum = getprop("/autopilot/route-manager/route/crtPageNum");
|
||||
|
||||
var turnLEGS = func(move)
|
||||
{
|
||||
if(move == 1 and crtPageNum <= pageNum){crtPageNum = crtPageNum + 1;}
|
||||
else if(move == 0 and crtPageNum != 1){crtPageNum = crtPageNum - 1;}
|
||||
|
||||
setprop("/autopilot/route-manager/route/crtPageNum",crtPageNum);
|
||||
}
|
||||
#Display phase
|
||||
|
||||
var getLEGS = {
|
||||
angle2Point : func(line)
|
||||
{
|
||||
if(getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/leg-bearing-true-deg") != nil)
|
||||
{
|
||||
return sprintf("%3.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/leg-bearing-true-deg"));
|
||||
}
|
||||
else
|
||||
{return "";}
|
||||
},
|
||||
id : func(line)
|
||||
{
|
||||
if(getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/id") != nil)
|
||||
{
|
||||
return getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/id");
|
||||
}
|
||||
else
|
||||
{return "";}
|
||||
},
|
||||
distance : func(line)
|
||||
{
|
||||
if(getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/leg-distance-nm") != nil)
|
||||
{
|
||||
return sprintf("%3.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/leg-distance-nm"))~" NM";
|
||||
}
|
||||
else
|
||||
{return "";}
|
||||
},
|
||||
altSpdLimit : func(line)
|
||||
{
|
||||
if(getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/speed-kts") != nil)
|
||||
{
|
||||
var tmp = "";
|
||||
tmp = sprintf("%5.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+1)~"]/speed-kts"))~"/"~sprintf("%5.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+1)~"]/altitude-ft"));
|
||||
return tmp;
|
||||
}
|
||||
else if(getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/altitude-ft") != nil)
|
||||
{
|
||||
return sprintf("%5.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) *5)+line)~"]/altitude-ft"));
|
||||
}
|
||||
else
|
||||
{return "";}
|
||||
},
|
||||
};
|
||||
#var pageNum = math.ceil(points / 5);
|
||||
#if(pageNum == nil)
|
||||
# {
|
||||
# page = "";
|
||||
# }
|
||||
# else
|
||||
# {page = crtPageNum ~ "/" ~ pageNum;}
|
||||
|
||||
#if (actName != nil)
|
||||
#{
|
||||
# line1lt = sprintf("%3.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/leg-bearing-true-deg"));
|
||||
# line1l = getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/id");
|
||||
# line2ct = sprintf("%3.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/leg-distance-nm"))~" NM";
|
||||
# line1r = sprintf("%5.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/altitude-ft"));
|
||||
# if (getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/speed-kts") != nil)
|
||||
# {
|
||||
# line1r = getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/speed-kts")~"/"~sprintf("%5.0f", getprop("/autopilot/route-manager/route/wp["~(((crtPageNum -1) /5)+1)~"]/altitude-ft"));
|
||||
# }
|
||||
#}
|
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
First of all,Thanks for download and install this Project.
|
||||
It based on SEATTLE's Boeing 777 Model.
|
||||
首先,感谢您浏览下载本项目!
|
||||
本项目基于Seattle开发团队的波音777插件。
|
||||
|
||||
=====Author=====
|
||||
-Sidi Liang-
|
||||
-Yongfan Li-
|
||||
|
||||
We sincerely welcome any form of contribution to this project!
|
||||
我们诚心欢迎对本项目的任何形式的贡献!
|
||||
|
||||
======Requirement======
|
||||
This project is tested on FlightGear 2018.3.2, FlightGear 2017.3.1 and FlightGear 2017.2.1,
|
||||
so it will work correctly on those version, and it may also works on higher
|
||||
version of FlightGear.
|
||||
|
||||
========运行环境=======
|
||||
这个项目使用FlightGear 2018.3.2, FlightGear 2017.3.1 与 FlightGear 2017.2.1进行测试,所以它可以在以
|
||||
上版本的FlightGear中正常运行,并且它有可能支持更高版本的FlightGear。
|
||||
|
||||
|
||||
Hope you Enjoy this project and happy landings!
|
||||
希望您能够享受本插件带来的乐趣,起降安妥!
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,191 @@
|
|||
################################
|
||||
#| ___/ ___| _ \| _ \ / ___|#
|
||||
#| |_ | | _| |_) | |_) | | #
|
||||
#| _|| |_| | __/| _ <| |___ #
|
||||
#|_| \____|_| |_| \_\\____|#
|
||||
################################
|
||||
|
||||
var serviceable = 1;
|
||||
|
||||
if (serviceable == 1){
|
||||
|
||||
var ground = {
|
||||
|
||||
ident : 0,
|
||||
|
||||
new: func(id) { return { parents:[ground], ident: id}; },
|
||||
data : ["Comm Success"],
|
||||
dataName: ["testMessage"],
|
||||
errorMessage : "Error",
|
||||
|
||||
uplink : func(key,target){
|
||||
transmit(key, "uplink",me.ident,target);
|
||||
},
|
||||
downlinkReceived: func(key,from){
|
||||
#print(key);
|
||||
|
||||
if(findInArray(me.dataName,allAircrafts[from].dataName[key]) == 404){
|
||||
append(me.data, allAircrafts[from].data[key]);
|
||||
append(me.dataName, allAircrafts[from].dataName[key]);
|
||||
}else{
|
||||
me.data[findInArray(me.dataName, allAircrafts[from].dataName[key])] = allAircrafts[from].data[key];
|
||||
}
|
||||
#print("DownlinkReceived, "~allAircrafts[from].dataName[findInArray(allAircrafts[from].dataName, key)]~" is "~allAircrafts[from].data[findInArray(allAircrafts[from].dataName, key)]);#Bugs in this line, I'm too lazy to fix it --- 0762
|
||||
},
|
||||
requestReceived : func(key,from){
|
||||
allAircrafts[from].requestState = "<REQUEST SENT";
|
||||
print(allAircrafts[from].requestState);
|
||||
me.requestRespond(key,from);
|
||||
},
|
||||
requestRespond : func(key, to){
|
||||
if(key == "ALTNWXR"){
|
||||
#while(findInArray(me.dataName,"ALTN")==404){
|
||||
# print("Hold on for a sec... Waiting for ALTN APT to be transmit");
|
||||
# #settimer(break,1);
|
||||
#}
|
||||
#while(me.data[findInArray(me.dataName,"ALTN")] != allAircrafts[0].data[findInArray(allAircrafts[0].dataName,"ALTN")]){ #Commanded because it might cause FG to freeze - 0762
|
||||
# print("Hold on for a sec... Waiting for new ALTN APT to be transmit");
|
||||
#}
|
||||
if(findInArray(me.dataName,"ALTN")!=404){
|
||||
print("Getting WXR for "~me.data[findInArray(me.dataName,"ALTN")]);
|
||||
me.getWXR(me.data[findInArray(me.dataName,"ALTN")],me.ident,to);
|
||||
}else{
|
||||
print(me.errorMessage ~ "NO ALTN DATA");
|
||||
}
|
||||
}else if(findInArray(me.dataName,key) != 404){
|
||||
me.uplink(findInArray(me.dataName,key),to);
|
||||
}else{
|
||||
print(me.errorMessage);
|
||||
}
|
||||
},
|
||||
getWXR : func(apt,from,to){ #apt is the ICAO(4 digit)code for the airport
|
||||
http.save("https://aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&stationString="~apt~"&hoursBeforeNow=1", getprop('/sim/fg-home') ~ '/Export/METAR.xml')
|
||||
.fail(func print("Download failed!"))
|
||||
.done(func(r) processMETAR(r,from,to));
|
||||
}
|
||||
#datalink.allAircrafts[0].request("ALTNWXR",groundDefault);
|
||||
};
|
||||
|
||||
var onBoard = {
|
||||
|
||||
ident : 0,
|
||||
|
||||
states : "NO COMM",
|
||||
|
||||
new: func(id) {
|
||||
return { parents:[onBoard], ident: id};
|
||||
},
|
||||
|
||||
data : ["Comm Success by Aircraft"],
|
||||
dataName: ["test",],
|
||||
errorMessage : "Error",
|
||||
|
||||
dataNum: 1,
|
||||
|
||||
downlink : func(key,target){
|
||||
return transmit(key, "downlink",me.ident,target.ident);
|
||||
},
|
||||
uplinkReceived: func(key,from){
|
||||
if(findInArray(me.dataName,allGrounds[from].dataName[key]) == 404){
|
||||
append(me.data, allGrounds[from].data[key]);
|
||||
append(me.dataName, allGrounds[from].dataName[key]);
|
||||
me.dataNum+=1;
|
||||
}else{
|
||||
me.data[findInArray(me.dataName, allGrounds[from].dataName[key])] = allGrounds[from].data[key];
|
||||
}
|
||||
|
||||
print("UplinkReceived, "~allGrounds[from].dataName[key]~" is "~allGrounds[from].data[key]);
|
||||
if(me.data[size(me.data)-1] == "Comm Success"){
|
||||
me.states = "READY";
|
||||
}
|
||||
if(allGrounds[from].dataName[key] == "ALTNWXR"){
|
||||
cdu.outputUI(content = "ALTN WXR: "~me.data[size(me.data)-1]);
|
||||
}
|
||||
},
|
||||
request : func(key,target){
|
||||
me.requestState = "REQUESTING";
|
||||
print(me.requestState);
|
||||
if(key == "ALTNWXR"){
|
||||
me.downlink(findInArray(me.dataName, "ALTN"),allGrounds[0]);
|
||||
}
|
||||
#print("I made it here");
|
||||
transmit(key,"request",me.ident,target.ident);
|
||||
|
||||
|
||||
},
|
||||
|
||||
testConnection: func(){
|
||||
|
||||
me.request("testMessage",allGrounds[0]);
|
||||
print("DATALINK COMM TEST STARTED");
|
||||
me.states = "NO COMM";
|
||||
|
||||
},
|
||||
|
||||
requestState: "<REQUEST",
|
||||
|
||||
};
|
||||
|
||||
var transmit = func(key,tag,planeId,groundId){
|
||||
var transmitTimer = maketimer(rand()*5, func(){
|
||||
if(tag == "uplink"){
|
||||
allAircrafts[planeId].uplinkReceived(key,groundId);
|
||||
}else if(tag == "downlink"){
|
||||
allGrounds[groundId].downlinkReceived(key,planeId);
|
||||
}else if(tag == "request"){
|
||||
allGrounds[groundId].requestReceived(key,planeId);
|
||||
}
|
||||
});
|
||||
transmitTimer.singleShot = 1;
|
||||
transmitTimer.start();
|
||||
return transmitTimer;
|
||||
}
|
||||
|
||||
|
||||
var allAircrafts = [];
|
||||
var allGrounds = [];
|
||||
var aircraft1 = onBoard.new(0);
|
||||
var groundDefault = ground.new(0);
|
||||
|
||||
append(allGrounds, groundDefault);
|
||||
append(allAircrafts, aircraft1);
|
||||
|
||||
#allAircrafts[0].request("testMessage",allGrounds[0]);
|
||||
#allAircrafts[0].downlink("test",allGrounds[0]);
|
||||
|
||||
var findInArray = func(target, obj){
|
||||
for(var i = 0; i < size(target); i+=1){
|
||||
if(target[i] == obj){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 404;
|
||||
}
|
||||
|
||||
var processMETAR = func(r,from,to){
|
||||
#For datalink wxr request use
|
||||
#print("Finished request with status: " ~ r.status ~ " " ~ r.reason);
|
||||
var path = getprop("/sim/fg-home") ~ '/Export/METAR.xml';
|
||||
var data = io.readfile(path);
|
||||
var result = "";
|
||||
for(var i = 0; i < utf8.size(data)-2; i = i+1){
|
||||
if(utf8.chstr(data[i])~utf8.chstr(data[i+1])~utf8.chstr(data[i+2]) == "raw"){
|
||||
var metar_j = i+9;
|
||||
while(utf8.chstr(data[metar_j]) != "<"){
|
||||
result = result~utf8.chstr(data[metar_j]);
|
||||
metar_j += 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#print(result);
|
||||
if(result != ""){
|
||||
append(allGrounds[from].data,result);
|
||||
append(allGrounds[from].dataName,"ALTNWXR");
|
||||
allGrounds[from].uplink(findInArray(allGrounds[from].data,result),to);
|
||||
}else{
|
||||
print("nil Error");
|
||||
cdu.outputUI(content = "ALTN WXR NOT AVAILABLE");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
<!-- $Id: display-text.xml,v 1.2 2009/11/02 16:31:26 vmmeazza Exp $ -->
|
||||
<!--
|
||||
Zeppelin NT07 airship.
|
||||
|
||||
Copyright (C) 2009 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
This file is licensed under the GPL license v2 or later.
|
||||
-->
|
||||
<PropertyList>
|
||||
|
||||
<params>
|
||||
<property type="string">engines/engine[0]/mp-inhg</property>
|
||||
<factor type="double">1.0</factor>
|
||||
<offset type="double">0.0</offset>
|
||||
<format type="string">%2.1f</format>
|
||||
<color>
|
||||
<red type="double">0.0</red>
|
||||
<green type="double">1.0</green>
|
||||
<blue type="double">0.0</blue>
|
||||
</color>
|
||||
</params>
|
||||
|
||||
<text>
|
||||
<name>text</name>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
<type type="string">text-value</type>
|
||||
<property alias="../../params/property"/>
|
||||
<scale alias="../../params/factor"/>
|
||||
<offset alias="../../params/offset"/>
|
||||
<format>%s</format>
|
||||
<truncate type="bool">false</truncate>
|
||||
<font>Helvetica.txf</font>
|
||||
<draw-text type="bool">true</draw-text>
|
||||
<draw-alignment type="bool">false</draw-alignment>
|
||||
<draw-boundingbox type="bool">false</draw-boundingbox>
|
||||
<alignment alias="../../params/alignment"/>
|
||||
<character-size alias="../../params/character-size"/>
|
||||
</text>
|
||||
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<diffuse>
|
||||
<red alias="../../../params/color/red"/>
|
||||
<green alias="../../../params/color/green"/>
|
||||
<blue alias="../../../params/color/blue"/>
|
||||
</diffuse>
|
||||
<ambient>
|
||||
<red alias="../../../params/color/red"/>
|
||||
<green alias="../../../params/color/green"/>
|
||||
<blue alias="../../../params/color/blue"/>
|
||||
</ambient>
|
||||
<emission>
|
||||
<red alias="../../../params/color/red"/>
|
||||
<green alias="../../../params/color/green"/>
|
||||
<blue alias="../../../params/color/blue"/>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
|
@ -0,0 +1,572 @@
|
|||
####################################
|
||||
# _____ ____ ____ ____ ____ #
|
||||
# | ___/ ___| _ \| _ \ / ___| #
|
||||
# | |_ | | _| |_) | |_) | | #
|
||||
# | _|| |_| | __/| _ <| |___ #
|
||||
# |_| \____|_| |_| \_\\____| #
|
||||
# #
|
||||
####################################
|
||||
|
||||
var echoAppr = func(page,selectedRwy = ""){
|
||||
var dest = getprop("/autopilot/route-manager/destination/airport");
|
||||
var apt = airportinfo(dest);
|
||||
if(dest != ""){
|
||||
var allAppr = apt.getApproachList();
|
||||
var defaultNum = size(keys(apt.runways));
|
||||
var echoedAppr = [];
|
||||
var allRwys = keys(apt.runways);
|
||||
var echoedRwys = [];
|
||||
var rwysTotal = size(allRwys);
|
||||
var i = 0;
|
||||
var apprNum = size(allAppr);
|
||||
var countEnd = 0;
|
||||
if(apprNum != 0){
|
||||
var countStart = (page - 1) * 5;
|
||||
if(countStart > apprNum){
|
||||
#setprop("/instrumentation/cdu/appr/page", page - 1);
|
||||
}
|
||||
count = countStart;
|
||||
while(i <= 5){
|
||||
if(count <= apprNum-1){
|
||||
append(echoedAppr, allAppr[count]);
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
countEnd = i + 1;
|
||||
setprop("/instrumentation/cdu/appr/apprCountEndPage", page);
|
||||
var j = i;
|
||||
while(j <= 5){
|
||||
append(echoedAppr, "");
|
||||
j+=1;
|
||||
}
|
||||
i = 6;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var countStart = (page - 1) * 5;
|
||||
if(countStart > apprNum){
|
||||
setprop("/instrumentation/cdu/appr/page", page - 1);
|
||||
}
|
||||
count = countStart;
|
||||
while(i <= 5){
|
||||
if(count < defaultNum){
|
||||
append(echoedAppr, "DEFAULT");
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
countEnd = i + 1;
|
||||
setprop("/instrumentation/cdu/appr/apprCountEndPage", page);
|
||||
var j = i;
|
||||
while(j <= 5){
|
||||
append(echoedAppr, "");
|
||||
j+=1;
|
||||
}
|
||||
i = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setprop("/instrumentation/cdu/appr/apprCountEnd", countEnd);
|
||||
|
||||
return echoedAppr;
|
||||
|
||||
}else{
|
||||
return ["", "", "", "", ""];
|
||||
}
|
||||
}
|
||||
|
||||
var echoRwysAppr = func(pageRwys){
|
||||
if(getprop("/autopilot/route-manager/destination/airport") != ""){
|
||||
var apt = airportinfo(getprop("/autopilot/route-manager/destination/airport"));
|
||||
var allRwys = keys(apt.runways);
|
||||
var echoedRwys = [];
|
||||
var rwysCount = size(allRwys);
|
||||
var listStart = getprop("/instrumentation/cdu/appr/apprCountEnd");
|
||||
pageRwys = (pageRwys - getprop("/instrumentation/cdu/appr/apprCountEndPage"))+1;
|
||||
var countStart = (pageRwys - 1) * 5;
|
||||
var count = countStart;
|
||||
|
||||
var i = 0;
|
||||
var tag = 5 - listStart;
|
||||
if(countStart != 0){
|
||||
tag = 5;
|
||||
}
|
||||
while(i <= tag){
|
||||
if(count < rwysCount){
|
||||
append(echoedRwys, allRwys[count]);
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
append(echoedRwys, "");
|
||||
i = i + 1;
|
||||
setprop("/instrumentation/cdu/appr/rwyCountLastPage", pageRwys);
|
||||
}
|
||||
}
|
||||
|
||||
return echoedRwys;
|
||||
}else{
|
||||
return ["", "", "", "", ""];
|
||||
}
|
||||
}
|
||||
|
||||
var arrNextPge = func(){
|
||||
var tmp = getprop("/instrumentation/cdu/appr/page");
|
||||
if(tmp + 1 <= getprop("/instrumentation/cdu/appr/rwyCountLastPage")){
|
||||
tmp = tmp + 1;
|
||||
setprop("/instrumentation/cdu/appr/page", tmp);
|
||||
}
|
||||
}
|
||||
var arrPrevPge = func(){
|
||||
var tmp = getprop("/instrumentation/cdu/appr/page");
|
||||
if(tmp - 1 >= 1){
|
||||
tmp = tmp - 1;
|
||||
}
|
||||
setprop("/instrumentation/cdu/appr/page", tmp);
|
||||
}
|
||||
|
||||
###########################################################
|
||||
|
||||
var getRwyOfSids = func(sidID){
|
||||
var apt = airportinfo(getprop("/autopilot/route-manager/departure/airport"));
|
||||
var allRwys = keys(apt.runways);
|
||||
if(sidID != "DEFAULT"){
|
||||
var rwysCount = size(allRwys);
|
||||
for(var i = 0; i < rwysCount; i+=1){
|
||||
var allSids = apt.sids(allRwys[i]);
|
||||
for(var j = 0; j < size(allSids); j+=1){
|
||||
if(sidID == allSids[j]){
|
||||
return allRwys[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(getprop("/autopilot/route-manager/departure/newrunway") == ""){
|
||||
return allRwys[0];
|
||||
}else if(getprop("/autopilot/route-manager/departure/newrunway") == nil){
|
||||
return allRwys[0];
|
||||
}else{
|
||||
return getprop("/autopilot/route-manager/departure/newrunway");
|
||||
}
|
||||
}
|
||||
}
|
||||
var findAirportsWithinNumber = func(num)
|
||||
{
|
||||
var range = 10;
|
||||
var nApts = findAirportsWithinRange(range);
|
||||
|
||||
while(size (nApts) <= num)
|
||||
{
|
||||
range = range + 10;
|
||||
nApts = findAirportsWithinRange(range);
|
||||
}
|
||||
return nApts;
|
||||
}
|
||||
#nApts = findAirportsWithinNumber(4);
|
||||
#print(nApts[0].id);
|
||||
var echoSids = func(page,selectedRwy = ""){
|
||||
var apt = airportinfo(getprop("/autopilot/route-manager/departure/airport"));
|
||||
if(getprop("/autopilot/route-manager/departure/airport") != ""){
|
||||
if(selectedRwy != ""){
|
||||
var allSids = apt.sids(selectedRwy);
|
||||
var defaultNum = 1;
|
||||
}else{
|
||||
var allSids = apt.sids();
|
||||
var allSids = apt.sids();
|
||||
var defaultNum = size(keys(apt.runways));
|
||||
}
|
||||
var echoedSids = [];
|
||||
var i = 0;
|
||||
var sidsNum = size(allSids);
|
||||
if(sidsNum != 0){
|
||||
var countStart = (page - 1) * 5;
|
||||
if(countStart > sidsNum){
|
||||
setprop("/instrumentation/cdu/sids/page", page - 1);
|
||||
}
|
||||
count = countStart;
|
||||
while(i <= 5){
|
||||
if(count <= sidsNum-1){
|
||||
append(echoedSids, allSids[count]);
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
append(echoedSids, "");
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var countStart = (page - 1) * 5;
|
||||
if(countStart > sidsNum){
|
||||
setprop("/instrumentation/cdu/sids/page", page - 1);
|
||||
}
|
||||
count = countStart;
|
||||
while(i <= 5){
|
||||
if(count < defaultNum){
|
||||
append(echoedSids, "DEFAULT");
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
append(echoedSids, "");
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return echoedSids;
|
||||
}else{
|
||||
return ["", "", "", "", ""];
|
||||
}
|
||||
}
|
||||
var echoRwys = func(pageRwys){
|
||||
if(getprop("/autopilot/route-manager/departure/airport") != ""){
|
||||
var apt = airportinfo(getprop("/autopilot/route-manager/departure/airport"));
|
||||
var allRwys = keys(apt.runways);
|
||||
var echoedRwys = [];
|
||||
var rwysCount = size(allRwys);
|
||||
|
||||
var countStart = (pageRwys - 1) * 5;
|
||||
var count = countStart;
|
||||
var i = 0;
|
||||
while(i <= 5){
|
||||
if(count < rwysCount){
|
||||
append(echoedRwys, allRwys[count]);
|
||||
i = i + 1;
|
||||
count = count + 1;
|
||||
}else{
|
||||
append(echoedRwys, "");
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
return echoedRwys;
|
||||
}else{
|
||||
return ["", "", "", "", ""];
|
||||
}
|
||||
}
|
||||
|
||||
var getIRSPos = func(cduInputedPos){
|
||||
|
||||
call(func inputPosLatConversion(cduInputedPos), nil, var err = []);
|
||||
if(size(err)){
|
||||
setprop("/instrumentation/cdu/input", "INVALID ENTRY");
|
||||
}else{
|
||||
setprop("/instrumentation/fmc/inertialposlat", inputPosLatConversion(cduInputedPos));
|
||||
}
|
||||
|
||||
call(func inputPosLonConversion(cduInputedPos), nil, var err1 = []);
|
||||
if(size(err1)){
|
||||
setprop("/instrumentation/cdu/input", "INVALID ENTRY");
|
||||
}else{
|
||||
setprop("/instrumentation/fmc/inertialposlon", inputPosLonConversion(cduInputedPos));
|
||||
}
|
||||
setprop("/instrumentation/fmc/inertialpos", latdeg2latDMM(getprop("/instrumentation/fmc/inertialposlat"))~" "~londeg2lonDMM(getprop("/instrumentation/fmc/inertialposlon")));
|
||||
}
|
||||
var getGpsPos = func(){
|
||||
var gpsPosGot = latdeg2latDMM(getprop("/position/latitude-deg"))~" "~londeg2lonDMM(getprop("/position/longitude-deg"));
|
||||
setprop("/instrumentation/fmc/gpspos", gpsPosGot);
|
||||
setprop("/instrumentation/fmc/gpsposlat", getprop("/position/latitude-deg"));
|
||||
setprop("/instrumentation/fmc/gpsposlon", getprop("/position/longitude-deg"));
|
||||
return gpsPosGot;
|
||||
}
|
||||
var getLastPos = func(){
|
||||
setprop("/instrumentation/fmc/lastposlat", getprop("/position/latitude-deg"));
|
||||
setprop("/instrumentation/fmc/lastposlon", getprop("/position/longitude-deg"));
|
||||
var lastPosGot = latdeg2latDMM(getprop("/position/latitude-deg"))~" "~londeg2lonDMM(getprop("/position/longitude-deg"));
|
||||
setprop("/instrumentation/fmc/lastpos", lastPosGot);
|
||||
return lastPosGot;
|
||||
}
|
||||
|
||||
var execPushed = func(){
|
||||
if (getprop("/autopilot/route-manager/isArmed") == 1){
|
||||
if(getprop("/autopilot/route-manager/destination/newApproach") != nil){
|
||||
setprop("/autopilot/route-manager/destination/approach", getprop("/autopilot/route-manager/destination/newApproach"));
|
||||
}
|
||||
setprop("/autopilot/route-manager/isChanged",0);
|
||||
setprop("/autopilot/route-manager/input","@ACTIVATE");
|
||||
setprop("/autopilot/route-manager/isArmed", -1);
|
||||
}
|
||||
if (getprop("/instrumentation/fmc/VNAV/isChanged") == 0){
|
||||
setprop("/autopilot/route-manager/cruise/altitude-FL", getprop("/instrumentation/fmc/VNAV/cruise/altitude-FL"));
|
||||
setprop("/autopilot/route-manager/cruise/altitude-ft", getprop("/instrumentation/fmc/VNAV/cruise/altitude-ft"));
|
||||
setprop("/autopilot/settings/transition-altitude", getprop("/instrumentation/fmc/VNAV/TransALT"));
|
||||
setprop("/instrumentation/fmc/VNAV/isChanged", 1);
|
||||
}
|
||||
}
|
||||
|
||||
var sidNextPge = func(){
|
||||
var tmp = getprop("/instrumentation/cdu/sids/page");
|
||||
tmp = tmp + 1;
|
||||
setprop("/instrumentation/cdu/sids/page", tmp);
|
||||
}
|
||||
var sidPrevPge = func(){
|
||||
var tmp = getprop("/instrumentation/cdu/sids/page");
|
||||
if(tmp - 1 >= 1){
|
||||
tmp = tmp - 1;
|
||||
}
|
||||
setprop("/instrumentation/cdu/sids/page", tmp);
|
||||
}
|
||||
|
||||
var DisplayLATorBRG = func(){
|
||||
if (getprop("/instrumentation/cdu/LATorBRG") == 0){
|
||||
return "LAT/LON>";
|
||||
}
|
||||
else{
|
||||
return "BRG/DIST>";
|
||||
}
|
||||
}
|
||||
var echoLatBrg = func(){
|
||||
if(getprop("/instrumentation/cdu/LATorBRG") == 1){
|
||||
return getGpsPos();
|
||||
}
|
||||
else if(getprop("/instrumentation/cdu/LATorBRG") == 0){
|
||||
return "000*/0.0NM";
|
||||
}
|
||||
}
|
||||
|
||||
var isUpdateArm = func(){
|
||||
if (getprop("/instrumentation/cdu/isARMED") == 0)
|
||||
{
|
||||
return "ARM";
|
||||
}
|
||||
else if(getprop("/instrumentation/cdu/isARMED") == 1)
|
||||
{
|
||||
return "ARMED";
|
||||
}
|
||||
}
|
||||
var echoUpdateArmed = func(){
|
||||
if (getprop("/instrumentation/cdu/isARMED") == 0)
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
else if (getprop("/instrumentation/cdu/isARMED") == 1)
|
||||
{
|
||||
return "NOW>"
|
||||
}
|
||||
}
|
||||
|
||||
var crzAltCDUInput = func(){
|
||||
var cduInput = getprop("/instrumentation/cdu/input");
|
||||
var msg = getprop("/instrumentation/fmc/isMsg");
|
||||
if (find("FL", cduInput) != -1){
|
||||
if (size(cduInput) <=5 ){
|
||||
if (num(substr(cduInput,2,size(cduInput))) != nil){
|
||||
if (substr(cduInput,2,size(cduInput)) >= 100){
|
||||
if (substr(cduInput,2,size(cduInput)) <= 412){
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-FL",cduInput);
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-ft",FL2feet(cduInput));
|
||||
cduInput = "";
|
||||
}else{
|
||||
cduInput = "INVALID ENTRY";
|
||||
msg = 1;
|
||||
}
|
||||
}else{
|
||||
cduInput = "INVALID ENTRY";
|
||||
msg = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cduInput = "INVALID ENTRY";
|
||||
msg = 1;
|
||||
}
|
||||
|
||||
} else if (find("FL", cduInput) == -1){
|
||||
|
||||
if (num(cduInput) != nil){
|
||||
if (cduInput >= 1000){
|
||||
|
||||
if (cduInput < 10000){
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-ft",cduInput);
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-FL",feet2FL(cduInput));
|
||||
cduInput = "";
|
||||
} else if (cduInput >= 10000){
|
||||
|
||||
if (cduInput <= 41200){
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-ft",cduInput);
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-FL",feet2FL(cduInput));
|
||||
cduInput = "";
|
||||
}else if(cduInput >= 10){
|
||||
if (cduInput <= 412){
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-FL","FL"~cduInput);
|
||||
setprop("/instrumentation/fmc/VNAV/cruise/altitude-ft",int(cduInput~"00"));
|
||||
cduInput = "";
|
||||
}else{
|
||||
cduInput = "INVALID ENTRY";
|
||||
|
||||
}
|
||||
}else{
|
||||
cduInput = "INVALID ENTRY";
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
cduInput = "INVALID ENTRY";
|
||||
}
|
||||
|
||||
}else{
|
||||
#else for "num(cduInput) != nil"
|
||||
cduInput = "INVALID ENTRY";
|
||||
}
|
||||
}else{
|
||||
#else for "find("FL", cduInput) == -1"
|
||||
cduInput = "INVALID ENTRY";
|
||||
}
|
||||
|
||||
return cduInput;
|
||||
}
|
||||
|
||||
var findPosWithGate = func(gateName,airport){
|
||||
#Done by Sidi Liang ---0762
|
||||
#gateName\airport are string
|
||||
#Currently only supports airports downloaded by Terrasync or custom scenery added by launcher or commandlines.
|
||||
#Supports the airports which parking in groundnet was formatted as "name" or "name"+"number".
|
||||
#Behaviour: Write the coordinate to the property tree if the gate was found in scenery that was supported(see above), and the gate number will be displayed in the CDU.
|
||||
# Return 404 if groundnet file or requested gate weren't found.
|
||||
var firstLetter = utf8.chstr(airport[0]);
|
||||
var secLetter = utf8.chstr(airport[1]);
|
||||
var thirdLetter = utf8.chstr(airport[2]);
|
||||
|
||||
var groundNetData = io.read_airport_properties(airport, "groundnet");
|
||||
var parkingListData = nil;
|
||||
var groundNetDataGot = 0;
|
||||
var gateGot = 0;
|
||||
if(groundNetData == nil){
|
||||
|
||||
if(getprop("sim/fg-scenery")!=nil){
|
||||
var getGroundNetDataAttempt = call(func io.readxml(getprop("/sim/fg-scenery") ~ '/Airports/'~firstLetter~'/'~secLetter~'/'~thirdLetter~'/'~airport~'.groundnet.xml'), nil, var err = []);
|
||||
if (size(err)){
|
||||
groundNetData = nil;
|
||||
}else{
|
||||
groundNetData = io.readxml(getprop("/sim/fg-scenery") ~ '/Airports/'~firstLetter~'/'~secLetter~'/'~thirdLetter~'/'~airport~'.groundnet.xml');
|
||||
}
|
||||
if(groundNetData != nil){
|
||||
parkingListData = groundNetData.getNode("groundnet/parkingList");
|
||||
#props.dump(parkingListData); # dump groundNetData
|
||||
groundNetDataGot = 1;
|
||||
}
|
||||
|
||||
if(!groundNetDataGot){
|
||||
var i_scenery = 1;
|
||||
while(getprop("sim/fg-scenery["~i_scenery~"]") != nil){
|
||||
var getGroundNetDataAttempt = call(func io.readxml(getprop("sim/fg-scenery["~i_scenery~"]") ~ '/Airports/'~firstLetter~'/'~secLetter~'/'~thirdLetter~'/'~airport~'.groundnet.xml'), nil, var err = []);
|
||||
if (size(err)){
|
||||
groundNetData = nil;
|
||||
}else{
|
||||
groundNetData = io.readxml(getprop("sim/fg-scenery["~i_scenery~"]") ~ '/Airports/'~firstLetter~'/'~secLetter~'/'~thirdLetter~'/'~airport~'.groundnet.xml');
|
||||
}
|
||||
if(groundNetData != nil){
|
||||
groundNetDataGot = 1;
|
||||
parkingListData = groundNetData.getNode("groundnet/parkingList");
|
||||
#props.dump(parkingListData); # dump groundNetData
|
||||
break;
|
||||
}
|
||||
i_scenery += 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
#props.dump(groundNetData); # dump groundNetData
|
||||
parkingListData = groundNetData.getNode("groundnet/parkingList");
|
||||
groundNetDataGot = 1;
|
||||
}
|
||||
|
||||
if(groundNetDataGot){
|
||||
var getGateName = parkingListData.getNode("Parking").getValue("___name");
|
||||
if(parkingListData.getNode("Parking").getValue("___number") != nil){
|
||||
getGateName = getGateName ~ parkingListData.getNode("Parking").getValue("___number");#Add support to the name+number format type of groundnet file.
|
||||
}
|
||||
if(getGateName == gateName){
|
||||
#print(gateName);
|
||||
var lat = parkingListData.getNode("Parking").getValue("___lat");
|
||||
var lon = parkingListData.getNode("Parking").getValue("___lon");
|
||||
print(lat);
|
||||
print(lon);
|
||||
gateGot = 1;
|
||||
}else{
|
||||
var i_Parking = 0;
|
||||
while(parkingListData.getNode("Parking["~i_Parking~"]") != nil){
|
||||
getGateName = parkingListData.getNode("Parking["~i_Parking~"]").getValue("___name");
|
||||
if(parkingListData.getNode("Parking["~i_Parking~"]").getValue("___number") != nil){
|
||||
getGateName = getGateName ~ parkingListData.getNode("Parking["~i_Parking~"]").getValue("___number");#Add support to the name+number format type of groundnet file.
|
||||
}
|
||||
if(getGateName == gateName){
|
||||
#print(gateName);
|
||||
var lat = parkingListData.getNode("Parking").getValue("___lat");
|
||||
var lon = parkingListData.getNode("Parking").getValue("___lon");
|
||||
print(lat);
|
||||
print(lon);
|
||||
var latOutput = "";
|
||||
var lonOutput = "";
|
||||
var latOutput1 = "";#擦写板格式
|
||||
var lonOutput1 = "";
|
||||
var nOrS = utf8.chstr(lat[0]);
|
||||
var eOrW = utf8.chstr(lon[0]);
|
||||
var latpointer = 0;
|
||||
var lonpointer = 0;
|
||||
latOutput = latOutput ~ nOrS;
|
||||
lonOutput = lonOutput ~ eOrW;
|
||||
latOutput1 = latOutput1 ~ nOrS;
|
||||
lonOutput1 = lonOutput1 ~ eOrW;
|
||||
if(utf8.chstr(lat[3]) == " "){
|
||||
latOutput = latOutput~utf8.chstr(lat[1])~utf8.chstr(lat[2])~"*";
|
||||
latOutput1 = latOutput1~utf8.chstr(lat[1])~utf8.chstr(lat[2]);
|
||||
latpointer = 4;
|
||||
}else{
|
||||
latOutput = latOutput~"0"~utf8.chstr(lat[1])~"*";
|
||||
latOutput1 = latOutput1~"0"~utf8.chstr(lat[1]);
|
||||
latpointer = 3;
|
||||
}
|
||||
if(utf8.chstr(lon[2]) == " "){
|
||||
lonOutput = lonOutput~"0"~utf8.chstr(lon[1])~"*";
|
||||
lonOutput1 = lonOutput1~"0"~utf8.chstr(lon[1]);
|
||||
lonpointer = 3;
|
||||
}else if(utf8.chstr(lon[3]) == " "){
|
||||
lonOutput = lonOutput~utf8.chstr(lon[1])~utf8.chstr(lon[2])~"*";
|
||||
lonOutput1 = lonOutput1~utf8.chstr(lon[1])~utf8.chstr(lon[2]);
|
||||
lonpointer = 4;
|
||||
}else{
|
||||
lonOutput = lonOutput~utf8.chstr(lon[1])~utf8.chstr(lon[2])~utf8.chstr(lon[3])~"*";
|
||||
lonOutput1 = lonOutput1~utf8.chstr(lon[1])~utf8.chstr(lon[2])~utf8.chstr(lon[3]);
|
||||
lonpointer = 5;
|
||||
}
|
||||
|
||||
if(utf8.chstr(lat[latpointer+1]) == "."){
|
||||
latOutput = latOutput ~ "0"~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]);
|
||||
latOutput1 = latOutput1 ~ "0"~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]);
|
||||
}else if(utf8.chstr(lat[latpointer+2]) == "."){
|
||||
latOutput = latOutput ~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]) ~ utf8.chstr(lat[latpointer+3]);
|
||||
latOutput1 = latOutput1 ~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]) ~ utf8.chstr(lat[latpointer+3]);
|
||||
}else if(utf8.chstr(lat[latpointer+3]) == "."){
|
||||
latOutput = latOutput ~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]) ~ utf8.chstr(lat[latpointer+3]) ~ utf8.chstr(lat[latpointer+4]);
|
||||
latOutput1 = latOutput1 ~ utf8.chstr(lat[latpointer]) ~ utf8.chstr(lat[latpointer+1]) ~ utf8.chstr(lat[latpointer+2]) ~ utf8.chstr(lat[latpointer+3]) ~ utf8.chstr(lat[latpointer+4]);
|
||||
}
|
||||
|
||||
if(utf8.chstr(lon[lonpointer+1]) == "."){
|
||||
lonOutput = lonOutput ~ "0"~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]);
|
||||
lonOutput1 = lonOutput1 ~ "0"~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]);
|
||||
}else if(utf8.chstr(lon[lonpointer+2]) == "."){
|
||||
lonOutput = lonOutput ~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]) ~ utf8.chstr(lon[lonpointer+3]);
|
||||
lonOutput1 = lonOutput1 ~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]) ~ utf8.chstr(lon[lonpointer+3]);
|
||||
}else if(utf8.chstr(lat[lonpointer+3]) == "."){
|
||||
lonOutput = lonOutput ~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]) ~ utf8.chstr(lon[lonpointer+3]) ~ utf8.chstr(lon[lonpointer+4]);
|
||||
lonOutput1 = lonOutput1 ~ utf8.chstr(lon[lonpointer]) ~ utf8.chstr(lon[lonpointer+1]) ~ utf8.chstr(lon[lonpointer+2]) ~ utf8.chstr(lon[lonpointer+3]) ~ utf8.chstr(lon[lonpointer+4]);
|
||||
}
|
||||
setprop("instrumentation/fmc/gate-pos-lat-str",latOutput);
|
||||
setprop("instrumentation/fmc/gate-pos-lon-str",lonOutput);
|
||||
setprop("instrumentation/fmc/gate-pos-lat-noformat",latOutput1);
|
||||
setprop("instrumentation/fmc/gate-pos-lon-noformat",lonOutput1);
|
||||
|
||||
|
||||
gateGot = 1;
|
||||
break;
|
||||
}
|
||||
i_Parking += 1;
|
||||
}
|
||||
}
|
||||
if(!gateGot){
|
||||
return 404;#Gate Not Found
|
||||
}
|
||||
}else{
|
||||
return 404;#Groundnet Data Not Found
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
####################################
|
||||
# _____ ____ ____ ____ ____ #
|
||||
# | ___/ ___| _ \| _ \ / ___| #
|
||||
# | |_ | | _| |_) | |_) | | #
|
||||
# | _|| |_| | __/| _ <| |___ #
|
||||
# |_| \____|_| |_| \_\\____| #
|
||||
# #
|
||||
####################################
|
||||
|
||||
|
||||
var decimal2percentage = func(decimal){
|
||||
var TMP = decimal * 100;
|
||||
var tmp = " "~TMP;#convert to string
|
||||
var percentage = substr(tmp,0,4)~"%";
|
||||
return percentage;
|
||||
}
|
||||
|
||||
var feet2FL = func(feet){
|
||||
var tmp = "";
|
||||
var FL = "";
|
||||
var offset = 0;
|
||||
tmp = "FL"~feet;
|
||||
if (feet < 10000){offset = 4}
|
||||
else{offset = 5}
|
||||
FL = left(tmp,offset);
|
||||
return FL;
|
||||
}
|
||||
var FL2feet = func(FL){
|
||||
var tmp = "";
|
||||
var feet = 0;
|
||||
var offset = 0;
|
||||
if (size(FL) == 4){tmp = 2}
|
||||
else{offset = 3}
|
||||
tmp = right(FL,offset);
|
||||
feet = int(tmp~"00");
|
||||
return feet;
|
||||
}
|
||||
|
||||
var lbs2tons = func(lbs){
|
||||
var tons = lbs * 0.0005;
|
||||
return tons;
|
||||
}
|
||||
var lbs2kg = func(lbs){
|
||||
var tons = lbs * 0.0005;
|
||||
var kg = tons * 1000;
|
||||
return kg;
|
||||
}
|
||||
|
||||
var inputPosLatConversion = func(inputedPos){
|
||||
var isNorth = 1;
|
||||
|
||||
if(find("N", inputedPos) != -1){
|
||||
isNorth = 1;
|
||||
}else{
|
||||
isNorth = 0;
|
||||
}
|
||||
|
||||
var outputLat = string.trim(string.trim(string.trim(string.trim(inputedPos, 1, string.isdigit), 1, string.ispunct), 1, string.isdigit), 1, string.isalpha);
|
||||
var outputLatMin = string.trim(right(outputLat, 4));
|
||||
var outputLatMinInDeg = outputLatMin/60;
|
||||
var outputLatDeg = (substr(outputLat, 1, size(outputLat) - 5)) + outputLatMinInDeg;
|
||||
if(isNorth != 1){
|
||||
outputLatDeg = outputLatDeg * -1;
|
||||
}
|
||||
#print(outputLat);
|
||||
#print(outputLatDeg);
|
||||
return(outputLatDeg);
|
||||
}
|
||||
var inputPosLonConversion = func(inputedPos){
|
||||
var isEast = 1;
|
||||
|
||||
if(find("E", inputedPos) != -1){
|
||||
isEast = 1;
|
||||
}else{
|
||||
isEast = 0;
|
||||
}
|
||||
|
||||
var outputLon = string.trim(string.trim(string.trim(string.trim(inputedPos, -1, string.isalpha), -1, string.isdigit), -1, string.ispunct), -1, string.isdigit);
|
||||
var outputLonMin = string.trim(right(outputLon, 4));
|
||||
var outputLonMinInDeg = outputLonMin/60;
|
||||
var outputLonDeg = (substr(outputLon, 1, size(outputLon) - 5)) + outputLonMinInDeg;
|
||||
if(isEast != 1){
|
||||
outputLonDeg = outputLonDeg * -1;
|
||||
}
|
||||
#print(outputLon);
|
||||
#print(outputLonDeg);
|
||||
return(outputLonDeg);
|
||||
}
|
||||
|
||||
var LatDMMunsignal = func(LatDeg){
|
||||
var latdegree_INIT = int(LatDeg);
|
||||
var latminint_INIT = int((LatDeg - latdegree_INIT) * 60);
|
||||
var latmindouble_INIT = int((((LatDeg - latdegree_INIT) * 60) - latminint_INIT) * 10);
|
||||
if(latminint_INIT < 10){
|
||||
var outlatminint_INIT = "0"~abs(latminint_INIT);
|
||||
}else{
|
||||
var outlatminint_INIT = abs(latminint_INIT);
|
||||
}
|
||||
var latmin_INIT = outlatminint_INIT~"."~abs(latmindouble_INIT);
|
||||
var isNS_INIT = "N";
|
||||
if(LatDeg > 0){
|
||||
isNS_INIT = "N";
|
||||
}else{
|
||||
isNS_INIT = "S";
|
||||
}
|
||||
if(latdegree_INIT < 10){
|
||||
var outlatdegree_INIT = "0"~abs(latdegree_INIT);
|
||||
}else{
|
||||
var outlatdegree_INIT = abs(latdegree_INIT);
|
||||
}
|
||||
var latresults_INIT = isNS_INIT~outlatdegree_INIT~""~latmin_INIT;
|
||||
return latresults_INIT;
|
||||
}
|
||||
var LonDmmUnsignal = func(LonDeg){
|
||||
var londegree_INIT = int(LonDeg);
|
||||
var lonminint_INIT = int((LonDeg - londegree_INIT) * 60);
|
||||
var lonmindouble_INIT = int((((LonDeg - londegree_INIT) * 60) - lonminint_INIT) * 10);
|
||||
if(lonminint_INIT < 10){
|
||||
var outlonminint_INIT = "0"~abs(lonminint_INIT);
|
||||
}else{
|
||||
var outlonminint_INIT = abs(lonminint_INIT);
|
||||
}
|
||||
var lonmin_INIT = outlonminint_INIT~"."~abs(lonmindouble_INIT);
|
||||
var isEW_INIT = "E";
|
||||
if(LonDeg > 0){
|
||||
isEW_INIT = "E";
|
||||
}else{
|
||||
isEW_INIT = "W";
|
||||
}
|
||||
if(londegree_INIT < 10){
|
||||
var outlondegree_INIT = "0"~abs(londegree_INIT);
|
||||
}else{
|
||||
var outlondegree_INIT = abs(londegree_INIT);
|
||||
}
|
||||
var lonresults_INIT = isEW_INIT~outlondegree_INIT~lonmin_INIT;
|
||||
return lonresults_INIT;
|
||||
}
|
||||
|
||||
var latdeg2latDMM = func(inLatDeg){
|
||||
var latdegree_INIT = int(inLatDeg);
|
||||
var latminint_INIT = int((inLatDeg - latdegree_INIT) * 60);
|
||||
var latmindouble_INIT = int((((inLatDeg - latdegree_INIT) * 60) - latminint_INIT) * 10);
|
||||
if(abs(latminint_INIT) < 10){
|
||||
var outlatminint_INIT = "0"~abs(latminint_INIT);
|
||||
}else{
|
||||
var outlatminint_INIT = abs(latminint_INIT);
|
||||
}
|
||||
var latmin_INIT = outlatminint_INIT~"."~abs(latmindouble_INIT);
|
||||
var isNS_INIT = "N";
|
||||
if(inLatDeg > 0){
|
||||
isNS_INIT = "N";
|
||||
}else{
|
||||
isNS_INIT = "S";
|
||||
}
|
||||
if(abs(latdegree_INIT) < 10){
|
||||
var outlatdegree_INIT = "0"~abs(latdegree_INIT);
|
||||
}else{
|
||||
var outlatdegree_INIT = abs(latdegree_INIT);
|
||||
}
|
||||
var latresults_INIT = isNS_INIT~outlatdegree_INIT~"*"~latmin_INIT;
|
||||
return latresults_INIT;
|
||||
}
|
||||
var londeg2lonDMM = func(inLonDeg){
|
||||
var londegree_INIT = int(inLonDeg);
|
||||
var lonminint_INIT = int((inLonDeg - londegree_INIT) * 60);
|
||||
var lonmindouble_INIT = int((((inLonDeg - londegree_INIT) * 60) - lonminint_INIT) * 10);
|
||||
if(abs(lonminint_INIT) < 10){
|
||||
var outlonminint_INIT = "0"~abs(lonminint_INIT);
|
||||
}else{
|
||||
var outlonminint_INIT = abs(lonminint_INIT);
|
||||
}
|
||||
var lonmin_INIT = outlonminint_INIT~"."~abs(lonmindouble_INIT);
|
||||
var isEW_INIT = "E";
|
||||
if(inLonDeg > 0){
|
||||
isEW_INIT = "E";
|
||||
}else{
|
||||
isEW_INIT = "W";
|
||||
}
|
||||
if(abs(londegree_INIT) < 10){
|
||||
var outlondegree_INIT = "0"~abs(londegree_INIT);
|
||||
}else{
|
||||
var outlondegree_INIT = abs(londegree_INIT);
|
||||
}
|
||||
var lonresults_INIT = isEW_INIT~outlondegree_INIT~"*"~lonmin_INIT;
|
||||
return lonresults_INIT;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 270 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -691,7 +691,6 @@
|
|||
<object-name>Cone</object-name>
|
||||
</effect>
|
||||
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>Cone</object-name>
|
||||
|
@ -822,9 +821,9 @@
|
|||
</action>
|
||||
</animation>
|
||||
<!-- switch for horn -->
|
||||
<model>
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Horn/switch-horn.xml</path>
|
||||
<offsets>
|
||||
<offsets>
|
||||
<x-m>1.405</x-m>
|
||||
<y-m>-0.143</y-m>
|
||||
<z-m>0.919</z-m>
|
||||
|
@ -834,9 +833,9 @@
|
|||
</model>
|
||||
|
||||
<!-- sign for horn -->
|
||||
<model>
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Horn/horn.xml</path>
|
||||
<offsets>
|
||||
<offsets>
|
||||
<x-m>1.416</x-m>
|
||||
<y-m>-0.17</y-m>
|
||||
<z-m>0.905</z-m>
|
||||
|
@ -844,43 +843,85 @@
|
|||
</offsets>
|
||||
</model>
|
||||
<!-- Switch for indicator -->
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Indicators/indicators.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.52</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
<model>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Indicators/indicators.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.52</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
<!-- Indicator sign -->
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Indicators/sign.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.52</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
<model>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Indicators/sign.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.52</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
<!-- Switch for warning lights -->
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Warninglights/s-warninglights.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.498</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
<model>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Warninglights/s-warninglights.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.498</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
<!-- Indicator warning lights -->
|
||||
<model>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Warninglights/wl.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.498</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
<model>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/Switches/Warninglights/wl.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.306</x-m>
|
||||
<y-m>-0.498</y-m>
|
||||
<z-m>0.935</z-m>
|
||||
<pitch-deg>-18.0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- CDU -->
|
||||
<model>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<path>Aircraft/followme_e-tron/Models/Instruments/CDU/boeing.xml</path>
|
||||
<offsets>
|
||||
<x-m>1.31</x-m>
|
||||
<y-m>-0.00</y-m>
|
||||
<z-m>0.8</z-m>
|
||||
<pitch-deg>-4.0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -34,7 +34,10 @@ var tyreSmoke_3 = aircraft.tyresmoke.new(3, auto = 1, diff_norm = 0.4, check_vsp
|
|||
|
||||
props.getNode("/",1).setValue("/systems/horn", 0);
|
||||
props.getNode("/",1).setValue("/controls/mode", 1);
|
||||
|
||||
props.getNode("/",1).setValue("/systems/instruments/enable_switches", 0);
|
||||
props.getNode("/",1).setValue("/instrumentation/cdu/serviceable", 1);
|
||||
props.getNode("/",1).setValue("/instrumentation/cdu/ident/model", "Follow me EV");
|
||||
props.getNode("/",1).setValue("/instrumentation/cdu/ident/engines", "EV Motor");
|
||||
|
||||
var isInternalView = func(){ #// return 1 if is in internal view, otherwise return 0.
|
||||
return props.getNode("sim/current-view/internal", 1).getValue();
|
||||
|
|
|
@ -739,25 +739,33 @@
|
|||
<file>Aircraft/followme_e-tron/Nasal/light-manager.nas</file>
|
||||
</light>
|
||||
<dual_control_tools>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/dual-control-tools.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/dual-control-tools.nas</file>
|
||||
</dual_control_tools>
|
||||
<aircraft_dual_control>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/followme-dual-control.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/followme-dual-control.nas</file>
|
||||
</aircraft_dual_control>
|
||||
<dual_control>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/pilot-dual-control.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Nasal/DualControl/pilot-dual-control.nas</file>
|
||||
</dual_control>
|
||||
<autopilot>
|
||||
<file>Aircraft/followme_e-tron/Nasal/auto_crash.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Nasal/auto_crash.nas</file>
|
||||
</autopilot>
|
||||
<autospeed>
|
||||
<file>Aircraft/followme_e-tron/Nasal/auto_speed.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Nasal/auto_speed.nas</file>
|
||||
</autospeed>
|
||||
<cdu>
|
||||
<file>Aircraft/followme_e-tron/Models/Instruments/CDU/boeing.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Models/Instruments/CDU/library.nas</file>
|
||||
<file>Aircraft/followme_e-tron/Models/Instruments/CDU/functions.nas</file>
|
||||
</cdu>
|
||||
<datalink>
|
||||
<file>Aircraft/followme_e-tron/Models/Instruments/CDU/datalink.nas</file>
|
||||
</datalink>
|
||||
<!--<musicplayer>
|
||||
<file>Aircraft/followme_e-tron/MusicPlayer/musicplayer.nas</file>
|
||||
</musicplayer> -->
|
||||
<dialogs>
|
||||
<file>Aircraft/followme_e-tron/gui/dialogs/config.nas</file>
|
||||
<file>Aircraft/followme_e-tron/gui/dialogs/config.nas</file>
|
||||
</dialogs>
|
||||
</nasal>
|
||||
|
||||
|
|
|
@ -416,6 +416,15 @@
|
|||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label> Enable Switches</label>
|
||||
<property>systems/instruments/enable_switches</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
</group>
|
||||
<hrule/>
|
||||
<group>
|
||||
|
|
Loading…
Reference in New Issue