www.beck-ipc.com

GMLib - GPS


GPS

Functions for GPS support

  • gmSetGPSAntennaMode
  • gmGetGPSLocation
  • gmGetTelitIotLocation


  • int gmSetGPSAntennaMode(int mode, int voltage)

    This function sets the GPS antenna power supply mode and voltage value at the GM02 module. Other modules do not implement this command and will always return GM_EXIT_FAILURE.

    Parameters

    mode

    GPS Antenna Mode:
        0 - Power Off
        1 - Power On

    voltage

    GPS Antenna Voltage:
        see gmGpsVoltage

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmGetGPSLocation(long timeout, int * day, int * month, int * year, int * hours, int * minutes, int * seconds, char * positionStr, int * altitude, int * velocityStr, int * heading, int * satInfo, char * dopStr, int * fixType)

    This function gets the current GPS location data from the GM02/GM06 module. Other modules do not implement this command and will always return GM_EXIT_FAILURE.

    Parameters

    timeout

    Input parameter: Timeout to wait for GPS data in ms.

    day

    Output parameter: Date: Day

    month

    Output parameter: Date: Month

    year

    Output parameter: Date: Year

    hours

    Output parameter: Time: Hours

    minutes

    Output parameter: Time: Minutes

    seconds

    Output parameter: Time: Seconds

    positionStr

    Output parameter: Actual position (Latitude, Longitude).
    String buffer must have at least a size of 40 characters.

    altitude

    Output parameter: Actual altitude

    velocityStr

    Output parameter: Actual velocity (GM02: in 0.25 m/s, GM06 in km/h)
    String buffer must have at least a size of 10 characters.

    heading

    Output parameter: Actual heading (0..3599)

    satInfo

    Output parameter: Number of visible satellites 0..12

    dopStr

    Output parameter: Receiver status: Position DOP - poor quality (DOP>8)
    String buffer must have at least a size of 10 characters.

    fixType

    Output parameter: Receiver status: Fix Type: 0 - No Fix, 1 - 2D Fix, 2 - 3D Fix

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmGetTelitIotLocation(long timeout, const char * gprsConnect, char * positionStr, int * altitude, unsigned int * uncertainty)

    This function uses the Telit IoTLOCATE service to get a position estimation made through cellular base station triangulation. In this process Cell data ID information is uploaded to a Telit internet server, which returns the estimated position.

    NOTE: Telit offers two different grades of service. Basic (free of charge) and Premium. With the Basic service the customer is only allowed to send a maximum of 1000 position queries per month. Failure to comply with such maximum number of requests may cause suspension or termination of the service. For more details about the Telit IotLOCATE service see here.

    This API function is only supported on some modem modules (like GM05, GM06 and GMLGA01). Other modules do not implement this command and will always return GM_EXIT_FAILURE.

    Parameters

    timeout

    Input parameter: Timeout to wait for GPS data in ms. Valid values must be in range 1000 - 65535000.

    gprsConnect

    Input parameter: gprs connection string (e.g. AT+CGDCONT=2,"IP","volume.d2gprs.de")
    Please note that it is mandatory to specify the PDP context 2 here (AT+CGDCONT=2 ).

    positionStr

    Output parameter: Actual position (Latitude, Longitude).
    String buffer must have at least a size of 40 characters.

    altitude

    Output parameter: Actual altitude

    uncertainty

    Output parameter: Horizontal uncertainty, radius in meters

    Return Value

    Return values are described here: Return values


    Top
    Index page


    End of document