/* LICENSE:
  =========================================================================
    CMPack'04 Source Code Release for OPEN-R SDK 1.1.5-r2 for ERS7
    Copyright (C) 2004 Multirobot Lab [Project Head: Manuela Veloso]
    School of Computer Science, Carnegie Mellon University
    All rights reserved.
  ========================================================================= */

#ifndef __FIELD_H__
#define __FIELD_H__

#include "gvector.h"

/* Lab values */
const double halfLength   =2100.0; // mm
const double halfWidth    =1350.0; // mm
const double penaltyRegionLengthOffset = halfLength - 500.0; // 1655mm
const double penaltyRegionHalfWidth = 500.0; // mm
const double wedgeSize    = 300.0; // mm
const double goalDepth    = 300.0; // mm
const double goalHalfWidth= 300.0; // mm
const double markerOffset = 100.0; // mm
const double markerHeight = 300.0; // mm from ground to center of marker
const double visionDegHalf=  29.0; // degrees
const double wallWidth    = 100.0; // mm
const double centerCircleRadius = 150.0; // mm

/* Field A */
/*
const double halfLength   =2102.5; // mm
const double halfWidth    =1347.5; // mm
const double penaltyRegionOffset = halfWidth - 350.0;
const double wedgeSize    = 300.0; // mm
const double goalDepth    = 340.0; // mm from back of goal to front of wall.
const double goalHalfWidth= 300.0; // mm
const double markerOffset = 280.0; // mm
const double markerHeight = 300.0; // mm from ground to center of marker
const double visionDegHalf=  29.0; // degrees
const double wallWidth    = 100.0; // mm
*/

/* Small-size filed values */
/*
const double halfLength   = 1400.0; // mm
const double halfWidth    = 1150.0; // mm
const double penaltyRegionOffset = halfWidth - 225.0;
const double wedgeSize    = 50.0; // mm
const double goalDepth    = 340.0; // mm from back of goal to front of wall.
const double goalHalfWidth= 300.0; // mm
const double markerOffset = 100.0; // mm
const double markerHeight = 300.0; // mm from ground to center of marker
const double visionDegHalf=  29.0; // degrees
const double wallWidth    = 50.0; // mm
*/

const double UNISCALE = 8.0;  // UNISCALE*appropriate width = stddev for 'uniform' distribution

const double BallDiameter=84.3; // mm
const double BallRadius  =BallDiameter/2.0; // 42.15 mm
const double MarkerColorSeperation = 100.0; // mm
const double GoalHeight = 300.0; // mm
const double WallHeight = 100.0; // mm

const double robot_fwd_size = 150;  // mm from center to front
const double robot_back_size = 100; // mm from center to back
const double robot_width = 110; // mm from center to side

typedef GVector::vector2d<double> vector2d;

const vector2d MarkerLocations[6]={
  vector2d(   halfLength+markerOffset,   halfWidth+markerOffset),
  vector2d(   halfLength+markerOffset, -(halfWidth+markerOffset)),
  vector2d(                       0.0,   halfWidth+markerOffset),
  vector2d(                       0.0, -(halfWidth+markerOffset)),
  vector2d(-(halfLength+markerOffset),   halfWidth+markerOffset),
  vector2d(-(halfLength+markerOffset), -(halfWidth+markerOffset))
};

const vector2d GoalLocations[6]={
  vector2d(-halfLength, 0),             //yellow
  vector2d(-halfLength, -goalHalfWidth),//yellow left
  vector2d(-halfLength,  goalHalfWidth),//yellow right
  vector2d( halfLength, 0),             //cyan
  vector2d( halfLength,  goalHalfWidth),//cyan left
  vector2d( halfLength, -goalHalfWidth) //cyan right
};

const vector2d GoalBoxCorners[4]={
  vector2d( penaltyRegionLengthOffset,  penaltyRegionHalfWidth),
  vector2d( penaltyRegionLengthOffset, -penaltyRegionHalfWidth),
  vector2d(-penaltyRegionLengthOffset,  penaltyRegionHalfWidth),
  vector2d(-penaltyRegionLengthOffset, -penaltyRegionHalfWidth)
};

#endif
