Program Help!
Posted: Wed Sep 17, 2008 8:53 am
Hello world!!
I want to create a program but however I am not too experienced with Microsoft Qbasic yet, so I thought I would ask on here for any help, tips and advice with my problems!!
I want to create a program which calculates the great circle distance between two cities, and also the initial and final headings between those same two cities.
I want to display a list of say about 10 cities, with the latitude and longitude of the cities programmed in and allow the user to input/select two of these cities from the list, say city A and city B, and then from this user input, qbasic should calculate the great circle distance between the two cities A and B, and the initial heading/course from city A to city B and the final heading at city B.
I also then want the user to be able to input a distance at which a certain point lies along the track between cities A and B (ie; a waypoint), and then Qbasic to display to the user the exact latitude and longitude of where this point lies on the track.
I hope every understands my writing!!
Here is a rough example of how I would like the program to display, please note that I?ve made the user inputs in blue text;
1.)$$$, France 06 09 0S 106 51 00 E
2.) London, England 51 29 0 N 00 00 00 W
3.) New York, USA 40 40 11 N 73 58 36 W
4) Singapore, Singapore 01 18 00 N 103 50 00 E
Select your initial and final locations by entering a number from the list; 2,4
London to Singapore;
Distance = 5852nm, initial track = 078, final track = 142
Calculate a waypoint along the track: enter the distance along the route: 3200
Waypoint = 3200nm, 34 39 00N 72 42 00E
Calculate another route? Yes or no?
Any help would be greatly appreciated ? I understand the maths involved for all the calculations as I can do them by hand, I just need help on how to structure the program and how to structure the code. Ie; how should I input the data etc...
Thanks very much!!
I want to create a program but however I am not too experienced with Microsoft Qbasic yet, so I thought I would ask on here for any help, tips and advice with my problems!!
I want to create a program which calculates the great circle distance between two cities, and also the initial and final headings between those same two cities.
I want to display a list of say about 10 cities, with the latitude and longitude of the cities programmed in and allow the user to input/select two of these cities from the list, say city A and city B, and then from this user input, qbasic should calculate the great circle distance between the two cities A and B, and the initial heading/course from city A to city B and the final heading at city B.
I also then want the user to be able to input a distance at which a certain point lies along the track between cities A and B (ie; a waypoint), and then Qbasic to display to the user the exact latitude and longitude of where this point lies on the track.
I hope every understands my writing!!
Here is a rough example of how I would like the program to display, please note that I?ve made the user inputs in blue text;
1.)$$$, France 06 09 0S 106 51 00 E
2.) London, England 51 29 0 N 00 00 00 W
3.) New York, USA 40 40 11 N 73 58 36 W
4) Singapore, Singapore 01 18 00 N 103 50 00 E
Select your initial and final locations by entering a number from the list; 2,4
London to Singapore;
Distance = 5852nm, initial track = 078, final track = 142
Calculate a waypoint along the track: enter the distance along the route: 3200
Waypoint = 3200nm, 34 39 00N 72 42 00E
Calculate another route? Yes or no?
Any help would be greatly appreciated ? I understand the maths involved for all the calculations as I can do them by hand, I just need help on how to structure the program and how to structure the code. Ie; how should I input the data etc...
Thanks very much!!