gucoordinates
Public Attributes | List of all members
gu_field_coordinate Struct Reference

A field_coordinate is a coordinate for an object that faces a certain direction (such as a robot) on the field. More...

#include <field_coordinate.h>

Inheritance diagram for gu_field_coordinate:
Inheritance graph
Collaboration diagram for gu_field_coordinate:
Collaboration graph

Public Attributes

gu_cartesian_coordinate position
 The position of the object on the field. More...
 
degrees_t heading
 The direction where the object is facing. More...
 

Detailed Description

A field_coordinate is a coordinate for an object that faces a certain direction (such as a robot) on the field.

The coordinate describes the location of the object on the field (with position) as well as the direction that the object is facing (with heading).

Definition at line 78 of file field_coordinate.h.

Member Data Documentation

◆ heading

degrees_t gu_field_coordinate::heading

The direction where the object is facing.

If the field is viewed where the home side is in the west and the away side is in the ast, then the direction runs counter clockwise where the zero direction faces directly south. Therefore, 90 degrees points directly east, 180 degrees points directly north and 270 degrees points directly west.

Definition at line 111 of file field_coordinate.h.

Referenced by CGTEST::FieldCoordinateCPPTests::cchange(), field_coord_to_rr_coord_to_target(), gu_field_coordinate_equals(), GU::FieldCoordinate::heading(), rr_coord_to_cartesian_coord_from_field(), rr_coord_to_field_coord(), rr_coord_to_field_coord_from_source(), GU::FieldCoordinate::set_heading(), and CGTEST::TEST_F().

◆ position

gu_cartesian_coordinate gu_field_coordinate::position

The position of the object on the field.

If the field is viewed where the home side is in the west and the away side is in the east, then the x asix runs north to south. The y axis runs west to east. A negative x value indicates a position in the northern half of the field while a positive x value indicates a position in the southern half of the field. A negative y value indicates a position in the western side of the field whereas a positive y value indicates a position in the eastern side of the field. A value of zero for both x and y indicate that the object is in the middle of the field.

As an example, if we take an actual full sized 100 meter field, then the middle of the goal line on the home side of the field would be at the coordinates (0, -50). The middle of the away goal line would be (0, 50). The middle line which separates the two sides of a field which is 60 meters wide runs from the points (-30, 0) to (30, 0).

Definition at line 100 of file field_coordinate.h.

Referenced by CGTEST::FieldCoordinateCPPTests::cchange(), field_coord_to_rr_coord_to_target(), gu_field_coordinate_equals(), GU::FieldCoordinate::position(), rr_coord_to_cartesian_coord_from_field(), rr_coord_to_field_coord(), rr_coord_to_field_coord_from_source(), GU::FieldCoordinate::set_position(), and CGTEST::TEST_F().


The documentation for this struct was generated from the following file: