|
2 | 2 |
|
3 | 3 | public class BattMonConstants { |
4 | 4 | // All of these aren't right and will need to be determined |
5 | | - public static double kBattVolt1 = 42; |
6 | | - public static double kBattVolt2; |
7 | | - public static double kBattCurrent1 = 42; |
8 | | - public static double kBattCurrent2; |
9 | | - public static double kPdpVoltage1 = 42; |
10 | | - public static double kPdpVoltage2; |
| 5 | + |
| 6 | + // Battery Voltage Conversion |
| 7 | + public static final double kBattVolt1 = 12; |
| 8 | + public static final double kBattVolt1DC = 0.9; |
| 9 | + public static final double kBattVolt2 = 2; |
| 10 | + public static final double kBattVolt2DC = 0.1; |
| 11 | + public static final double kBattVoltSlope = |
| 12 | + (kBattVolt1 - kBattVolt2) / (kBattVolt1DC - kBattVolt2DC); |
| 13 | + public static final double kBattVoltOffset = kBattVolt1 - kBattVoltSlope * kBattVolt1DC; |
| 14 | + |
| 15 | + // Battery Current Conversion |
| 16 | + public static final double kBattCurrent1 = 50; |
| 17 | + public static final double kBattCurrent1DC = 0.9; |
| 18 | + public static final double kBattCurrent2 = 1; |
| 19 | + public static final double kBattCurrent2DC = 0.1; |
| 20 | + public static final double kBattCurrentSlope = |
| 21 | + (kBattCurrent1 - kBattCurrent2) / (kBattCurrent1DC - kBattCurrent2DC); |
| 22 | + public static final double kBattCurrentOffset = |
| 23 | + kBattCurrent1 - kBattCurrentSlope * kBattCurrent1DC; |
| 24 | + |
| 25 | + // PDP Voltage Conversion |
| 26 | + public static final double kPdpVoltage1 = 42; |
| 27 | + public static final double kPdpVoltage1DC = 0.9; |
| 28 | + public static final double kPdpVoltage2 = 2; |
| 29 | + public static final double kPdpVoltage2DC = 0.1; |
| 30 | + public static final double kPdpVoltSlope = |
| 31 | + (kPdpVoltage1 - kPdpVoltage2) / (kPdpVoltage1DC - kPdpVoltage2DC); |
| 32 | + public static final double kPdpVoltOffset = kPdpVoltage1 - kPdpVoltSlope * kPdpVoltage1DC; |
| 33 | + |
| 34 | + // Breaker Temp Conversion |
11 | 35 | public static double kBreakerTemp1 = 0.32; |
12 | 36 | public static double kBreakerTemp2 = 0.0047; |
13 | 37 |
|
14 | | - public static double kBatt1Low = 2; |
15 | | - public static double kBatt2Low = 2; |
16 | | - public static double kPDPHigh = 42; |
17 | | - public static double kTempHighSlope = 10; |
18 | | - public static double kTempDangerSlope = 15; |
19 | | - public static double kHysteresis= 1; |
| 38 | + // Low Battery Thresholds |
| 39 | + public static final double kBatt1Low = 2; |
| 40 | + public static final double kBatt2Low = 2; |
| 41 | + |
| 42 | + // Temp Limiting |
| 43 | + public static final double kCurrent1 = 10; |
| 44 | + public static final double kCurrent1Temp = 200; |
| 45 | + public static final double kCurrent2 = 200; |
| 46 | + public static final double kCurrent2Temp = 160; |
| 47 | + public static final double kTempLimitSlope = |
| 48 | + (kCurrent1Temp - kCurrent2Temp) / (kCurrent1 - kCurrent2); |
| 49 | + public static final double kTempLimitOffset = kCurrent1Temp - kTempLimitSlope * kCurrent1; |
| 50 | + public static final double kHysteresis = 20; |
| 51 | + public static final double kWarningOffset = 5; |
| 52 | + |
| 53 | + public static final double kPDPHigh = 42; |
| 54 | + public static final double kTempHighSlope = 10; |
| 55 | + public static final double kTempDangerSlope = 15; |
20 | 56 | } |
0 commit comments