Sign in to follow this  
pve

Zulu time add minutes

Recommended Posts

Hi all %((A:GPS IS ACTIVE FLIGHT PLAN,bool))%{if}%((A:Indicated Altitude, feet) (L:AltChange,number) - abs (A:Vertical speed, feet per minute) / s1)%( l1 60 / int s2)%((P:ZULU TIME, hours) l2 + flr 24 %)%!02d!%((P:ZULU TIME, minutes) l1 + flr 60 %)%!02d!z% Works out T/C but will not increase the hour once the minutes go over 60. Can any one help.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I don't think anyone can even read that!Formatting... readability... *hint* *hint*

Share this post


Link to post
Share on other sites

It's in formatted text / update / macro format, which reads very differently than many other formats in XML.If, big if here, I'm reading that instruction set correctly: You're adjusting the hour and minute but I don't see anything that will add one to the hour should the minutes go over 60. You're managing the display of hours and minutes so that they max at 24 and 60, but you need a way to set an lvar when minutes go over 60 and then have that lvar trigger another macro that adds one to the hours lvar. Once the addition is done, that macro should reset the trigger lvar to 0 and it won't trigger again until the minutes counter sets it the next time minutes go over 60.Or did I read that wrong? I'm still mastering this format myself but the above is what I'm getting out of your sample line here.Scott / Vorlin

Share this post


Link to post
Share on other sites

Scott/Vorlin You Are right, The code gives minutes to top of climb to add to Zulu time and display. My maths is bad and I am sure there is a simple way to do this after the stored value retrival. Any minutes over 60 in l1 get + 1 hr in l2.

Share this post


Link to post
Share on other sites

Paul,Maybe using this snippet..:((A:Indicated Altitude, feet) (L:AltChange,number) - abs (A:Vertical Speed, feet per minute) / (P:ZULU TIME, minutes) + d 1440 >= 1440 * - (>L:TCTime,minutes) (in Zulu format)and then to extract hours and minutes: (L:TCTime,hours) int(L:TCTime,minutes) 60 % intTom

Share this post


Link to post
Share on other sites

Jan,You're right, but I guess " (A:Vertical Speed,feet per minute) abs " instead of " -1 * " just to manage negative v/s data on descent.Tom

Share this post


Link to post
Share on other sites

Hi Tom,Was comparing.This works ok:Yours:(A:Indicated Altitude,feet) (A:Autopilot altitude lock var,feet) - (A:Vertical Speed,feet per minute) / abs (P:ZULU TIME, minutes) + d 1440 >= 1440 * - (>L:TCTime,minutes) %((L:TCTime,hours) int)%!02d! : %((L:TCTime,minutes) 60 % int)%!02d!and the other:(A:Indicated Altitude,feet) (A:Autopilot altitude lock var,feet) - (A:Vertical speed,feet per minute) / abs (>L:toc min,number) (P:ZULU TIME,minutes) flr 60 % (L:toc min,number) + 60 >= if{ 1 (>L:toc hr,number) } els{ 0 (>L:toc hr,number) } %((P:ZULU TIME,hours) (L:toc hr,number) + flr 24 %)%!02d! : %((P:ZULU TIME,minutes) (L:toc min,number) + flr 60 %)%!02d!Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Tom Yet again 10/10! %((L:ClbControl,bool))%{if}%((A:Indicated Altitude, feet) (L:AltChange,number) - abs (A:Vertical speed, feet per minute) / (P:ZULU TIME, minutes) + d 1440 >= 1440 * - s8)%( l8 60 / int )%!02d!%( l8 60 % int )%!02d! z% /%((A:Indicated Altitude, feet) (L:AltChange,number) - abs (A:Vertical speed, feet per minute) / (A:GROUND VELOCITY, knots) * 60 /)%!5d! NM%{end} Gives TOC time and distance thanks. Paul

Share this post


Link to post
Share on other sites

Tom For descent I use:- ((A:GPS IS ACTIVE FLIGHT PLAN,bool))%{if}%( @TopOfDEC (A:Ground Velocity,knots) / 60 * (P:ZULU TIME, minutes) + d 1440 >= 1440 * - s9)%( l9 60 / int )%!02d!%( l9 60 % int )%!02d! z% /%(@TopOfDEC)%!5d! NM% Where @TopOfDEC is your calc for miles to descend to target alt. Gives Zulu at TOD and distance to go.

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