May 14, 200323 yr Hi,In need of a little help with the next code.Want to show time as 00:00 (H:M) as EstimTimeEnroute.I have the from the B747.Calculated Time=Distance/Speed as follows:%((L: Dist,number) rddg 60 * (A:Airspeed select indicated or true,knots) / 60 * )%!02d%That code gives the number of minutes to go(?).%((L: Dist,number) rddg 60 * (A:Airspeed select indicated or true,knots) / )%!0.2f%gives H.1/100H.So is there a way to show it 00:00 (H:M)?Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
May 14, 200323 yr Author Eugen,The clock code is not the problem, but my calculation "DISTANCE/SPEED=TIME".This code gives me the amount of minutes to arrive at a waypoint.So the reading now is (eg): ETE(MIN): 135I would like: ETE 02:15, if at all possible.Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
May 14, 200323 yr Hi,Ok here is just a thought...135 /60 store it use int to to get rid of decimals now you have the hours load initial value - int value * 60 =minutes or something like this ?brgdsE
May 15, 200323 yr ...something in minutes) d 60 / int )%!02d!:%( 1 % int )%!02d!or...something in hours) d int )%!02d!:%( 60 % int )%!02d!Arne Bartels
May 15, 200323 yr Author Hallo,Up until now no succes with the codes, so i'll use for the time being:%((L:Dist,number) rddg 60 * (A:Airspeed select indicated or true,knots) / 60 * )ETE 00:%!2d!With waypoints less than 1 hour to go no problem, otherwise not very realistic, see pic.Other ideas?Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
January 24, 200422 yr Commercial Member This is an old post, but I was having a similar issue and I finally solved it, so maybe it will be useful to sombody else. I am just beginning with the vaguely documanted XML/RPN schema, but thanks to those like Arne and Jan, I am finally making some headway. There seems to be no Modula functions that I can find, making this more difficult than need be, so here is the code followed by what I did to arrive at it. I'm sure it can be more efficient, and I hope somebody will modify it to improve it.This code will take a value in seconds, and give you a TTG (Time to go), aka ETE (Estemated Time Enroute) in the format HH:MM:SS%((A:Nav2 dme, nmiles) (A:Ground Velocity,knots) / 3600 * s1)%( l1 3600 / int s3)%( l3 3600 * s9 l1 l9 - s2)%(l2 60 / int s4)%(l3 3600 * s9 l4 60 * s8 l1 l9 - l8 - s5)%(l3)%!02d!%:%(l4)%!02d!%:%(l5)%!02d!Hope this helps somebody...--Jon Jon Blum Vertical Reality Simulations
January 24, 200422 yr Commercial Member Forgot to mention this, but it may be obvious anyway: This can be used to format ANY time in seconds to an Hours:Minutes:Seconds format. This is what the code is doing:1) Divide Total Seconds (s1) by 3600 to get hours (int)Hours(s3) = Total Seconds / 36002) Subtract the hours portion to get Remaining Seconds(s2)Remaining Seconds(s2) = Total Seconds - (Hours * 3600)3) Divide Remaining Seconds by 60 to get minutes (int) Minutes(s4) = Remaining Seconds /604) Subtract Hours and Minutes to get Seconds. Seconds(s5) = Total Seconds - (Hours * 3600) - (Minutes * 60)Format the hours, minutes, and seconds to hh:mm:ss--Jon Jon Blum Vertical Reality Simulations
January 24, 200422 yr Author Hi,Nice work.At the moment i use only (Flightplan in GPS) ETA in Zulu time as in the real thing:%((A:GPS IS ACTIVE WAY POINT, bool))%{if}%((A:GPS WP ETA, hours) flr 100 %)%!02d!:%((A:GPS WP ETA, minutes) flr 60 %)%!02d!%z%{end}Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
October 21, 200421 yr >%((A:GPS IS ACTIVE WAY POINT, bool))%{if}%((A:GPS WP>ETA, hours) flr 100 %)%!02d!:%((A:GPS WP ETA, minutes) flr 60>%)%!02d!%z%{end}>Jan,I tried this and that to get the WP ETA shown on my ND as Zulu Time. Without any success. Then I searched the forum and came across this thread.I had also extracted above code from the default GPS and modified it the same way you did (in addition I have erased the ":" and added seconds to dispaly the ETA the it is in Boeing aircraft). But unfortunately the only thing it gives me is the ETA in local time (same as in the dafault GPS) but with a "z" at the end of the string. So how have you managed, that this code gives you the ETA displayed as Zulu Time?Wolfgang
October 21, 200421 yr Author Wolfgang,I didn't bother so much.But may be it is possible to add GPS ETE to ZULU TIME??Something like (not tested):(P:Zulu time, hours) 24 % flr (A:GPS WP ETE,hours) flr 100 % + (P:Zulu time, minutes) 60 % flr (A:GPS WP ETE,minutes) 60 % flr + %(@hours)%!02d!:%(@minutes)%!02d!z%etc.Jan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
October 27, 200421 yr Author Hi,Tried:(P:Zulu time,hours) (A:GPS WP ETE,hours) + flr 24 % (P:Zulu time,minutes) (A:GPS WP ETE,minutes) + flr 60 % %(@hours)%!02d!:%(@minutes)%!02d! z%Looks promising,Jan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
November 1, 200421 yr Thanks a lot, Jan!Your idea of using ETE did the trick. I only alterd the ETA code extractetd from the default GPS as follows and get the ETA displayed in Zulu Time now (for seconds I use a dummy at the moment, as I found out that my precious used code did not work correctly).%((A:GPS IS ACTIVE WAY POINT, bool))%{if}%((P:Zulu time, hours) (A:GPS WP ETE, hours) + flr 24 %)%!02d!%((P:Zulu time, minutes) (A:GPS WP ETE, minutes) + flr 60 %)%!02d!%.0z%{end}Wolfgang
Create an account or sign in to comment