Developer World
Spresense SDK Library v1.4.2-3df2e9d
IOCTL commands
Collaboration diagram for IOCTL commands:

Macros

#define CXD56_GNSS_IOCTL_START   1
 
#define CXD56_GNSS_IOCTL_STOP   2
 
#define CXD56_GNSS_IOCTL_SELECT_SATELLITE_SYSTEM   3
 
#define CXD56_GNSS_IOCTL_GET_SATELLITE_SYSTEM   4
 
#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ELLIPSOIDAL   5
 
#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ORTHOGONAL   6
 
#define CXD56_GNSS_IOCTL_SET_OPE_MODE   7
 
#define CXD56_GNSS_IOCTL_GET_OPE_MODE   8
 
#define CXD56_GNSS_IOCTL_SET_TCXO_OFFSET   9
 
#define CXD56_GNSS_IOCTL_GET_TCXO_OFFSET   10
 
#define CXD56_GNSS_IOCTL_SET_TIME   11
 
#define CXD56_GNSS_IOCTL_GET_ALMANAC   12
 
#define CXD56_GNSS_IOCTL_SET_ALMANAC   13
 
#define CXD56_GNSS_IOCTL_GET_EPHEMERIS   14
 
#define CXD56_GNSS_IOCTL_SET_EPHEMERIS   15
 
#define CXD56_GNSS_IOCTL_SAVE_BACKUP_DATA   16
 
#define CXD56_GNSS_IOCTL_ERASE_BACKUP_DATA   17
 
#define CXD56_GNSS_IOCTL_OPEN_CEP_DATA   18
 
#define CXD56_GNSS_IOCTL_CLOSE_CEP_DATA   19
 
#define CXD56_GNSS_IOCTL_CHECK_CEP_DATA   20
 
#define CXD56_GNSS_IOCTL_GET_CEP_AGE   21
 
#define CXD56_GNSS_IOCTL_RESET_CEP_FLAG   22
 
#define CXD56_GNSS_IOCTL_RTK_START   23
 
#define CXD56_GNSS_IOCTL_RTK_STOP   24
 
#define CXD56_GNSS_IOCTL_RTK_SET_INTERVAL   25
 
#define CXD56_GNSS_IOCTL_RTK_GET_INTERVAL   26
 
#define CXD56_GNSS_IOCTL_RTK_SELECT_SATELLITE_SYSTEM   27
 
#define CXD56_GNSS_IOCTL_RTK_GET_SATELLITE_SYSTEM   28
 
#define CXD56_GNSS_IOCTL_RTK_SET_EPHEMERIS_ENABLER   29
 
#define CXD56_GNSS_IOCTL_RTK_GET_EPHEMERIS_ENABLER   30
 
#define CXD56_GNSS_IOCTL_AGPS_SET_ACQUIST   31
 
#define CXD56_GNSS_IOCTL_AGPS_SET_FRAMETIME   32
 
#define CXD56_GNSS_IOCTL_AGPS_SET_TAU_GPS   33
 
#define CXD56_GNSS_IOCTL_AGPS_SET_TIME_GPS   34
 
#define CXD56_GNSS_IOCTL_AGPS_CLEAR_RECEIVER_INFO   35
 
#define CXD56_GNSS_IOCTL_AGPS_SET_TOW_ASSIST   36
 
#define CXD56_GNSS_IOCTL_AGPS_SET_UTC_MODEL   37
 
#define CXD56_GNSS_IOCTL_SPECTRUM_CONTROL   38
 
#define CXD56_GNSS_IOCTL_FACTORY_START_TEST   39
 
#define CXD56_GNSS_IOCTL_FACTORY_STOP_TEST   40
 
#define CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT   41
 
#define CXD56_GNSS_IOCTL_SIGNAL_SET   42
 
#define CXD56_GNSS_IOCTL_PVTLOG_START   43
 
#define CXD56_GNSS_IOCTL_PVTLOG_STOP   44
 
#define CXD56_GNSS_IOCTL_PVTLOG_DELETE_LOG   45
 
#define CXD56_GNSS_IOCTL_PVTLOG_GET_STATUS   46
 
