3.25 GPS
Derived from Device.
GPS { |
3.25.1 Description
The GPS node is used to model a Global Positioning Sensor (GPS) which can obtain information about its absolute position from the controller program.
3.25.2 Field Summary
-
type: This field defines the type of GPS technology used like "satellite" or "laser" (currently ignored).
-
resolution: This field defines the precision of the GPS, that is the maximum error (expressed in meter) in the absolute position.
3.25.3 GPS Functions
NAME
wb_gps_enable, wb_gps_disable, wb_gps_get_sampling_period, wb_gps_get_values - enable, disable and read the GPS measurementsSYNOPSIS [C++] [Java] [Python] [Matlab]
#include <webots/gps.h>void wb_gps_enable(WbDeviceTag tag, int ms);
void wb_gps_disable(WbDeviceTag tag);
int wb_gps_get_sampling_period(WbDeviceTag tag);
const double *wb_gps_get_values(WbDeviceTag tag);
DESCRIPTION
wb_gps_enable() allows the user to enable a GPS measurement each ms milliseconds.
wb_gps_disable() turns the GPS off, saving computation time.
The wb_gps_get_sampling_period() function returns the period given into the wb_gps_enable() function, or 0 if the device is disabled.
The wb_gps_get_values() function returns the current GPS measurement. The values are returned as a 3D-vector, therefore only the indices 0, 1, and 2 are valid for accessing the vector. The returned vector indicates the absolute position of the GPS device.
|
|
|
|