gnss
Message
Clear
Clears the gnss rx buffer
gnss.clear_msg()
Configure
Configure what messages the gnss engine should be sending.
gnss.configure_msg(pass_flags)
Input Parameters:
pass_flags[int] = msg config
GNSS_RX_PASS_NONE = No Flag, hence send no message
GNSS_RX_PASS_FLG_MSG_PEND = Set if a message is in the buffer
GNSS_RX_PASS_CFG_NO_EPOCH = Set if all non-epoch messages should be passed
GNSS_RX_PASS_CFG_ACK_ONLY = Set if only acknowledge messages should be passed
GNSS_RX_PASS_FLG_MASK = Status flags bit mask
GNSS_RX_PASS_CFG_MASK = Configuration bit mask
Read
Reads in the most recent message from the GNSS engine.
gnss.read_msg(buf)
Input Parameters:
buf[buffer] = buffer to store the data in
Read msg length
Reads in the length of the GNSS engine message.
gnss.read_msglen()
Returns the length of the message.
Get engine information
This function is used to get the GNSS engine info.
gnss.get_engine_info()
This returns a dictionary of the following:
Extension 6 = SBAS;IMES;QZSS
Software Version = EXT CORE 3.01 (16559b)
Hardware Version = 00080000
Extension 0 = ROM BASE 2.01 (75331)
Extension 1 = FWVER=ADR 4.00
Extension 2 = PROTVER=19.00
Extension 3 = MOD=NEO-M8L-0
Extension 4 = FIS=0xEF4015 (100111)
Extension 5 = GPS;GLO;GAL;BDS
The most important parts of these are the software and hardware versions and the Extension 3 as this tells you what version of the GNSS engine you are using.
hw_reset
Used to reset the GNSS engine pins.
gnss.hw_reset(state)
Input Parameters:
state[bool] = When 1 it will hold the GNSS Engine in reset. Then it needs to be taken out of this by setting it again to 0.
init_abort
Tries to abort the GNSS task’s initial engine initialisation.
gnss.init_abort()
If called during engine initialisation sets a request to abort, otherwise puts the engine into reset immediately.
Note there’s a small possibility of the engine initialisation failing after this method has checked the initialisation state. It is therefore recommended that after calling this method the application waits for the status to become less than 0 by checking gnss.init_status() and then using gnss.hw_reset(True) to make sure the engine is inactive.
init_status
This function returns the status of the GNSS engine.
gnss.init_status()
verbose
Sets the level of diagnostic output produced by the GNSS module, or returns the current level if no value is passed.
gnss.verbose(level)
Input Parameters:
level[int] = The verbosity level to set. If no value is passed, the current level is returned instead. It is one of the following constants:
gnss.VERBOSE_NONE = No diagnostic output.
gnss.VERBOSE_RESPONSE = Log command responses.
gnss.VERBOSE_CALLBACK = Log callback activity.
gnss.VERBOSE_ACCEPTED = Log accepted messages.
gnss.VERBOSE_ALL = Log all diagnostic output.
Legacy functions: deprecated
gnss.get_extra_msg()
gnss.sample()
gnss.new_sample()
gnss.lat()
gnss.lng()
gnss.new_data_callback()
gnss.init_abort()