Hi All,
So continuing to work through version 2 of my NAVRAD multi function RADAR, and using Mr. McElrath and many others advice I keep plugging away at small chunks and am making, to me, really good progress and am finding myself pleased with most of the results. But with everything I have come across a problem that after going at it at several different angles either I just don't understand the process or am completely looking at it the wrong way or in fact any combination of things.
What I am looking at having my gauge do is in the Flight Planner Page (Thank you very much again Bob and Karol) I have created a button that takes you to a Set Alternate Airport Page with what I hope to achieve is:
1.) When that button is pressed the page comes up with 10 airports nearest the set "Destination" airport in the Flight Planner. I am currently trying to use:
as my nearest search parameters. I have also tried using (A:GPS WP NEXT LAT, Radians) and (A:GPS WP NEXT LON, Radians). The problems I will get to in a minute.
2.) The second thing I would like to happen is the user enters the airport ident, presses enter and the information is saved to what I am thinking an (L:VAR) using either Robbie McElrath's macros or similar. The saved information would be the airport Ident, airport name and city to be displayed on the Flight Planner Page. This process would also arm a switch, lets call it the "Divert" button.
3.) Then obliviously when the "DIVERT" button is pressed it creates a waypoint, deletes the destination and the Alternate is the new destination.
OK, all that being said, I am pretty confident with my ability with items two and three, mind you I thought that with item one.
Now the problem:
The two search parameters I am using are:
Nearest Airport Search (In relationship with the aircraft)
Nearest Airport Search (In relationship to the Destination Airport or Waypoint 1)
I have tried the parameters as updates, by mouse clicks and combined updates and the results have been erroneous. I have had the following results:
1.) No display on either page and the Flight Planner doesn't work properly.
2.) One or the other Search parameters display on both pages and Flight Planner works properly sometimes.
3.) One search parameter displaying information but limited to the number of airports of the other search parameter and Flight Planner doesn't work properly.
Now I am painfully aware of the Asynchronous Operation of the GPS. But is this Really a conflict of the two searches? I have tried coding it to turn off the (call it the main search criteria) while in the Set Alternate Airport page and resume when exited, but to no avail. Do I need to utilize a cycle skipping technique or coding it wrong, looking at from the wrong angle or some other item I am completely missing? Basically what would be the best approach to this? The Nearest Airport search needs to be the main focus as the Flight Planner and other operations use it and the Nearest Destination Airport Search is only required in the Set Alternate Page.
A nudge (well a big push of a cliff maybe) on how to proceed would be greatly appreciated and hope I have explained this well enough.
Thanks Greg
So continuing to work through version 2 of my NAVRAD multi function RADAR, and using Mr. McElrath and many others advice I keep plugging away at small chunks and am making, to me, really good progress and am finding myself pleased with most of the results. But with everything I have come across a problem that after going at it at several different angles either I just don't understand the process or am completely looking at it the wrong way or in fact any combination of things.
What I am looking at having my gauge do is in the Flight Planner Page (Thank you very much again Bob and Karol) I have created a button that takes you to a Set Alternate Airport Page with what I hope to achieve is:
1.) When that button is pressed the page comes up with 10 airports nearest the set "Destination" airport in the Flight Planner. I am currently trying to use:
Code:
1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointLatitude, Radians) (>@c:NearestAirportCurrentLatitude, Radians)
1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointLongitude, Radians) (>@c:NearestAirportCurrentLongitude, Radians)
11 (>@c:NearestAirportMaximumItems)
100 (>@c:NearestAirportMaximumDistance, NMiles)
1 (>@c:NearestAirportCurrentLine)
as my nearest search parameters. I have also tried using (A:GPS WP NEXT LAT, Radians) and (A:GPS WP NEXT LON, Radians). The problems I will get to in a minute.
2.) The second thing I would like to happen is the user enters the airport ident, presses enter and the information is saved to what I am thinking an (L:VAR) using either Robbie McElrath's macros or similar. The saved information would be the airport Ident, airport name and city to be displayed on the Flight Planner Page. This process would also arm a switch, lets call it the "Divert" button.
3.) Then obliviously when the "DIVERT" button is pressed it creates a waypoint, deletes the destination and the Alternate is the new destination.
OK, all that being said, I am pretty confident with my ability with items two and three, mind you I thought that with item one.
Now the problem:
The two search parameters I am using are:
Nearest Airport Search (In relationship with the aircraft)
Code:
(L:NearestAirportPage,bool) 1 ==
(L:NearestAirportInit,bool) 1 and
if{
(A:GPS POSITION LAT, Radians) (>@c:NearestAirportCurrentLatitude, Radians)
(A:GPS POSITION LON, Radians) (>@c:NearestAirportCurrentLongitude, Radians)
500 (>@c:NearestAirportMaximumItems)
375 (>@c:NearestAirportMaximumDistance, NMiles)
0 (>@c:NearestAirportCurrentLine)
1 (>L:NearestAirportInit,bool) }
Nearest Airport Search (In relationship to the Destination Airport or Waypoint 1)
Code:
(L:SetAlternateAP,bool) 1 ==
(L:AltAirportInit,bool) 1 and if{
1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointLatitude, Radians) (>@c:NearestAirportCurrentLatitude, Radians)
1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointLongitude, Radians) (>@c:NearestAirportCurrentLongitude, Radians)
11 (>@c:NearestAirportMaximumItems)
100 (>@c:NearestAirportMaximumDistance, NMiles)
1 (>@c:NearestAirportCurrentLine)
0 (>L:AltAirportInit,bool) }
I have tried the parameters as updates, by mouse clicks and combined updates and the results have been erroneous. I have had the following results:
1.) No display on either page and the Flight Planner doesn't work properly.
2.) One or the other Search parameters display on both pages and Flight Planner works properly sometimes.
3.) One search parameter displaying information but limited to the number of airports of the other search parameter and Flight Planner doesn't work properly.
Now I am painfully aware of the Asynchronous Operation of the GPS. But is this Really a conflict of the two searches? I have tried coding it to turn off the (call it the main search criteria) while in the Set Alternate Airport page and resume when exited, but to no avail. Do I need to utilize a cycle skipping technique or coding it wrong, looking at from the wrong angle or some other item I am completely missing? Basically what would be the best approach to this? The Nearest Airport search needs to be the main focus as the Flight Planner and other operations use it and the Nearest Destination Airport Search is only required in the Set Alternate Page.
A nudge (well a big push of a cliff maybe) on how to proceed would be greatly appreciated and hope I have explained this well enough.
Thanks Greg