#define CXD56_GNSS_IOCTL_NAVMSG_START   47
 
#define CXD56_GNSS_IOCTL_SET_VAR_EPHEMERIS   48
 
#define CXD56_GNSS_IOCTL_GET_VAR_EPHEMERIS   49
 
#define CXD56_GNSS_IOCTL_INVAL   0
 
#define CXD56_GNSS_IOCTL_MAX   50
 

Detailed Description

Description of GNSS IOCTL commands.

Macro Definition Documentation

◆ CXD56_GNSS_IOCTL_START

#define CXD56_GNSS_IOCTL_START   1

Start the positioning.
This command is used to start the positioning.

Parameters
argStart mode value of uint32_t. Not address pointer.
One of CXD56_GNSS_STMOD_COLD, CXD56_GNSS_STMOD_WARM, CXD56_GNSS_STMOD_HOT

◆ CXD56_GNSS_IOCTL_STOP

#define CXD56_GNSS_IOCTL_STOP   2

Stop the positioning.
This command is used to stop the positioning. GNSS will transition to idle mode.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_SELECT_SATELLITE_SYSTEM

#define CXD56_GNSS_IOCTL_SELECT_SATELLITE_SYSTEM   3

Select the satellite systems.
This command is used to select the satellite systems to be used for positioning. The satellite system is defined as a bit, and you can select mutiple sattelites using OR value. Do not specify zero, please select at least one system. This command must be issued in idle mode.

Parameters
[in]argSatellite system bitmap value of uint32_t. Not address pointer.
Bit OR of CXD56_GNSS_SAT_GPS, CXD56_GNSS_SAT_GLONASS, CXD56_GNSS_SAT_SBAS, CXD56_GNSS_SAT_QZ_L1CA, CXD56_GNSS_SAT_QZ_L1S.

◆ CXD56_GNSS_IOCTL_GET_SATELLITE_SYSTEM

#define CXD56_GNSS_IOCTL_GET_SATELLITE_SYSTEM   4

Get satellite system to be used for measurement GNSS.
The satellite system setting of the subscriber that a SF_COMMAND_COMMON_START command was published is acquired.

Parameters
[out]argAddress pinting to of uint32_t object.
Bit OR of CXD56_GNSS_SAT_GPS, CXD56_GNSS_SAT_GLONASS, CXD56_GNSS_SAT_SBAS, CXD56_GNSS_SAT_QZ_L1CA, CXD56_GNSS_SAT_QZ_L1S.

◆ CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ELLIPSOIDAL

#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ELLIPSOIDAL   5

Set the receiver approximate position.
The receiver position is set using ellipsoidal coordinates (latitude, longitude, altitude). If ellipsoidal coordinates setting, north latitude and east longitude direction as positive.
When specifying south latitude or west longitude, set it to a negative value.
The receiver position, current time and TCXO offset value, ephemeris data are required in order to initiate a hot start so the position must have been set to GNSS using this command prior to hot start. Set GNSS configure with this command before hot start if receiver position is not stored in the memory. This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_ellipsoidal_position_s object.

◆ CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ORTHOGONAL

#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ORTHOGONAL   6

Set the receiver approximate position.
The receiver position is set using orthogonal coordinates (x, y, z).
The receiver position, current time and TCXO offset value, ephemeris data are required in order to initiate a hot start. Set the position with this command before hot start if no position information in GNSS. This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_orthogonal_position_s object.

◆ CXD56_GNSS_IOCTL_SET_OPE_MODE

#define CXD56_GNSS_IOCTL_SET_OPE_MODE   7

Set receiver operation mode.
Can set operation mode and measurement cycle.
The cycle data is 1000msec aligned only and cannot set 0msec.

Parameters
[in]argAddress pointing to struct cxd56_gnss_ope_mode_param_s object.

◆ CXD56_GNSS_IOCTL_GET_OPE_MODE

#define CXD56_GNSS_IOCTL_GET_OPE_MODE   8

Get receiver operation mode.

Parameters
[out]argAddress pointing to struct cxd56_gnss_ope_mode_param_s object.

