Estimated Duration of Flight Calculator

Educational Purposes, No Commercial Value
GENERAL DISCLAIMERS
This site is for educational purposes in nature and is not designed to assist pilots and aircrews for flight planning or familiarization. It may be not used in conjunction with pre-flight or flight information needed to satisfy any requirements of the Federal Aviation Administration (FAA) and is not to be considered as any source of information to meet pre-flight or flight action. If you are in an actual airplane or planning for an actual flight, you are to de-install this app or navigate away from this website immediately.



Duration Calculator

Duration is Distance in Nautical Miles divided by Speed in Knots. General Errors like Divide by Zero and Negative Ground Speed Input values are accounted for and rejected as input values to the calculation. The starting location and destination locations are not actually used in any portion of the code; they are simply added to meet the requirements of the assignment. The distance to travel is an input field. Later functionality could be added to have starting location and destination locations be either dropdown selections or other forms of input and then the distance to travel could be looked up or calculated from the choices of starting location and destination rather than the user having to input the distance to travel information manually. I deemed this type of functionality beyond the scope of the activity I was attempting to code to and perform here.



Duration calculator
Agree to Terms and Conditions:
Flight Start Location:
Destination Location:
Distance (Nm):
Ground Speed (Knots):
Estimate Flight Duration (Hours):
 

Important safety note:This calculator is for performing calculations before flying RV-6A aircraft, but you should be aware that this calculator may be specific to that particular aircraft. The answers it gives might not be applicable to any other aircraft. You must use the data taken from the POH of your particular aircraft.



How did I debug this webpage? A: Mostly I used the javascript alert() function to create pop up messages. But I also declared additional variables ( that I have since removed from the javascript text ) to create sub-calculations and also display those values with alert() messages. I also used the javascript debugger in both Chrome and Firefox to display messages about syntax errors in the code. Finally, the agreement checkbox does nothing. It was simply added to meet the requirement of the assignment. Also, I did not create any try catch blocks or create any error handling functions. I simply accounted for invalid input from the user in if-else if-else logic and displayed to appropriate output to the user based on the input.



Finally, I have observed the Reset and Calculate Buttons ARE NOT BACKWARD COMPATIBLE TO Internet Explorer. After a careful review of the assignment text, I do not believe that is a requirement of this particular webpage. Other assignments and other webpages I have developed thus far has demonstrated that functionality. Add Smiley Face Wink here. If you want to dock me a few points for this go ahead and do so, but I like the clean-ness ( beauty ) of the code here too much to clutter it up with that. Wink.