![]() |
Galaxis Codebase
1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
|
#include <stdint.h>#include <stdbool.h>#include <stddef.h>#include <pthread.h>

Go to the source code of this file.
Classes | |
| struct | PositionValue |
| struct | RawIMUValue |
| struct | FusionIMUValue |
| struct | RawDistanceItem |
| struct | RawDistances |
| struct | StationaryBeaconPosition |
| struct | StationaryBeaconsPositions |
| struct | MarvelmindHedge |
Macros | |
| #define | DATA_INPUT_SEMAPHORE "/mm_data_input_semaphore" |
| #define | MAX_STATIONARY_BEACONS 30 |
| #define | MAX_BUFFERED_POSITIONS 3 |
| #define | POSITION_DATAGRAM_ID 0x0001 |
| #define | BEACONS_POSITIONS_DATAGRAM_ID 0x0002 |
| #define | POSITION_DATAGRAM_HIGHRES_ID 0x0011 |
| #define | BEACONS_POSITIONS_DATAGRAM_HIGHRES_ID 0x0012 |
| #define | IMU_RAW_DATAGRAM_ID 0x0003 |
| #define | BEACON_RAW_DISTANCE_DATAGRAM_ID 0x0004 |
| #define | IMU_FUSION_DATAGRAM_ID 0x0005 |
| #define | DEFAULT_TTY_FILENAME "/dev/ttyACM0" |
| #define BEACON_RAW_DISTANCE_DATAGRAM_ID 0x0004 |
Definition at line 142 of file marvelmind.h.
| #define BEACONS_POSITIONS_DATAGRAM_HIGHRES_ID 0x0012 |
Definition at line 140 of file marvelmind.h.
| #define BEACONS_POSITIONS_DATAGRAM_ID 0x0002 |
Definition at line 138 of file marvelmind.h.
| #define DATA_INPUT_SEMAPHORE "/mm_data_input_semaphore" |
Definition at line 7 of file marvelmind.h.
| #define DEFAULT_TTY_FILENAME "/dev/ttyACM0" |
Definition at line 179 of file marvelmind.h.
| #define IMU_FUSION_DATAGRAM_ID 0x0005 |
Definition at line 143 of file marvelmind.h.
| #define IMU_RAW_DATAGRAM_ID 0x0003 |
Definition at line 141 of file marvelmind.h.
| #define MAX_BUFFERED_POSITIONS 3 |
Definition at line 88 of file marvelmind.h.
| #define MAX_STATIONARY_BEACONS 30 |
Definition at line 80 of file marvelmind.h.
| #define POSITION_DATAGRAM_HIGHRES_ID 0x0011 |
Definition at line 139 of file marvelmind.h.
| #define POSITION_DATAGRAM_ID 0x0001 |
Definition at line 137 of file marvelmind.h.
| struct MarvelmindHedge* createMarvelmindHedge | ( | ) |
Definition at line 688 of file marvelmind.c.
References MarvelmindHedge::anyInputPacketCallback, MarvelmindHedge::baudRate, DEFAULT_TTY_FILENAME, MarvelmindHedge::fusionIMU, MarvelmindHedge::haveNewValues_, MarvelmindHedge::lastValues_next, MarvelmindHedge::lastValuesCount_, MarvelmindHedge::lock_, MarvelmindHedge::positionBuffer, MarvelmindHedge::rawDistances, MarvelmindHedge::rawIMU, MarvelmindHedge::receiveDataCallback, MarvelmindHedge::terminationRequired, MarvelmindHedge::ttyFileName, RawIMUValue::updated, FusionIMUValue::updated, RawDistances::updated, and MarvelmindHedge::verbose.
Referenced by MMNode::MMNode().

| void destroyMarvelmindHedge | ( | struct MarvelmindHedge * | hedge | ) |
Definition at line 1077 of file marvelmind.c.
References MarvelmindHedge::positionBuffer.
| bool getFusionIMUFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| struct FusionIMUValue * | fusionIMU | ||
| ) |
Definition at line 1002 of file marvelmind.c.
References MarvelmindHedge::fusionIMU, and MarvelmindHedge::lock_.
Referenced by MMNode::on_mm_callback(), and printFusionIMUFromMarvelmindHedge().

| bool getPositionFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| struct PositionValue * | position | ||
| ) |
Definition at line 816 of file marvelmind.c.
References getPositionFromMarvelmindHedgeByAddress().
Referenced by MMNode::on_mm_callback().