◆ CXD56_GNSS_IOCTL_SET_TCXO_OFFSET

#define CXD56_GNSS_IOCTL_SET_TCXO_OFFSET   9

Set receiver TCXO offset value to GNSS.
Receiver TCXO offset value set in "Hz". It can specify positive direction or negative direction by a sign int the argument.
The receiver position, current time and TCXO offset value, ephemeris data are required in order to initiate a hot start. Set the offset with this command before hot start if no offset information in GNSS. This command must be issued in idle mode.

Parameters
[in]argTCXO offset value of uint32_t. Not address pointer.
Address pointing to a offset value(int32_t) object.

◆ CXD56_GNSS_IOCTL_GET_TCXO_OFFSET

#define CXD56_GNSS_IOCTL_GET_TCXO_OFFSET   10

Get receiver TCXO offset value.

Parameters
[out]argAddress pointing to int32_t object.

◆ CXD56_GNSS_IOCTL_SET_TIME

#define CXD56_GNSS_IOCTL_SET_TIME   11

Set receiver time to GNSS. The UTC time standard is used for the receiver time stored in a argument of cxd56_gnss_datetime type. The receiver position, current time and TCXO offset value, ephemeris data are required in order to initiate a hot start. Set the time with this command before hot start if GPS time is not counted in RTC. This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_datetime_s object.

◆ CXD56_GNSS_IOCTL_GET_ALMANAC

#define CXD56_GNSS_IOCTL_GET_ALMANAC   12

