Jump to content
Sign in to follow this  
Varmint007

Direct To ICAO woes

Recommended Posts

Hey all,I'm trying to create a very simple DTO function which is nothing more than a toggle between normal flight plan and direct to routing. The problem seems to be isolating the ICAO for the current (next) WP and inserting it into the DTO function:(L:DTO, bool) ! d (>L:DTO, bool) if{ (@c:FlightPlanWaypointICAO) (>@c:FlightPlanNewWaypointICAO) 1 (>@c:FlightPlanDirectToDestination) } els{ (>@c:FlightPlanCancelDirectTo) } (@c:FlightPlanWaypointICAO) is always waypoint 0, so the above code always gives me a directTo to the origin. How do I capture the ICAO from the current waypoint index (waypoint you are flying towards) in order to insert it into the FlightPlanNewWaypointICAO? In other words, all I need to do is take the currently active "next" waypoint and make it a directTo waypoint.I also tried (A:GPS WP NEXT ID, string) (>@c:FlightPlanNewWaypointICAO), but they are not compatible.Thanks,--Jon

Share this post


Link to post
Share on other sites

Hello Jon Try 1 (>@c:FlightPlanCancelDirectTo) This puts the flightplan back and intercepts the nearest leg. Also (Your flightplan nn) (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointIndex) (>@c:FlightPlanActiveWaypoint) Autopilot will always fly to Active waypoint (I think you loose the flight plan with this but (@c:FlightPlanCancelDirectTo) gets it back)try it.


Paul EGLD

Share this post


Link to post
Share on other sites

Ah, yes thank you, but I'm familiar with (>@c:FlightPlanCancelDirectTo), and it works well. But the problem I have is making the current flight plan waypoint the direct to waypoint (i.e. going the other way). In order to create a DTO, you apparently need the ICAO, yet the ICAO for any given waypoint in a flight plan does not seem to be available.Normally, you would use the ICAO search, and the search result gets put into FacilityICAO which in turn gets put into (>@c:FlightPlanNewWaypointICAO). Finally you set 1 (>@c:FlightPlanDirectToDestination) and you're in DTO mode.But it doesn't seem possible to simply get the current flight plan waypoint ICAO and insert it into (>@c:FlightPlanNewWaypointICAO)?--Jon

Share this post


Link to post
Share on other sites

Jon,It is probably possible via the: @FPLActivateLeg and (@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO) way.An example you will find via the nearest pages of the ms-gps.Then you 're losing the FPL.Also you can put the cursor on a waypoint of the flightplan and go DTO (Skipping waypoints between)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Ah very nice, Jan. It was related to ActivateLeg(A:GPS FLIGHT PLAN WP INDEX, enum) d (>@g:directToActivateLeg) (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointICAO) (>@c:FlightPlanNewWaypointICAO) 1 (>@c:FlightPlanDirectToDestination) Now by toggling DTO the current waypoint will automatically be inserted.Thanks both of you,--Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...