| bool getRawDistancesFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| struct RawDistances * | rawDistances | ||
| ) |
Definition at line 920 of file marvelmind.c.
References MarvelmindHedge::lock_, and MarvelmindHedge::rawDistances.
Referenced by printRawDistancesFromMarvelmindHedge().

| bool getRawIMUFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| struct RawIMUValue * | rawIMU | ||
| ) |
Definition at line 964 of file marvelmind.c.
References MarvelmindHedge::lock_, and MarvelmindHedge::rawIMU.
Referenced by printRawIMUFromMarvelmindHedge().

| bool getStationaryBeaconsPositionsFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| struct StationaryBeaconsPositions * | positions | ||
| ) |
Definition at line 869 of file marvelmind.c.
References MarvelmindHedge::lock_, and MarvelmindHedge::positionsBeacons.
Referenced by printStationaryBeaconsPositionsFromMarvelmindHedge().

| void printFusionIMUFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| bool | onlyNew | ||
| ) |
Definition at line 1021 of file marvelmind.c.
References FusionIMUValue::ax, FusionIMUValue::ay, FusionIMUValue::az, MarvelmindHedge::fusionIMU, getFusionIMUFromMarvelmindHedge(), FusionIMUValue::qw, FusionIMUValue::qx, FusionIMUValue::qy, FusionIMUValue::qz, FusionIMUValue::timestamp, FusionIMUValue::updated, FusionIMUValue::vx, FusionIMUValue::vy, FusionIMUValue::vz, FusionIMUValue::x, FusionIMUValue::y, and FusionIMUValue::z.

| void printPositionFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| bool | onlyNew | ||
| ) |
Definition at line 825 of file marvelmind.c.
References PositionValue::address, PositionValue::angle, getPositionFromMarvelmindHedgeByAddress(), MarvelmindHedge::haveNewValues_, PositionValue::highResolution, MAX_BUFFERED_POSITIONS, MarvelmindHedge::positionBuffer, PositionValue::ready, PositionValue::timestamp, PositionValue::x, PositionValue::y, and PositionValue::z.

| void printRawDistancesFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| bool | onlyNew | ||
| ) |
Definition at line 939 of file marvelmind.c.
References RawDistanceItem::address_beacon, RawDistances::address_hedge, RawDistanceItem::distance, RawDistances::distances, getRawDistancesFromMarvelmindHedge(), MarvelmindHedge::rawDistances, and RawDistances::updated.

| void printRawIMUFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| bool | onlyNew | ||
| ) |
Definition at line 983 of file marvelmind.c.
References RawIMUValue::acc_x, RawIMUValue::acc_y, RawIMUValue::acc_z, RawIMUValue::compass_x, RawIMUValue::compass_y, RawIMUValue::compass_z, getRawIMUFromMarvelmindHedge(), RawIMUValue::gyro_x, RawIMUValue::gyro_y, RawIMUValue::gyro_z, MarvelmindHedge::rawIMU, RawIMUValue::timestamp, and RawIMUValue::updated.

| void printStationaryBeaconsPositionsFromMarvelmindHedge | ( | struct MarvelmindHedge * | hedge, |
| bool | onlyNew | ||
| ) |
Definition at line 888 of file marvelmind.c.
References StationaryBeaconPosition::address, StationaryBeaconsPositions::beacons, getStationaryBeaconsPositionsFromMarvelmindHedge(), StationaryBeaconPosition::highResolution, StationaryBeaconsPositions::numBeacons, MarvelmindHedge::positionsBeacons, StationaryBeaconsPositions::updated, StationaryBeaconPosition::x, StationaryBeaconPosition::y, and StationaryBeaconPosition::z.
Referenced by MMNode::MMNode().


| void startMarvelmindHedge | ( | struct MarvelmindHedge * | hedge | ) |
Definition at line 718 of file marvelmind.c.
References Marvelmind_Thread_(), MAX_BUFFERED_POSITIONS, StationaryBeaconsPositions::numBeacons, MarvelmindHedge::positionBuffer, MarvelmindHedge::positionsBeacons, PositionValue::processed, PositionValue::ready, MarvelmindHedge::terminationRequired, MarvelmindHedge::thread_, StationaryBeaconsPositions::updated, and MarvelmindHedge::verbose.
Referenced by MMNode::MMNode().


| void stopMarvelmindHedge | ( | struct MarvelmindHedge * | hedge | ) |
Definition at line 1062 of file marvelmind.c.
References MarvelmindHedge::terminationRequired, MarvelmindHedge::thread_, and MarvelmindHedge::verbose.