summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--digital/beacon/src/position.c6
-rw-r--r--digital/beacon/src/position.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/digital/beacon/src/position.c b/digital/beacon/src/position.c
index 67a0ba36..616a8b00 100644
--- a/digital/beacon/src/position.c
+++ b/digital/beacon/src/position.c
@@ -207,4 +207,10 @@ int16_t position_get_coord(TOpponent_ID id, TCoord_type type)
int8_t position_get_trust(TOpponent_ID id)
{
return opponent[id].trust;
+}
+
+/* This function returns the latest angle to a specified beacon */
+float position_get_beacon_angle(TBeacon_ID id)
+{
+ return beacon[id].angle[1];
} \ No newline at end of file
diff --git a/digital/beacon/src/position.h b/digital/beacon/src/position.h
index d8a6d011..1d51b9a0 100644
--- a/digital/beacon/src/position.h
+++ b/digital/beacon/src/position.h
@@ -103,4 +103,7 @@ int16_t position_get_coord(TOpponent_ID id, TCoord_type type);
/* This function returns the trust according to opponent number */
int8_t position_get_trust(TOpponent_ID id);
+/* This function returns the latest angle to a specified beacon */
+float position_get_beacon_angle(TBeacon_ID id);
+
#endif \ No newline at end of file