I'm trying to create a calculator that calculates the impedance of a line. The user selects/inputs data and depending on the type of data selected, the program matches it with a table of values and uses this data to calculate the impedance. I wrote it out using just the JAVA language using numerous 'if' statements and now I am trying to write it using JAVAScript. I was thinking of using drop down boxes for the user to select from instead of checking the user's input each time but do not know how to make the selected choice point to a certain set of data in a table and also to use that data in other calculations.
Here's my problem for clerification purposes...
**********************
Select Conductor Type/Size (drop down box)
- acsr 1351
- acsr '4/0'
- al 477
- cu'1/0'
- cu #2
Select KV (drop down box)
- 230
- 115
- 46
- 33
Enter Mileage (user input)
Enter Spacing (user input)
Resistance (calculated output)
Reactance (calculated output)
Charging (calculated output)
-------------------------------
DATA TABLE
acsr 1351 R=0.0803 X=0.369 B=0.0838
acsr '4/0' R=0.0829 X=0.378 B=0.0855
al 477 R=0.1304 X=0.557 B=0.1079
cu '1/0' R=0.305 X=0.503 B=0.1205
cu #2 R=0.964 X=0.546 B=0.1274
FORMULAS
Resistance = (R*100/KV*KV)*Milg
Reactance = [(X*100/KV*KV)+(0.28*LOG10(Spacing)]*Milg
Charging = [(0.0001*KV*KV)/(B+0.07*LOG10(Spacing)]*Milg
***********************
So, the user selects the conductor type/size. Depending on which one they chose determines which set of data to use in the formula. Then using this data along with the inputed mileage, the program calculates the resistance and impedance.
Well, I hope that I have clerified my problem for you and I hope that you will be able to help. Thanks.
~kanin
Here's my problem for clerification purposes...
**********************
Select Conductor Type/Size (drop down box)
- acsr 1351
- acsr '4/0'
- al 477
- cu'1/0'
- cu #2
Select KV (drop down box)
- 230
- 115
- 46
- 33
Enter Mileage (user input)
Enter Spacing (user input)
Resistance (calculated output)
Reactance (calculated output)
Charging (calculated output)
-------------------------------
DATA TABLE
acsr 1351 R=0.0803 X=0.369 B=0.0838
acsr '4/0' R=0.0829 X=0.378 B=0.0855
al 477 R=0.1304 X=0.557 B=0.1079
cu '1/0' R=0.305 X=0.503 B=0.1205
cu #2 R=0.964 X=0.546 B=0.1274
FORMULAS
Resistance = (R*100/KV*KV)*Milg
Reactance = [(X*100/KV*KV)+(0.28*LOG10(Spacing)]*Milg
Charging = [(0.0001*KV*KV)/(B+0.07*LOG10(Spacing)]*Milg
***********************
So, the user selects the conductor type/size. Depending on which one they chose determines which set of data to use in the formula. Then using this data along with the inputed mileage, the program calculates the resistance and impedance.
Well, I hope that I have clerified my problem for you and I hope that you will be able to help. Thanks.
~kanin