January 15, 200719 yr Commercial Member 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 Jon Blum Vertical Reality Simulations
January 15, 200719 yr 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
January 15, 200719 yr Author Commercial Member 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 Jon Blum Vertical Reality Simulations
January 15, 200719 yr 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..." Jan "Beatus ille qui procul negotiis..."
January 15, 200719 yr Author Commercial Member 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 Jon Blum Vertical Reality Simulations
Create an account or sign in to comment