...Среда, 25.12.2024, 20:48



Приветствую Вас Гость | RSS
Главная
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 4 из 4
  • «
  • 1
  • 2
  • 3
  • 4
Setting Departure & Destination with XML?
cassini-mДата: Пятница, 12.08.2011, 07:09 | Сообщение # 76
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Quote (poruchik)
Hi, Another question, the fmc becomes more intriguing (thought i was ready years ago...) I know how to use iceoenterchar to find a facility and also the keyboard chr scat way to send data back to icao to make a facility some waypoint or something else. But is it also possible to store a facility, found with iceosearch, into L:Var's? (and how) Say i type EHAM on the fmc keyboard and get Schiphol. How do i store this in L:Var's for later use? Never did that.

Hi Jan,

This is also quite simple. What I've done is created special LVars to store ICAO's for things such as the Route page Origin airport or the Departure airport. Now one of the LSK's does this (LSK L1) by a click code. Here it is below:

Code

   <!--========================================RTE-ORIGIN========================================-->   

  (L:FMC-RTE-1,enum) 1 == if{
  (L:FMC-UNIT-4,number) 64 > (L:FMC-UNIT-5,number) 0 == (L:FMC-RTE-ORGN,bool) 2 != and and if{

  'A' (>@c:IcaoSearchStartCursor)  

  (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr  
  (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

  (@c:IcaoSearchMatchedIcaosNumber) 1 == if{

  (L:FMC-UNIT-1,number) (>L:FMC-RTE-ORGN-1,number) (L:FMC-UNIT-2,number) (>L:FMC-RTE-ORGN-2,number)  
  (L:FMC-UNIT-3,number) (>L:FMC-RTE-ORGN-3,number) (L:FMC-UNIT-4,number) (>L:FMC-RTE-ORGN-4,number)  
  1 (>L:FMC-RTE-ORGN,bool) 1 (>L:FMC-UNIT-EMPTY,bool) quit } els{ 1 (>L:FMC-NOT-IN-DATABASE,bool) } }
  els{ (L:FMC-RTE-ORGN,bool) 0 == if{ 1 (>L:FMC-INVALID-ENTRY,bool) }
  els{ (L:FMC-RTE-ORGN-1,number) (>L:FMC-UNIT-1,number) (L:FMC-RTE-ORGN-2,number) (>L:FMC-UNIT-2,number)  
       (L:FMC-RTE-ORGN-3,number) (>L:FMC-UNIT-3,number) (L:FMC-RTE-ORGN-4,number) (>L:FMC-UNIT-4,number) } } quit }


You see the code checks to make sure the airport is a ICAO match and if so then it will set it to the RTE ORGN Lvars.

Hope that makes sense, and if it doesn't feel free to ask questions.
 
poruchikДата: Пятница, 12.08.2011, 07:10 | Сообщение # 77
Группа: Удаленные





Thanks.

Was using that one already in another form.
What i meant: you can set for example (A:PLANE LATITUDE,degrees) (>L:PLANE LATITUDE,degrees) and that works allright.
But can this be achieved one way or the other: (@c:FacilityName) (>L:FacilityName,string)
Btw., saw on your site you solved the custom waypoint symbols problem in the mfd. Congrats!
 
cassini-mДата: Пятница, 12.08.2011, 07:10 | Сообщение # 78
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Interesting question Jan. I don't know if this works - I don't think I've tried it - but I assume that it wouldn't as from what I know LVars cannot store strings. I may be wrong though, and in the event that I am that is great news for us all! I will give it a try as soon as I get back home tomorrow. Exciting stuff!

Also I had figured out how to display custom images for an ND a while ago. I haven't gotten round to sharing the code yet though, but it is relatively simple. I just use some of the GPS variables to find the LAT/LON position of a WPT/VOR/ETC and then use the BGR/HDG to work out exactly where on a mathematical plane it is and from there I've created an XPOS Lvar and YPOS Lvar that will ultimatley position the images on the screen. The only difficulty have had so far is to define when the image not to display so that it does not go over the arc; the math for this is particularly difficult as you could imagine. I still have yet to work this out perfectly.

We'll be in touch. Good Night for now.
 
@737@Дата: Пятница, 12.08.2011, 07:10 | Сообщение # 79
Полковник
Группа: Персонал
Сообщений: 104
Награды: 0
Репутация: 0
Замечания: 0%
Статус: Не в сети
Hi,

You are not actually storing ICAOs. Instead, your code stores four characters of Ident. There's an important difference, of course. Airport Idents can be 3 or 4 characters long, so I presume your code resets the LVars, or at least LVar4, before they are used again for another airport Ident, otherwise you will not be able to match a 3 character airport Ident.

Right about LVars not being able to store strings... only numbers. But, LVars are signed 32 bit integers, so I believe you could store up to six (ascii decimal equivalent) characters into a single LVar using the xml bit operators >>, << if you really wanted.

An FMC is an ambitious project ... good luck!!
 
poruchikДата: Пятница, 12.08.2011, 07:11 | Сообщение # 80
Группа: Удаленные





Hi,

Had no results with the airways.
They only show up with a msgps flightplan.
Way around: It could be done with typing say UB2, which results in activating 2 or more enclosing waypoints, stored before in L:Var's.
Now you're flying along the airway between the waypoints and UB2 is showing in the FMC under "VIA" and so on to the next airway etc...
The problem is making a database of all airways which their waypoints ; and they cannot be saved......!
Same for SID's and STAR's.
Also sticking to the normal way of entering alternates in the fmc.
Adapting all flightplans is a way too far.
 
@737@Дата: Пятница, 12.08.2011, 07:11 | Сообщение # 81
Полковник
Группа: Персонал
Сообщений: 104
Награды: 0
Репутация: 0
Замечания: 0%
Статус: Не в сети
Those of us stuck in low xml orbit could do some interesting things if there was a way to write and read numbers to a file. It would be fun to see how much further you could stretch utilization of the gps module.

I'm certainly not up to the challenge of learning C++ where, I presume, that limitation doesn't exist.
 
cassini-mДата: Пятница, 12.08.2011, 07:11 | Сообщение # 82
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Bob, I recently purchased a great text book to learn C++, and I've been progressing along well. However, I have been really busy as of late working on my licenses and haven't had time to really program anything useful to us but I hope - once I get some free time - to develop a gauge that will allow the reading and creating of files with XML. Such as Doug Dawson's sound gauges.

Jan, I've run into the same trouble and have yet to figure a way around this. If I get anything I'll be sure to post. This is a truly difficult task, and will take much time and will.
 
poruchikДата: Пятница, 12.08.2011, 07:12 | Сообщение # 83
Группа: Удаленные





Hi,

Just "cosmetics", may be known since the middle ages but....

To have those boxes in the FMC which should be filledin with data one can use instead of polygons or -lines this code:

This one is for the POS page, but anything is possible; there are hidden spaces!.

Code
<Element>
<Position X="45" Y="45"/>
<Text X="265" Y="13" Bright="Yes" Length="30" Font="Arial" Color="@color" Adjust="right" VerticalAdjust="center" Multiline="NO">
<String>
 
cassini-mДата: Пятница, 12.08.2011, 07:12 | Сообщение # 84
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Ed, I started to do just that this morning myself. It makes the script ever so much easier to see...

Why folks refuse to use the # button to "wrap the code" is beyond me!
 
poruchikДата: Пятница, 12.08.2011, 07:12 | Сообщение # 85
Группа: Удаленные





For single squares I use.

Code
#
<Element>
<Position X="45" Y="185"/>
<Text X="85" Y="23" Bright="Yes" Length="30" Font="Symbol" Color="White" Adjust="Left" VerticalAdjust="center" Multiline="no">
<String>& # 1 2 7 ;</String>
</Text>
</Element>
#


String symbols have 1 space to allow squence to show here
 
cassini-mДата: Пятница, 12.08.2011, 07:13 | Сообщение # 86
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Hi,

Found out that this one is working too, using formattedtext, arial and code, with spaces, & # 1 2 7 ;

<Element>
<Position X="45" Y="30"/>
<FormattedText X="265" Y="230" Bright="Yes" Font="arial" FontSize="12" Color="#00ff00" LineSpacing="15" Tabs="15,25L,140C,255R,265R" Adjust="left" VerticalAdjust="center">
<String>
N ° ' "
\n
W ° ' "
</String>
</FormattedText>
</Element>

Makes live much more easier....
 
poruchikДата: Пятница, 12.08.2011, 07:13 | Сообщение # 87
Группа: Удаленные





Thanks for wrapping the script, Jan! I long ago adopted using <FormattedText> as my standard for all <String> display. It's so much more flexible, although sometimes figuring out the tabs is a bit of a head-scratcher!
 
cassini-mДата: Пятница, 12.08.2011, 07:13 | Сообщение # 88
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Indeed, i use only FormattedText.
Became more interested in the fmc cosmetics since this ongoing discussion.
Knew about the trick with text and multiline; something to share.
It was PVE who pointed my attention to just Text and the "Symbol" Font.
To my surprise 127 worked also with Arial and FormattedText; this one was not mentioned in Roman's xml guide as a working symbol.
 
cassini-mДата: Пятница, 12.08.2011, 07:13 | Сообщение # 89
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
There is a problem with the shape of the square depending on the gauge size and screen res. and size used. I changed to wide screens and the Arial font did not work so experiment with fonts.

Bill
As you can see from my previous post I inserted the hash and still can't get the code wrap to work. Are mine the right color?
 
poruchikДата: Пятница, 12.08.2011, 07:13 | Сообщение # 90
Группа: Удаленные





you tried, but I forgot that with this new forum software, the [code] box is actually the <> icon on the editor's toolbar. Most other forum software uses the # icon.

You can either type [code] before your script, and a closing [ /code] tag (without the blank space!), or simply highlight your script and click the <> icon.
 
  • Страница 4 из 4
  • «
  • 1
  • 2
  • 3
  • 4
Поиск:


Copyright MyCorp © 2024
Бесплатный конструктор сайтов - uCoz