Developer World
Spresense SDK Library v3.3.0-375c679
gnss.h
Go to the documentation of this file.
1/****************************************************************************
2 * arch/arm/include/cxd56xx/gnss.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
24#ifndef __ARCH_ARM_INCLUDE_CXD56XX_GNSS_H
25#define __ARCH_ARM_INCLUDE_CXD56XX_GNSS_H
26
27#ifdef __cplusplus
28#define EXTERN extern "C"
29extern "C"
30{
31#else
32#define EXTERN extern
33#endif
34
35/****************************************************************************
36 * Included Files
37 ****************************************************************************/
38
39#include <arch/chip/gnss_type.h>
40
61#define CXD56_GNSS_IOCTL_START 1
62
72#define CXD56_GNSS_IOCTL_STOP 2
73
89#define CXD56_GNSS_IOCTL_SELECT_SATELLITE_SYSTEM 3
90
102#define CXD56_GNSS_IOCTL_GET_SATELLITE_SYSTEM 4
103
125#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ELLIPSOIDAL 5
126
140#define CXD56_GNSS_IOCTL_SET_RECEIVER_POSITION_ORTHOGONAL 6
141
151#define CXD56_GNSS_IOCTL_SET_OPE_MODE 7
152
160#define CXD56_GNSS_IOCTL_GET_OPE_MODE 8
161
177#define CXD56_GNSS_IOCTL_SET_TCXO_OFFSET 9
178
186#define CXD56_GNSS_IOCTL_GET_TCXO_OFFSET 10
187
202#define CXD56_GNSS_IOCTL_SET_TIME 11
203
213#define CXD56_GNSS_IOCTL_GET_ALMANAC 12
214
224#define CXD56_GNSS_IOCTL_SET_ALMANAC 13
225
235#define CXD56_GNSS_IOCTL_GET_EPHEMERIS 14
236
246#define CXD56_GNSS_IOCTL_SET_EPHEMERIS 15
247
264#define CXD56_GNSS_IOCTL_SAVE_BACKUP_DATA 16
265
274#define CXD56_GNSS_IOCTL_ERASE_BACKUP_DATA 17
275
288#define CXD56_GNSS_IOCTL_OPEN_CEP_DATA 18
289
299#define CXD56_GNSS_IOCTL_CLOSE_CEP_DATA 19
300
309#define CXD56_GNSS_IOCTL_CHECK_CEP_DATA 20
310
337#define CXD56_GNSS_IOCTL_GET_CEP_AGE 21
338
348#define CXD56_GNSS_IOCTL_RESET_CEP_FLAG 22
349
354#define CXD56_GNSS_IOCTL_RTK_START 23
355
360#define CXD56_GNSS_IOCTL_RTK_STOP 24
361
366#define CXD56_GNSS_IOCTL_RTK_SET_INTERVAL 25
367
372#define CXD56_GNSS_IOCTL_RTK_GET_INTERVAL 26
373
378#define CXD56_GNSS_IOCTL_RTK_SELECT_SATELLITE_SYSTEM 27
379
384#define CXD56_GNSS_IOCTL_RTK_GET_SATELLITE_SYSTEM 28
385
390#define CXD56_GNSS_IOCTL_RTK_SET_EPHEMERIS_ENABLER 29
391
396#define CXD56_GNSS_IOCTL_RTK_GET_EPHEMERIS_ENABLER 30
397
405#define CXD56_GNSS_IOCTL_AGPS_SET_ACQUIST 31
406
414#define CXD56_GNSS_IOCTL_AGPS_SET_FRAMETIME 32
415
424#define CXD56_GNSS_IOCTL_AGPS_SET_TAU_GPS 33
425
433#define CXD56_GNSS_IOCTL_AGPS_SET_TIME_GPS 34
434
443#define CXD56_GNSS_IOCTL_AGPS_CLEAR_RECEIVER_INFO 35
444
452#define CXD56_GNSS_IOCTL_AGPS_SET_TOW_ASSIST 36
453
461#define CXD56_GNSS_IOCTL_AGPS_SET_UTC_MODEL 37
462
470#define CXD56_GNSS_IOCTL_SPECTRUM_CONTROL 38
471
485#define CXD56_GNSS_IOCTL_FACTORY_START_TEST 39
486
494#define CXD56_GNSS_IOCTL_FACTORY_STOP_TEST 40
495
503#define CXD56_GNSS_IOCTL_FACTORY_GET_TEST_RESULT 41
504
513#define CXD56_GNSS_IOCTL_SIGNAL_SET 42
514
523#define CXD56_GNSS_IOCTL_PVTLOG_START 43
524
531#define CXD56_GNSS_IOCTL_PVTLOG_STOP 44
532
540#define CXD56_GNSS_IOCTL_PVTLOG_DELETE_LOG 45
541
551#define CXD56_GNSS_IOCTL_PVTLOG_GET_STATUS 46
552
557#define CXD56_GNSS_IOCTL_NAVMSG_START 47
558
570#define CXD56_GNSS_IOCTL_SET_VAR_EPHEMERIS 48
571
583#define CXD56_GNSS_IOCTL_GET_VAR_EPHEMERIS 49
584
593#define CXD56_GNSS_IOCTL_SET_USECASE 50
594
602#define CXD56_GNSS_IOCTL_GET_USECASE 51
603
612#define CXD56_GNSS_IOCTL_SET_1PPS_OUTPUT 52
613
621#define CXD56_GNSS_IOCTL_GET_1PPS_OUTPUT 53
622
630#define CXD56_GNSS_IOCTL_GET_VERSION 54
631
639#define CXD56_GNSS_IOCTL_SLEEP 55
640
648#define CXD56_GNSS_IOCTL_WAKEUP 56
649
657#define CXD56_GNSS_IOCTL_RESET 57
658
659/* check macros for GNSS commands */
660
661#define CXD56_GNSS_IOCTL_INVAL 0
662#define CXD56_GNSS_IOCTL_MAX 58
663
664/* @} gnss_ioctl */
665
674/* Same value to GD Start mode CXD56_GNSS_STMOD_XXXX for fw_gd_start */
675/* @{ */
676
677#define CXD56_GNSS_STMOD_COLD 0
678#define CXD56_GNSS_STMOD_WARM 1
679#define CXD56_GNSS_STMOD_WARM_ACC2 2
680#define CXD56_GNSS_STMOD_HOT 3
681#define CXD56_GNSS_STMOD_HOT_ACC 4
682#define CXD56_GNSS_STMOD_HOT_ACC2 5
683#define CXD56_GNSS_STMOD_HOT_ACC3 6
684#define CXD56_GNSS_STMOD_GSPQ CXD56_GNSS_STMOD_HOT_ACC3
685/* @} */
686
691/* @{ */
692
693#define CXD56_GNSS_GPS_ALMANAC_SIZE 2048
695#define CXD56_GNSS_GPS_EPHEMERIS_SIZE 3072
697#define CXD56_GNSS_GLONASS_ALMANAC_SIZE 576
699#define CXD56_GNSS_GLONASS_EPHEMERIS_SIZE 1152
701#define CXD56_GNSS_QZSSL1CA_ALMANAC_SIZE 640
703#define CXD56_GNSS_QZSSL1CA_EPHEMERIS_SIZE 960
704/* @} */
705
706/*
707 * @name PVTLOG notify threshold of the stored data.
708*/
709/* @{ */
710
711#define CXD56_GNSS_PVTLOG_THRESHOLD_FULL 0
712#define CXD56_GNSS_PVTLOG_THRESHOLD_HALF 1
713#define CXD56_GNSS_PVTLOG_THRESHOLD_ONE_DATA 2
715/* @} */
716
721/* @{ */
724#define CXD56_GNSS_READ_OFFSET_LAST_GNSS 0x0000
725
728#define CXD56_GNSS_READ_OFFSET_GNSS(N) (0x1000 + 0x800 * (N))
729
732#define CXD56_GNSS_READ_OFFSET_AGPS 0x5000
733
736#define CXD56_GNSS_READ_OFFSET_RTK 0x6000
737
740#define CXD56_GNSS_READ_OFFSET_GPSEPHEMERIS 0x7000
741
744#define CXD56_GNSS_READ_OFFSET_GLNEPHEMERIS 0x8000
745
748#define CXD56_GNSS_READ_OFFSET_SBAS 0x9000
749
752#define CXD56_GNSS_READ_OFFSET_DCREPORT 0x9800
753
756#define CXD56_GNSS_READ_OFFSET_SARRLM 0x9900
757
760#define CXD56_GNSS_READ_OFFSET_SPECTRUM 0xa000
761
764#define CXD56_GNSS_READ_OFFSET_INFO 0xf000
765
768#define CXD56_GNSS_READ_OFFSET_PVTLOG 0x10000
769
770/* @} */
771
776/* @{ */
779#define CXD56_GNSS_SIG_GNSS 0
780
783#define CXD56_GNSS_SIG_PVTLOG 2
784
787#define CXD56_GNSS_SIG_AGPS 3
788
791#define CXD56_GNSS_SIG_RTK 4
792
795#define CXD56_GNSS_SIG_SPECTRUM 5
796
799#define CXD56_GNSS_SIG_GPSEPHEMERIS 11
800
803#define CXD56_GNSS_SIG_GLNEPHEMERIS 12
804
807#define CXD56_GNSS_SIG_SBAS 14
808
811#define CXD56_GNSS_SIG_DCREPORT 15
812
815#define CXD56_GNSS_SIG_SARRLM 16
816
817/* @} */
818
819/* @} gnss_defs */
820
821/****************************************************************************
822 * Public Types
823 ****************************************************************************/
834{
840 uint32_t mode;
841
847 uint32_t cycle;
848};
849
855{
856 uint32_t type;
859 uint32_t *data;
860};
861
867{
870};
871
877{
878 double latitude;
879 double longitude;
880 double altitude;
881};
882
888{
889 int32_t x;
890 int32_t y;
891 int32_t z;
892};
893
899{
900 uint32_t *data;
901 uint32_t size;
902 uint32_t counter;
903};
904
910{
911 float age;
912 float cepi;
913};
914
920{
921 uint8_t *data;
922 uint16_t size;
923};
924
930{
931 uint8_t *data;
932 uint16_t size;
933};
934
940{
941 uint8_t *data;
942 uint16_t size;
943};
944
950{
951 uint16_t sec;
952 uint32_t frac;
953};
954
960{
963};
964
970{
971 double taugps;
972};
973
979{
980 uint8_t enable;
981 uint32_t time;
982 uint8_t point1;
983 uint8_t point2;
984 uint8_t step1;
985 uint8_t step2;
986};
987
993{
994 uint32_t satellite;
995 uint32_t reserve1;
996 uint32_t reserve2;
997 uint32_t reserve3;
998};
999
1005{
1006 float cn;
1007 float doppler;
1008};
1009
1021{
1022 int fd;
1023 uint8_t enable;
1024 uint8_t gnsssig;
1025 int signo;
1026 void *data;
1027};
1028
1034{
1035 int fd;
1036 uint8_t gnsssig;
1037 int signo;
1038 void *data;
1039};
1040
1052{
1053 uint32_t cycle;
1054 uint32_t threshold;
1055};
1056
1062{
1064};
1065
1071{
1073 uint32_t gnss;
1075 uint64_t sbasout;
1076};
1077
1083{
1084 uint32_t *data;
1085 uint32_t size;
1086};
1087
1093{
1094 uint32_t type;
1095 uint32_t *data;
1096 uint32_t size;
1097};
1098
1099/* @} gnss_datatypes */
1100
1101/* @} gnss */
1102
1103#undef EXTERN
1104#ifdef __cplusplus
1105}
1106#endif
1107
1108#endif /* __ARCH_ARM_INCLUDE_CXD56XX_GNSS_H */
uint8_t step1
Definition: gnss.h:984
uint32_t satellite
Definition: gnss.h:994
double altitude
Definition: gnss.h:880
float cn
Definition: gnss.h:1006
uint8_t enable
Definition: gnss.h:980
uint32_t gnss
Definition: gnss.h:1073
uint8_t gnsssig
Definition: gnss.h:1024
uint32_t reserve2
Definition: gnss.h:996
uint32_t cycle
Definition: gnss.h:847
uint16_t sec
Definition: gnss.h:951
uint32_t reserve3
Definition: gnss.h:997
float age
Definition: gnss.h:911
int signo
Definition: gnss.h:1025
uint32_t mode
Definition: gnss.h:840
int fd
Definition: gnss.h:1022
void * data
Definition: gnss.h:1026
double latitude
Definition: gnss.h:878
float cepi
Definition: gnss.h:912
float doppler
Definition: gnss.h:1007
struct cxd56_gnss_date_s date
Definition: gnss.h:868
uint32_t * data
Definition: gnss.h:859
uint32_t frac
Definition: gnss.h:952
uint32_t threshold
Definition: gnss.h:1054
uint16_t size
Definition: gnss.h:922
uint8_t point2
Definition: gnss.h:983
uint64_t sbasout
Definition: gnss.h:1075
uint32_t size
Definition: gnss.h:1085
int ephout
Definition: gnss.h:1074
uint8_t * data
Definition: gnss.h:921
double longitude
Definition: gnss.h:879
int32_t z
Definition: gnss.h:891
uint8_t point1
Definition: gnss.h:982
struct cxd56_gnss_status_s status
Definition: gnss.h:1063
uint32_t type
Definition: gnss.h:856
int interval
Definition: gnss.h:1072
uint8_t step2
Definition: gnss.h:985
uint32_t time
Definition: gnss.h:981
double taugps
Definition: gnss.h:971
uint32_t reserve1
Definition: gnss.h:995
int32_t y
Definition: gnss.h:890
int32_t x
Definition: gnss.h:889
struct cxd56_gnss_time_s time
Definition: gnss.h:869
acquist data and size for AGPS
Definition: gnss.h:920
Time from frame start[sec].
Definition: gnss.h:950
different time between AGPS and GLONASS Time
Definition: gnss.h:970
High precision receiver time.
Definition: gnss.h:960
tow assist data and size for AGPS
Definition: gnss.h:930
utc model data and size for AGPS
Definition: gnss.h:940
CEP age info.
Definition: gnss.h:910
Definition: gnss.h:899
Definition: gnss_type.h:355
date and time
Definition: gnss.h:867
ellipsoidal position
Definition: gnss.h:877
Sattelite ephemeris data.
Definition: gnss.h:1093
GNSS operation mode and cycle.
Definition: gnss.h:834
Sattelite almanac, ephemeris data.
Definition: gnss.h:855
ellipsoidal position
Definition: gnss.h:888
Sattelite ephemeris data.
Definition: gnss.h:1083
Information for use after being signaled to read data asychronously.
Definition: gnss.h:1034
signal setting for reading data asychronously The field 'enable' of struct cxd56_gnss_signal_setting_...
Definition: gnss.h:1021
Signal spectrum output control parameter.
Definition: gnss.h:979
Definition: gnss_type.h:1211
Factory test info.
Definition: gnss.h:993
Factory test result.
Definition: gnss.h:1005
Definition: gnss_type.h:365
PVTLOG setting Parameter. If the log interval(cycle) is smaller than the positioning interval,...
Definition: gnss.h:1052
Stored logs status of PVTLOG.
Definition: gnss.h:1062
RTK output setting.
Definition: gnss.h:1071