|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Worldmodel
The Worldmodel
class is used to calculate absolute positions of
seen objects with their given relative data. Most important is the calculation
of the own position. For that a field line, which normaly can be seen, and the
nearest seen flag are used; Further body- and hearevents recieved from
Parser class are delivered to Brain class.
Field Summary | |
private int |
actualTime
|
private double[] |
bodyDoubleArray
bodyDoubleArray = array with length 16 and: [0]: time [1]: view_mode(1){ 0="high" | 1="low" } [2]: view_mode(2){ 0="narrow" | 1="normal" | 2="wide" } [3]: stamina(1) ( Stammina ) [4]: stamina(2) ( Effort ) [5]: speed(1) ( AmountOfSpeed ) [6]: speed(2) ( DirectionOfSpeed )[-180 ~ 180 degrees] [7]: head-angle ( HeadAngle ) [-180 ~ 180 degrees] [8]: kick ( KickCount ) [positive integer] [9]: dash ( DashCount ) [positive integer] [10]: turn ( TurnCount ) [positive integer] [11]: say ( SayCount ) [positive integer] [12]: turn_neck ( TurnNeckCount ) [positive integer] [13]: catch ( CatchCount ) [positive integer] [14]: move ( MoveCount ) [positive integer] [15]: change_view ( ChangeViewCount )[positive integer] Author: Ramin Radpour |
private Communication |
communication
The Communication object |
private int[] |
event
event = array with following content: [0]: time [1]: { 0=hear | 1=visual | 2=body } |
private java.lang.String[] |
hearStringArray
hearStringArray = String array with following content: [0]: time [1]: sender { "referee" | "self" | direction | "online_coach_left" | "online_coach_right"} [2]: message time can be converted to int direction can be converted to double Author: Ramin Radpour |
private boolean |
initialized
|
private int |
myNr
|
private int[] |
parsedID
|
private Parser |
parser
The Parser object |
private boolean |
playDirectionRight
|
private boolean |
playerChanged
|
private double[][] |
positions
positions = array[][] with double[] of length 7 with following content: first positions [x][]: [0] : ball [1] - [11] : player of own team related to player-number [12]- [22] : player of the other team related to player-number + 11 second positions [][x]: [0] : x-position [1] : y-position [2] : by rccs-server given distance [3] : by rccs-server given angle (no absolute angle) [4] : by rccs-server given distanceChange - not used [5] : timecyclus [6] : absolute angle (in case of ownNumber) and distance to ball (in case of other player) initialazion value is 1000.0 Author: Ramin Radpour |
private java.lang.String |
refereeMsg
|
private java.lang.String |
teamName
|
private java.util.Vector |
vector
The Vector object |
Constructor Summary | |
Worldmodel(Communication communication)
Creates a new Worldmodel instance. |
Method Summary | |
int |
actualTime()
|
double[] |
bodyDoubleArray()
|
private void |
calcOwnPos()
The calcOwnPos method calculates ownPosition and uses getNextFlag and getLineAngle
fills positions[myNr][0,1,5,6]
Author: Ramin Radpour |
private void |
calcPositions()
The calcPositions method calculates absolute positions of seen objects.
uses methods calcOwnPos() and rel2abs()
Author: Ramin Radpour |
void |
disconnect()
|
int[] |
event()
|
private double[] |
flagPosition(VisualObject flagName)
The flagPosition method gives absolute flagposition back |
private double[] |
getLineAngle()
The getLineAngle method gives seen line with see-angle back |
private double[] |
getNextFlag()
The getNextFlag method takes the nearest flag of all seen ones |
double[][] |
giveData()
|
java.lang.String[] |
hearStringArray()
|
void |
init()
The init method initializates players and gets information
from server about playdirection, own Number and playmode
Author: Patrick Ficher |
boolean |
initialized()
|
boolean |
playDirectionRight()
Should be called from the GUI |
int |
playerNr()
|
java.lang.String |
playmode()
|
private void |
refereeMsg()
The refereeMsg method receive and set referee messages
Author: Thorsten Fiekert |
private double[] |
rel2abs(double distance,
double angle)
The rel2abs method calculates absolute values with by
server passed information. |
void |
run()
The run method differes between hear, see and body events
Author: Ramin Radpour
Author: Patrick Ficher |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Communication communication
private Parser parser
private java.util.Vector vector
private double[][] positions
Author: Ramin Radpour
private boolean playerChanged
private boolean playDirectionRight
private int myNr
private java.lang.String teamName
private java.lang.String[] hearStringArray
Author: Ramin Radpour
private java.lang.String refereeMsg
private double[] bodyDoubleArray
Author: Ramin Radpour
private boolean initialized
private int actualTime
private int[] event
private int[] parsedID
Constructor Detail |
public Worldmodel(Communication communication)
Worldmodel
instance.communication
- a Communication
value defining the
communication link to the server via which the commands can be
sent.Communication
Method Detail |
public java.lang.String playmode()
String
referee messagepublic java.lang.String[] hearStringArray()
String[]
hear arraypublic int actualTime()
integer
actual Timepublic boolean initialized()
boolean
attribute initializedpublic int playerNr()
integer
Player numberpublic double[][] giveData()
double[][]
positions arraypublic int[] event()
int[]
event arraypublic double[] bodyDoubleArray()
double[]
body arrraypublic boolean playDirectionRight()
boolean
playdirectionprivate void refereeMsg()
refereeMsg
method receive and set referee messages
Author: Thorsten Fiekert
public void init()
init
method initializates players and gets information
from server about playdirection, own Number and playmode
Author: Patrick Ficher
public void disconnect()
private double[] flagPosition(VisualObject flagName)
flagPosition
method gives absolute flagposition backflagName
- a VisualObject
objectNamedouble[]
absolute flagposition array
Author: Ramin Radpour
Author: Alexander Lillich
Author: Anita Reifsteck
private double[] getNextFlag()
getNextFlag
method takes the nearest flag of all seen onesAuthor: Ramin Radpour
Author: Patrick Ficher
private double[] getLineAngle()
getLineAngle
method gives seen line with see-angle backAuthor: Ramin Radpour
Author: Alexander Lillich
Author: Anita Reifsteck
private double[] rel2abs(double distance, double angle)
rel2abs
method calculates absolute values with by
server passed information.distance
- a double
angle
- a double
Author: Ramin Radpour
private void calcOwnPos()
calcOwnPos
method calculates ownPosition and uses getNextFlag and getLineAngle
fills positions[myNr][0,1,5,6]
Author: Ramin Radpour
private void calcPositions()
calcPositions
method calculates absolute positions of seen objects.
uses methods calcOwnPos() and rel2abs()
Author: Ramin Radpour
public void run()
run
method differes between hear, see and body events
Author: Ramin Radpour
Author: Patrick Ficher
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |