Jump to content
Sign in to follow this  
phjvh

Track between waypoints

Recommended Posts

Guest Eugen

Hi,I have tried to find out if it is possible to get tracks between waypoints.WP1-WP2 TRK ?WP2-WP3 TRK ?WP3-WP4 TRK ?Etc Can this this be retrived by using any of the GPS variables, I have tried setting FlightPlanWaypointIndex, but without any luck to the get anything than the next waypoint track.RegardsEugen

Share this post


Link to post
Share on other sites

Eugen,The standard GPS gives you the bearings and headings to the next waypoint on several pages (nrst, flightplan etc,)%((@c:NearestAirportCurrentTrueBearing,degrees) (A:GPS MAGVAR, degrees) - d360)%!03d!

Share this post


Link to post
Share on other sites

Eugen, I'm guessing you need to be able to pull arbitraty tracks so that you don't actually have to switch waypoints to get the track?If so, I don't believe it's possible using the GPS vars. You'd have to preload and sequence them into custom variables and then work with those.--Jon

Share this post


Link to post
Share on other sites
Guest Eugen

What I tried to use was eg the following macro. @1 (>@c:FlightPlanWaypointIndex) (@c:GPS WP DESIRED TRACK, degrees) But I guess it doesn't work.My intention is to show each track for each waypoint pair not only the "next waypoint but also the next next waypoint etc.So how can I calculate the track from one waypoint to the next waypoint?BrgdsEugen

Share this post


Link to post
Share on other sites

>So how can I calculate the track from one waypoint to the next>waypoint?pi 2 * @3 sin @1 sin @GC_DISTANCE(@1, @2, @3, @4) s0 cos * - @1 cos l0 sin * / acos @4 @2 - sin 0 < if{ - } els{ + }where:@1 = lat1@2= lon1@3= lat2@4 = lon2and:Distance (GC) = @1 sin @3 sin * @1 cos @3 cos * @2 @4 - cos * + acos Edit: obviously everything given is in radians:)--Jon

Share this post


Link to post
Share on other sites
Guest Eugen

Hi,Thanks :-)However I could not get the LAT and Long through@c:FlightPlanWaypointLongitude@c:FlightPlanWaypointLatitudeI have also problems retrieving other of those variables GPS likeFlightPlanWaypointActualFuelConsumptionFlightPlanWaypointEstimatedFuelConsumptionFlightPlanWaypointFuelRemainedAtArrivalFlightPlanWaypointETA but FlightPlanWaypointETE is working ??Maybee I miss something ?Eugen

Share this post


Link to post
Share on other sites

Hi Eugen,"GPS WP DESIRED TRACK, degrees" is an Aircraft variable (type A: ), not a GPS macro variable. I think it always shows the track to the next wp, starting from the current A: Active gps variable.Maybe this works: @1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointMagneticHeading,degrees) d360Tom

Share this post


Link to post
Share on other sites
Guest Eugen

Hi,FlightPlanWaypointMagneticHeading provided what I wanted :-).I wonder about the variables @c:FlightPlanWaypointLongitude@c:FlightPlanWaypointLatitudeFlightPlanWaypointEstimatedFuelConsumptionFlightPlanWaypointFuelRemainedAtArrivalFlightPlanWaypointETA but FlightPlanWaypointETE is working that I couldn't get to work, anyone succeded in in using them or are they not implemented ?BrgdsEugen

Share this post


Link to post
Share on other sites

Oh good.I thought you wanted to be able to get an arbitrary track for a set of waypoints that wasn't selected.FlightPlanWaypointMagneticHeading is actually a track, and not simply a heading based on your current position?--Jon

Share this post


Link to post
Share on other sites

I guess you know this, otherwise:@c:FlightPlanWaypointLongitude@c:FlightPlanWaypointLatitudeboth need a unit to show correctlyie (@c:FlightPlanWaypointLongitude,radians) or (@c:FlightPlanWaypointLongitude,degrees)etc.Now, units are NOT NECESSARY needed when you pass any or both as parameters to a macro, because parameters are passed as plain text and converted to their values in the macro itself.For example, if you pass @Macro1(@c:FlightPlanWaypointLongitude)The macro should be (@1,radians) pi 2 * But, if you pass @Macro1((@c:FlightPlanWaypointLongitude,radians))The macro should be @1 pi 2 * I make this clarification as it seems to be rather confusing when you first investigate the way GPSnn.XML works.As for the other GPS macro variables, never tested them, but it has to be a solution out there :)Tom

Share this post


Link to post
Share on other sites

Eugen,If you want the ETE between waypoints, you can use:%((@c:FlightPlanWaypointEstimatedTimeRemaining,hours))%!02d!:%((@c:FlightPlanWaypointEstimatedTimeRemaining,minutes))%!02d!%{end}Then somewhere:%((@c:FlightPlanIsActiveFlightPlan) (@c:FlightPlanWaypointsNumber) s2 0 != and)%{if}%(0 sp1)%{loop}%(l1 (>@c:FlightPlanWaypointIndex))%((@g:listItems) (@g:listCurrent) l3 == and)%{if}{blnk}%{end}%(l3 ++ sp3)%((@c:FlightPlanWaypointIdent))%!s!{nr}%(l1 0 !=)%{if}nt%((@c:FlightPlanWaypointMagneticHeading,degrees) d360)%!03d!

Share this post


Link to post
Share on other sites
Guest Eugen

Hi,Thanks all,I used the following @1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointETE, minutes) flr 60 % %(FPLWPETEMin((L:FPL_index, number) 2 +))%!02d!which workedbut the below don't work for some reason , can't figure out what I miss@1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointETA, minutes)%(FPLWPETAMin((L:FPL_index, number) 2 +))%!02d!Same goes with fuel@1 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointFuelRemainedAtArrival,liters)BrgdsEugen

Share this post


Link to post
Share on other sites

Eugen,Code here not available, but to get ETA I use ETE + ZULU time and that gives a proper read out.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Here are the macro's from the leg page of the fmc%((@c:FlightPlanWaypointEstimatedTimeRemaining,hours))%!02d!:%((@c:FlightPlanWaypointEstimatedTimeRemaining,minutes))%!02d!%{end}%((P:Zulu time,hours) flr 100 % (@c:FlightPlanWaypointEstimatedTimeRemaining,hours) +)%!02d!:%((P:Zulu time, minutes) flr 60 % (@c:FlightPlanWaypointEstimatedTimeRemaining,minutes) +)%!02d!%{end}Concerning the fuel, never used that,%((@c:FlightPlanWaypointFuelRemainedAtArrival,pounds))%!d!%{end}seems to give a proper indicationHope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

And these seems to work too:%((@c:FlightPlanWaypointETA,hours) 24 % flr)%!02d!:%((@c:FlightPlanWaypointETA,minutes)60 % flr)%!02d!%{end}%((@c:FlightPlanWaypointETE,hours) 24 % flr)%!02d!:%((@c:FlightPlanWaypointETE,minutes) 60 % flr)%!02d!%{end}Jan"Beatus Ille Procul Negotiis"

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...