Ok, windling down the known issues (Stress the Known). I have been working on the Nearest Airport Page function. It is not operating the way I intended it. It took a long time for me with the patience of rpmc, n4gix and taquilo to even get this going and now after at least fourteen hours of finding it is acting weird, cannot get it to work properly. The Code is as follows:
Update:
Element:
The Mouse section:
As it is now (see pictures) it opens with the single origin airport, then when you scroll down it gives four empty segments then the origin airport, then starts scrolling. This is fine and think I understand that the mouse section is set to move 5 segments at a time, which when i change the 5 to a one becomes unstable and may move it anywhere. also with the current configuration it sometimes move through 5 airports, then 10 then 15 etc...
Reading the SDK and trying diffrent things still leaves me in confused blank. What I would like it to do is when you initiate the Nearest Page it Starts at the origin with displays until the page is full, in this case seems to be 5 airports. Then when you scroll down or up it does at one airport at a time.
Any suggestions or ideas? I really am thinking I am beginning to suffer code burn out, but on the bright side I have windled the bugs down to 4 more issues, everything else seems to functioning flawlessly.
Thanks
Greg
Update:
Code:
<!--**************** Nearest Airport Initilize ****************-->
(L:(L:NearestAirportPage,bool) 0 ==
if{ (L:ARPTScrollStart,enum) 1 (>L:NearestAirportPage,bool) }
Element:
Code:
<!--**************** Nearest Airport Display ****************-->
<Element Name="Nearest Airport Page">
<Position X="0.000" Y="0.000"/>
<Visible>(L:MFDOffOn,bool)</Visible>
<Element Name="Nearest Airport Page">
<Position X="0.000" Y="0.000"/>
<Visible>
(L:NearestAirportPage,bool)
(A:GPS POSITION LAT, Radians) (>@c:NearestAirportCurrentLatitude, Radians)
(A:GPS POSITION LON, Radians) (>@c:NearestAirportCurrentLongitude, Radians)
500 (>@c:NearestAirportMaximumItems)
375 (>@c:NearestAirportMaximumDistance, NMiles)
</Visible>
<Element>
<Position X="112.00" Y="57.00" />
<Rectangle Width="684" Height="600" LineWidth="5" Color="#00324b" FillColor="#000050" Luminous="Yes" />
<Element Name="Airport Display Page">
<Position X="15.000" Y="5.000"/>
<FormattedText X="650" Y="583" Font="Arial Black" FontSize="24" Bold="Yes" Bright="Yes" Color="White" Adjust="Left" VerticalAdjust="Center" Multiline="Yes">
<String>
Nearest Airport Search \n\n
%((@c:NearestAirportItemsNumber) s2 0 !=)
%{if}
%((L:ARPTScrollStart,enum) sp1 (L:ARPTScrollEnd,enum) l2 min sp3)
%{loop}
%(l1 (>@c:NearestAirportCurrentLine))
%((@c:NearestAirportCurrentIdent))%!1s!%\{nr}\t\t\t
Bearing:\t\t\t%((@c:NearestAirportCurrentTrueBearing, degrees) (A:GPS MAGVAR, degrees) - d360)%!03d!\{dplo=M}\t\t\t
Distance:\t\t\t%((@c:NearestAirportCurrentDistance, nmiles))%!.1f!\{dpl=nm}\n
%((@c:NearestAirportCurrentLine) (>@c:NearestAirportSelected) (@c:NearestAirportSelectedAirportName))%!s!\n
Apr:\t%((@c:NearestAirportCurrentBestApproach))%!s!\t
Elev:\t%((@c:NearestAirportCurrentLine) (>@c:NearestAirportSelected) (@c:NearestAirportSelectedAirportElevation, feet))%!d!\{dpl=ft}\t\t
\{tabs=50R,60,145,244R}
Rwy:\t%((@c:NearestAirportCurrentLongestRunwayLength, feet))%!d!\{dpl=ft}\t\t
Type:\t%((@c:NearestAirportCurrentLine) (>@c:NearestAirportSelected) (@c:NearestAirportSelectedRunwaySurface))%{case}
%{:1}Concrete%{:2}Asphalt%{:101}Grass%{:102}Turf%{:103}Dirt%{:104}Coral%{:105}Gravel%{:106}Oil%{:107}Steel
%{:108}Bituminus%{:109}Brick%{:110}Macadam%{:111}Planks%{:112}Sand%{:113}Shale%{:114}Tarmac%{:115}Snow%{:116}Ice%{:201}Water%{end}
%(l1 ++ s1 l3 < d)
%{if}\n\{lsp=4}\{ladj=L}\{tabs=}\{line=400}\n%{end}
%{next}
%{end}
</String>
</FormattedText>
</Element>
</Element>
</Element>
</Element>
The Mouse section:
Code:
<!--**************** Airport Menu Buttons ****************-->
<Area Left="350.000" Top="550.000" Width="200" Height="50">
<Visible>(L:MFDMainMenu,bool) (L:AirportInfoMenu,bool)</Visible>
<Cursor Type="Hand"/>
<Tooltip>NEAREST AIRPORT SEARCH</Tooltip>
<Click>
(L:NearestAirportPage,bool) ! (>L:NearestAirportPage,bool)
0 (>L:AirportInfoMenu,bool)
0 (>L:MFDMainMenu,bool)
(L:NearestAirportPage,bool) 1 ==
if{
(A:GPS POSITION LAT, Radians) (>@c:NearestAirportCurrentLatitude, Radians)
(A:GPS POSITION LON, Radians) (>@c:NearestAirportCurrentLongitude, Radians)
500 (>@c:NearestAirportMaximumItems)
375 (>@c:NearestAirportMaximumDistance, NMiles) }
</Click>
</Area>
<Area Left="685.000" Top="725.000" Width="100" Height="45">
<Visible>(L:NearestAirportPage,bool)</Visible>
<Cursor Type="UpArrow" Repeat="Yes"/>
<Tooltip>SCROLL UP</Tooltip>
<Click Repeat="Yes">
(L:ARPTScrollStart,enum) -- 0 max (>L:ARPTScrollStart,enum)
(L:ARPTScrollStart,enum) 5 - (L:ARPTScrollEnd,enum)
</Click>
</Area>
<Area Left="685.000" Top="770.000" Width="100" Height="45">
<Visible>(L:NearestAirportPage,bool)</Visible>
<Cursor Type="DownArrow" Repeat="Yes"/>
<Tooltip>SCROLL DOWN</Tooltip>
<Click Repeat="Yes">
(L:ARPTScrollEnd,enum) ++ (@c:NearestAirportItemsNumber) min (>L:ARPTScrollEnd,enum)
(L:ARPTScrollEND,enum) 5 - (>L:ARPTScrollStart,enum)
</Click>
</Area>
As it is now (see pictures) it opens with the single origin airport, then when you scroll down it gives four empty segments then the origin airport, then starts scrolling. This is fine and think I understand that the mouse section is set to move 5 segments at a time, which when i change the 5 to a one becomes unstable and may move it anywhere. also with the current configuration it sometimes move through 5 airports, then 10 then 15 etc...
Reading the SDK and trying diffrent things still leaves me in confused blank. What I would like it to do is when you initiate the Nearest Page it Starts at the origin with displays until the page is full, in this case seems to be 5 airports. Then when you scroll down or up it does at one airport at a time.
Any suggestions or ideas? I really am thinking I am beginning to suffer code burn out, but on the bright side I have windled the bugs down to 4 more issues, everything else seems to functioning flawlessly.
Thanks
Greg





