Skip to main content

gnss-session.assist.enable(time, timeType, doForce, uncertainty)

Enable a Quectel cellular modem’s gpsOneXTRA assistance mode

Availability

Device
Only available on imps with cellular modems

Parameters

Name Type Description
time String The current UTC or GPS time
timeType Integer The type of time reference supplied in time
doForce Integer Force the GNSS sub-system to use the supplied time
uncertainty Integer Uncertainty in the time value in ms

Returns

Table — See below

Description

This method is used to enable a Quectel cellular modem’s gpsOneXTRA assistance function, which simplifies the application of GNSS assistance data. You will need to call assist.enable() after applying assist data using assist.load().

The time parameter takes the current UTC/GPS time in the following format: YYYY/MM/DD,hh:mm:ss, eg. 2020/08/03,15:34:50. The modem assumes you have supplied the UTC time; if you are providing GPS time, pass 0 as the optional timeType parameter.

If your hardware features a functional and initialised RTC, the time parameter is optional: if it is omitted, impOS™ will construct the time string from the current time as read from the RTC. However, if your hardware lacks this feature, or the RTC has not yet been initialized from the network, you must provide a suitably formatted string or an exception will be thrown.

The doForce and uncertainty parameters are optional. The first allows you to force the modem to accept the supplied time, the second lets you specify any uncertainty in the time value, provided in milliseconds. The default values for these parameters are determined by the modem firmware, not impOS. Please consult your modem’s documentation for details.

The method returns a table which will contain the key status. The value of status will be zero if no error occurred, or an error code (see gnss-session for details).