Get the latest almanac data extracted from the satellite signal.
Almanac data size is 2048(GPS) or 576(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[out]argAddress pointing to struct cxd56_gnss_orbital_param_s object.

◆ CXD56_GNSS_IOCTL_SET_ALMANAC

#define CXD56_GNSS_IOCTL_SET_ALMANAC   13

Set almanac data.
Almanac data size is 2048(GPS) or 576(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_orbital_param_s object.

◆ CXD56_GNSS_IOCTL_GET_EPHEMERIS

#define CXD56_GNSS_IOCTL_GET_EPHEMERIS   14

Get the latest ephemeris data extracted from the satellite signal.
Ephemeris data size is 3072(GPS) or 1152(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[out]argAddress pointing to struct cxd56_gnss_orbital_param_s object.

◆ CXD56_GNSS_IOCTL_SET_EPHEMERIS

#define CXD56_GNSS_IOCTL_SET_EPHEMERIS   15

Set ephemeris data.
Ephemeris data size is 3072(GPS) or 1152(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_orbital_param_s object.

◆ CXD56_GNSS_IOCTL_SAVE_BACKUP_DATA

#define CXD56_GNSS_IOCTL_SAVE_BACKUP_DATA   16

This command is used to save the backup data. The backup data contents are saved in the flash memory.
The backup data saved in the flash memory is automatically restored at boot-up of GNSS. The receiver position, ephemeris, almanac, TCXO offset and other information required for hot start are included in the backup data. By saving it with this command, you can restore the information necessary for starting except time at boot time. This command must be issued in idle mode.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_ERASE_BACKUP_DATA

#define CXD56_GNSS_IOCTL_ERASE_BACKUP_DATA   17

Erase backup data on flash memory.
This command must be issued in idle mode.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_OPEN_CEP_DATA

#define CXD56_GNSS_IOCTL_OPEN_CEP_DATA   18

Open CEP data file for GNSS device.
Open the CEP data file and make the data available from the device.
The file name to be opened is specified by Kconfig.
This command must be issued in idle mode, between calling open function for GNSS device and issuing the command CXD56_GNSS_IOCTL_START.

Parameters
[in]argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_CLOSE_CEP_DATA

#define CXD56_GNSS_IOCTL_CLOSE_CEP_DATA   19

Close the CEP data file opened with the command CXD56_GNSS_IOCTL_OPEN_CEP_DATA.
This command must be issued in idle mode.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_CHECK_CEP_DATA

#define CXD56_GNSS_IOCTL_CHECK_CEP_DATA   20

Check the validity of the CEP assist data.
Return error code if the data file dose not exist or data is invalid.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_GET_CEP_AGE

#define CXD56_GNSS_IOCTL_GET_CEP_AGE   21

Get age(lifetime) information of assist data. Age includes start date and time represented by the Julian date(MJD), and validity period. Conversion MJD to YMD is following formula. (Assist data start time must 0:00 (GPS time))
If the data file dose not exist, an error will be returned.

JD12 = floor(MJD + 2400001)
e = floor((JD12 - 1867216.25) / 36524.25)
f = JD12 + (e - floor(e / 4) + 1)
g = f + 1524
h = floor((g - 122.1) / 365.25)
i = floor(365.25 * h)
j = floor((g - i) / 30.6001)

d = g - i - floor(30.6001 * j)
m = j - 12 * floor(j / 14) - 1
w = h - 4716 + floor((14 - m) / 12)

if w > 0 then y = w else y = w - 1

Parameters
[in]argAddress pointing to struct cxd56_gnss_cep_age_s object.

◆ CXD56_GNSS_IOCTL_RESET_CEP_FLAG

#define CXD56_GNSS_IOCTL_RESET_CEP_FLAG   22

Reset CEP assist data init flag & valid flag.
This command for notifying that the data has been updated.
Execute this command before measurement if assist data updated.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_RTK_START

#define CXD56_GNSS_IOCTL_RTK_START   23

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_STOP

#define CXD56_GNSS_IOCTL_RTK_STOP   24

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_SET_INTERVAL

#define CXD56_GNSS_IOCTL_RTK_SET_INTERVAL   25

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_GET_INTERVAL

#define CXD56_GNSS_IOCTL_RTK_GET_INTERVAL   26

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_SELECT_SATELLITE_SYSTEM

#define CXD56_GNSS_IOCTL_RTK_SELECT_SATELLITE_SYSTEM   27

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_GET_SATELLITE_SYSTEM

#define CXD56_GNSS_IOCTL_RTK_GET_SATELLITE_SYSTEM   28

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_SET_EPHEMERIS_ENABLER

#define CXD56_GNSS_IOCTL_RTK_SET_EPHEMERIS_ENABLER   29

Currently version not supported.

◆ CXD56_GNSS_IOCTL_RTK_GET_EPHEMERIS_ENABLER

#define CXD56_GNSS_IOCTL_RTK_GET_EPHEMERIS_ENABLER   30

Currently version not supported.

◆ CXD56_GNSS_IOCTL_AGPS_SET_ACQUIST

#define CXD56_GNSS_IOCTL_AGPS_SET_ACQUIST   31

Set acquist data.

Parameters
[in]argAddress pointing to struct cxd56_gnss_agps_acquist_s object.

◆ CXD56_GNSS_IOCTL_AGPS_SET_FRAMETIME

#define CXD56_GNSS_IOCTL_AGPS_SET_FRAMETIME   32

Set frame time.

Parameters
[in]argAddress pointing to struct cxd56_gnss_agps_frametime_s object.

◆ CXD56_GNSS_IOCTL_AGPS_SET_TAU_GPS

#define CXD56_GNSS_IOCTL_AGPS_SET_TAU_GPS   33

Set tau_GPS(τGPS: Differnece of system time between GPS and Glonass system).

Parameters
[in]argAddress pointing to tau GPS value(τGPS, double) object.

◆ CXD56_GNSS_IOCTL_AGPS_SET_TIME_GPS

#define CXD56_GNSS_IOCTL_AGPS_SET_TIME_GPS   34

Set high precision receiver time.

Parameters
argAddress pointing to struct cxd56_gnss_agps_time_gps_s object.

◆ CXD56_GNSS_IOCTL_AGPS_CLEAR_RECEIVER_INFO

#define CXD56_GNSS_IOCTL_AGPS_CLEAR_RECEIVER_INFO   35

◆ CXD56_GNSS_IOCTL_AGPS_SET_TOW_ASSIST

#define CXD56_GNSS_IOCTL_AGPS_SET_TOW_ASSIST   36

Set acquist data.

Parameters
[in]argAddress pointing to struct cxd56_gnss_agps_tow_assist_s object.

◆ CXD56_GNSS_IOCTL_AGPS_SET_UTC_MODEL

#define CXD56_GNSS_IOCTL_AGPS_SET_UTC_MODEL   37

Set acquist data.

Parameters
[in]argAddress pointing to struct cxd56_gnss_agps_utc_model_s object.

◆ CXD56_GNSS_IOCTL_SPECTRUM_CONTROL

#define CXD56_GNSS_IOCTL_SPECTRUM_CONTROL   38

Enable or not to output spectrum data of GNSS signal.

Parameters
argAddress pointing to struct cxd56_gnss_spectrum_control_s object.

◆ CXD56_GNSS_IOCTL_FACTORY_START_TEST

#define CXD56_GNSS_IOCTL_FACTORY_START_TEST   39

Start GPS factory test.
Test results can get by CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT command after execute this command and waiting 1 second.
This command execute during measurement stop. After executing this command, it is not accepted except for CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT and CXD56_GNSS_IOCTL_FACTORY_STOP_TEST.

Parameters
[in]argAddress pointing to struct cxd56_gnss_test_info_s object.

◆ CXD56_GNSS_IOCTL_FACTORY_STOP_TEST

#define CXD56_GNSS_IOCTL_FACTORY_STOP_TEST   40

Stop GPS factory test.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT

#define CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT   41

Get GPS factory test result.

Parameters
[out]argAddress pointing to struct cxd56_gnss_test_result_s object.

◆ CXD56_GNSS_IOCTL_SIGNAL_SET

#define CXD56_GNSS_IOCTL_SIGNAL_SET   42

Set signal information for GNSS events from GNSS device driver.
The field 'enable' of struct cxd56_gnss_signal_setting_s to be given as a parameter must be specified as 1 when setting and 0 when unsetting.

Parameters
[out]argAddress pointing to struct cxd56_gnss_signal_setting_s object.

◆ CXD56_GNSS_IOCTL_PVTLOG_START

#define CXD56_GNSS_IOCTL_PVTLOG_START   43

Start PVTLOG .
Automatically saves the PVT log in the GNSS core.

Parameters
argAddress pointing to cxd56_pvtlog_setting_s object.

◆ CXD56_GNSS_IOCTL_PVTLOG_STOP

#define CXD56_GNSS_IOCTL_PVTLOG_STOP   44

Stop PVTLOG.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_PVTLOG_DELETE_LOG

#define CXD56_GNSS_IOCTL_PVTLOG_DELETE_LOG   45

Delete PVTlog data.
Delete the log data saved in the GNSS core.

Parameters
argParameter is Unnecessary. Set Zero.

◆ CXD56_GNSS_IOCTL_PVTLOG_GET_STATUS

#define CXD56_GNSS_IOCTL_PVTLOG_GET_STATUS   46

Get PVTLOG status.
This command is for getting the log stored status. The status data include stored log data count and logging time.

Parameters
argAddress pointing to cxd56_pvtlog_status_s.

◆ CXD56_GNSS_IOCTL_NAVMSG_START

#define CXD56_GNSS_IOCTL_NAVMSG_START   47

Currently version not supported.

◆ CXD56_GNSS_IOCTL_SET_VAR_EPHEMERIS

#define CXD56_GNSS_IOCTL_SET_VAR_EPHEMERIS   48

Set ephemeris data.
Only satellites with data are output.
Ephemeris data size is variable.
Ephemeris data max size is 3072(GPS) or 1152(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[in]argAddress pointing to struct cxd56_gnss_set_var_ephemeris_s object.

◆ CXD56_GNSS_IOCTL_GET_VAR_EPHEMERIS

#define CXD56_GNSS_IOCTL_GET_VAR_EPHEMERIS   49

Get the latest ephemeris data extracted from the satellite signal.
Only satellites with data are output.
Ephemeris data size is variable.
Ephemeris data max size is 3072(GPS) or 1152(GLONASS) bytes.
This command must be issued in idle mode.

Parameters
[out]argAddress pointing to struct cxd56_gnss_get_var_ephemeris_s object.