-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWarningLevelCalculator.java
More file actions
76 lines (65 loc) · 2.18 KB
/
WarningLevelCalculator.java
File metadata and controls
76 lines (65 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication2;
import java.util.ArrayList;
/**
*
* @author Adam
*/
public class WarningLevelCalculator {
Aircraft[] nearList;
Aircraft thisPlane;
//CollisionCalculator collCalc;
TextComm textComm;
ArrayList<Collision> collisions;
public WarningLevelCalculator(Aircraft thisPlane, Aircraft[] nearList){
this.nearList = nearList;
this.thisPlane = thisPlane;
//collCalc = new CollisionCalculator(mine, nearList);
textComm = new TextComm();
collisions = new ArrayList();
}
public WarningLevelCalculator(){
}
public void parseList(){
/*
for(int i = 0; i < this.nearList.length; i++){
if(checkCollision(thisPlane, this.nearList[i])){
//do the math needed for calculating warnings
//this math includes finding out how far away
//the point is and determining the level based
//on that distance
//use TextComm object to alert necessary interfaces
}
else{
//set warning of this.nearList[i] to green
}
}
*/
System.out.println("Method Tested");
}
public Collision detectCollision(Aircraft one, Aircraft two){
//check to see if the aircraft will collide
//math includes the math to find if the two vector headings
//will intersect
//add to array
return null;
}
public boolean testCollisionPoint(Collision collision){
//check to see if the collision is worth looking at
//i.e. if its too far away, its not a point of interest
return false;
}
public void setWarningLevelYellow(Aircraft plane){
//generate instructions??
}
public void setWarningLevelOrange(Aircraft plane){
//generate instructions??
}
public void setWarningLevelRed(Aircraft plane){
//generate instructions??
}
}