Thank You,
Karol,
I will try and clear this up, more me than you...
Yes step one is in the flight planner page and once you have created your "Flight Plan" the user can then click on "Select Alternate AP" which takes them to the Alternate Airport Page which gives a list of ten airports around the "Destination Airport" within a 100 mile radius. At this point it is providing a reference to the user giving them the ability to view "what's around" and if they exit the Alternate Page it adds/changes nothing allowing the flight to continue as intended, but should the user decide to include an Alternate Airport to their Flight Plan it will provide them with the ability to "Divert" to their Alternate at the push of a button rather than have to set everything up last minute. I don't know if that is RW or not, but personally like that ability.
Step 2 begins when they push the "Set Alternate" button which brings up the keyboard entry box. Thanks for agrees about the Keyboard Entry and you nailed it allowing the user some flexibility and not restricted to the 10 airports because that was the main reason, the other lets just leave a experience levels.
Yes my original thoughts were save this information to (L:Var) for use at a later time or until needed, with the exception of displaying the selected Alternate Airport IDENT, Name and City. But as I work through this using Bob's suggested approach, and if I understand Bob correctly using
Code:
(@c:FlightPlanNewWaypointICAO)
Eliminates the need for Shift Registers, ICAO transfers, etc. while providing the results that I am looking. My thoughts on what is happening with this method is I am still storing an airport for use at a later time because all I have done is created an New Waypoint, but have not actually done anything with it yet, but in return been provided with everything I need to display desired information on the Flight Planner Display and armed the "Divert" button. Also this can be reloaded anytime in the same manner I would using other methods, simplicity is great and I hope I have this right!
As for not creating waypoint 2 as the alternate right away, mostly personal preference, basically if the Alternate Airport (Waypoint 2) is not used the GPS will activate the next leg, not that it is the end of the world because it would all be deleted when the New Flight Plan is loaded. but I would prefer that if the user lands at their Destination Airport the Flight Plan is done, until the next one is loaded. This is totally my preference at this time.
The rest of what I am working on happening I think you understand and hope I cleared things up a bit, and thank you for your time in helping create this...
Bob,
Thank you, worked with this a bit this morning and realized what I was chasing yesterday. Using what I posted last night:
Code:
<Area Left="648" Top="325" Width="100" Height="25">
<Visible>(L:DivertToAltAP,bool)</Visible>
<Cursor Type="Hand" />
<Click>
(@c:FlightPlanNewWaypointICAO)
1 (>@c:FlightPlanAddWaypoint)
2 (>@c:FlightPlanWaypointIndex) (>@c:FlightPlanDeleteWaypoint)
0 (>@c:FlightPlanWaypointIndex) (>@c:FlightPlanDeleteWaypoint)
1 (>@c:FlightPlanDirectToDestination)
0 (>L:ALT-AP-1,enum) 0 (>L:ALT-AP-2,enum) 0 (>L:ALT-AP-3,enum) 0 (>L:ALT-AP-4,enum)
0 (>L:EnterAltAP, bool)
0 (>L:DivertToAltAP,bool)
0 (>L:EnterAltAP, bool)
1 (>L:FPAirportInit,bool)
</Click>
</Area>
I basically started out with what you suggested with:
Code:
(@c:FlightPlanNewWaypointICAO)
1 (>@c:FlightPlanAddWaypoint)
2 (>@c:FlightPlanWaypointIndex) (>@c:FlightPlanDeleteWaypoint)
Although I now see the point (or better no point) of having (@c:FlightPlanNewWaypointICAO) within the mouse, because where else is the new waypoint going to be created from. What was happening is what you said was happening adding a waypoint, deleting a waypoint thus re-routing the aircraft. Where I went wrong with the above was when that happened I assumed that the Alternate Airport would disappear and when it didn't I added the
Code:
0 (>L:ALT-AP-1,enum) 0 (>L:ALT-AP-2,enum) 0 (>L:ALT-AP-3,enum) 0 (>L:ALT-AP-4,enum)
and the chasing began, With this added the flight Planner would display the Alternate in the Departure line, and I continued to chase it until I ended up with the above. Unfortunately, I forgot, missed, or not thinking was all my problems started with the addition of 0 (>L:ALT-AP-1,enum).......
So what I have now is:
Code:
<Area Left="648" Top="325" Width="100" Height="25">
<Visible>(L:DivertToAltAP,bool)</Visible>
<Cursor Type="Hand" />
<Click>
1 (>@c:FlightPlanAddWaypoint)
2 (>@c:FlightPlanDeleteWaypoint)
0 (>L:EnterAltAP, bool)
0 (>L:DivertToAltAP,bool)
0 (>L:EnterAltAP, bool)
1 (>L:FPAirportInit,bool)
</Click>
</Area>
as you suggested. To hide the Alternate Airport data after the "Divert" button is pressed I put an {if}/{else} statement in the Flight Planner <Element> string telling it if the Divert Button = 1 then display (Airport Info) else display (Not Selected). A much better approach, I think.
To clear up one thing with the zeroing of the register, yes I have it zeroed in two places - When the "Create Flight Plan" Button and "Set Alternate" Button is used. The "Create Flight Plan" was because with the destination change the Alternate would change, but am sure you realized that
As for the Select Alternate Airport Mouse section, yes I know it a mess and you are right I should not post until it is a more working piece. I posted because, If I am right here, I need something to record and display the keyboard inputs. But as you stated, I don't see the need to perform a search when we have already completed that, but need to look into how to achieve a better way to perform this. Any that is the piece I am working on today and will post when I have something useful and working.
Thanks again all,
Greg