GPS

A GPS sensor that returns coordinates .

A GPS sensor which returns the position either in Blender or Geodetic coordinates.

This sensor always provides perfect data on the levels “raw” and “extended”. To obtain more realistic readings, it is recommended to add modifiers.

  • Noise modifier: Adds random Gaussian noise to the data

coordinates in Blender: -> east and -> north

The “heading” is Clockwise (mathematically negative).

Warning

To work properly in “raw” and “extented” mode, you need to configure the following variables at the environment level:

  • longitude in degrees (double) of Blender origin
  • latitude in degrees (double) of Blender origin
  • altitude in m of the Blender origin
  • optionnaly angle_against_north in degrees is the angle between geographic north and the blender X axis. angle_against_north is positive when the blender X-axis is east of true north, and negative when it is to the west.

Conversion of Geodetic coordinates into ECEF-r, LTP into ECEF-r and vice versa

Conversion of Geodetic coordinates into ECEF-r

To be able to simulate a GPS-sensor (the Blender origin) must be defined in the properties in Geodetic coordinates (longitude, latitude, altitude). For the transformation [Psas] the coordinates must be in decimal degrees (no North, minutes, etc.). The result is a point in the ECEF-r coordinates.

Conversion of ECEF-r into LTP[Psas]

For this conversion is the base. A point is given in the ECEF-r coordinates and the goal is to get ( in the LTP-coordinates).

../../_images/conversion_coordinates1.png

1. Transform (Blender origin, geodetic coordinates (stored in the properties)) into (geocentric (ECEF-r) coordinates)

2. Calculate with longitude, latitude and altitude; matrix is the rotation part of the transformation

  1. Transform into with

Conversion of LTP into ECEF-r

Known: in Geodetic coordinates (→ in ECEF-r) and in LTP-coordinates

Goal: ( in ECEF-r coordinates)

Based on the transformation described above the transformation is calculated with the transposed matrix : [Psas]

Conversion of ECEF-r into Geodetic coordinates

The last transformation is from ECEF-r coordinates into Geodetic coordinates. This transformation is calculated with the Vermeille’s method [FoIz]. The result is the point in “GPS-coordinates” in radians.

Sources

“3.4 Vermeille’s Method(2002)” in “Comparative Analysis of the Performance of Iterative and Non-iterative Solutions to the Cartesian to Geodetic Coordinate Transformation”, Hok Sum Fok and H. Bâki Iz, http://www.lsgi.polyu.edu.hk/staff/zl.li/Vol_5_2/09-baki-3.pdf
“Conversion of Geodetic coordinates to the Local Tangent Plane”, Version 2.01, http://psas.pdx.edu/CoordinateSystem/Latitude_to_LocalTangent.pdf

Configuration parameters for GPS

No configurable parameter.

Available functional levels

Functional levels are predefined abstraction or realism levels for the sensor.

Services for GPS

  • get_properties() (blocking)

    Returns the properties of a component.

    • Return value

      a dictionary of the current component’s properties

  • get_local_data() (blocking)

    Returns the current data stored in the sensor.

    • Return value

      a dictionary of the current sensor’s data

  • set_property(prop_name, prop_val) (blocking)

    Modify one property on a component

    • Parameters

      • prop_name: the name of the property to modify (as shown the documentation)
      • prop_val: the new value of the property. Note that there is no checking about the type of the value so be careful
    • Return value

      nothing

  • get_configurations() (blocking)

    Returns the configurations of a component (parsed from the properties).

    • Return value

      a dictionary of the current component’s configurations

Examples

The following examples show how to use this component in a Builder script:

from morse.builder import *

# adds a default robot (the MORSE mascott!)
robot = Morsy()

# creates a new instance of the sensor
gps = GPS()

# place your component at the correct location
gps.translate(<x>, <y>, <z>)
gps.rotate(<rx>, <ry>, <rz>)

# select a specific abstraction level (cf below), or skip it to use default level
gps.level(<level>)

robot.append(gps)

# define one or several communication interface, like 'socket'
gps.add_interface(<interface>)

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.sensors.gps.)