SUPL(安全用户面定位)

1. android supl

#openssl
wget http://ftp.openssl.org/source/old/1.0.0/openssl-1.0.0.tar.gz
tar -xzvf openssl-1.0.0.tar.gz
cd openssl-1.0.0
./config --prefix=/home/dong/supl/_install
make && make install

#supl
wget http://www.tajuma.com/download/supl_1.0.6.tar.gz
tar xvf supl_1.0.6.tar.gz
cd trunk
./configure --prefix=/home/dong/supl/_install --precompiled-asn1

vi trunk/src/Makefile, add -lcrypto
supl-client: libsupl.so supl-client.o
    $(CC) -o $@ supl-client.o -L. -lsupl -lssl -lm -lcrypto

supl-proxy: libsupl.so supl-proxy.o
    $(CC) -o $@ supl-proxy.o -L. -lsupl -lssl -lm -lcrypto

supl-cert: supl-cert.o
    $(CC) -o $@ supl-cert.o $(shell pkg-config --libs openssl) -lm -lcrypto

make && make install

#example
export LD_LIBRARY_PATH=/home/dong/supl/_install/lib:$LD_LIBRARY_PATH

dong@ubuntu:~/supl/trunk/src/supl-client.c

static char *usage_str =
"Usage: "
"%s options [supl-server] "
"Options: "
"  --almanac|-a                    request also almanac data "
"  --cell gsm:mcc,mns:lac,ci|wcdma:mcc,msn,uc    set current gsm/wcdma cell id "
"  --cell gsm:mcc,mns:lac,ci:lat,lon,uncert    set known gsm cell id with position "
"  --format|-f human                machine parseable output "
"  --debug|-d <n>                1 == RRLP, 2 == SUPL, 4 == DEBUG "
"  --debug-file file                write debug to file "
"  --help|-h                    show this help "
"Example: "
"%1$s --cell=gsm:244,5:0x59e2,0x31b0:60.169995,24.939995,127 --cell=gsm:244,5:0x59e2,0x31b0 "
;

dong@ubuntu:~/supl/_install/bin$ tree
.
├── ca-cert.pem
├── ca-priv.pem
├── c_rehash
├── openssl
├── srv-cert.pem
├── srv-priv.pem
├── supl-cert
├── supl-client
└── supl-proxy

0 directories, 9 files
dong@ubuntu:~/supl/_install/bin$ ./supl-cert supl.nokia.com
dong@ubuntu:~/supl/_install/bin$ ./supl-proxy supl.nokia.com
dong@ubuntu:~/supl/_install/bin$ ./supl-client --cell=gsm:244,5:0x59e2,0x31b0:60.169995,24.939995,127 --cell=gsm:244,5:0x59e2,0x31b0

#cellid

== Getting MCC, MNC, LAC and CI ==

You need to provide your position estimate to supl server as
cellular transmitter tower ids. One way to get them is to
go to the AT-command interpreter in your phone and ask for them:

at+cops?
+COPS: 0,2,"24405",2
OK
at+creg=2
OK
at+creg?
+CREG: 2,1,"59E2","31B0"
OK
at+creg=0
OK

==> you get needed values

MCC = 244
MCN = 05
LAC = 0x59e2
CI = 0x31b0

小米手机可以通过键盘输入 *#*#4636#*#*  查询 

#reference 

Android 配置SUPL

https://blog.csdn.net/tq501501/article/details/95347852
supl 安装使用
https://blog.csdn.net/TH1019/article/details/42002225?utm_source=blogxgwz1

 

2. embedded(custorm) supl

http://www.cellid.cn/

 https://www.u-blox.com/sites/default/files/ZED-F9P_InterfaceDescription_%28UBX-18010854%29.pdf

https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29.pdf

https://github.com/semlanik/UBXProto

https://github.com/chutsu/ubx

https://github.com/vedderb/ubx_server

http://www.ceiwei.com/mt/

GPS卫星 星历与历书的区别

https://www.cnblogs.com/hongzg1982/articles/2148942.html

./example -token <token> -test online -p /dev/ttyACM0 -b 9600 -gnss gps

https://github.com/semlanik/UBXProto
https://www.u-blox.com/sites/default/files/products/documents/MultiGNSS-Assistance_UserGuide_%28UBX-13004360%29.pdf

https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29.pdf

https://github.com/SkyRocketToys/Sonix/blob/a597fea9934dd0aa33dd19f5660742d0b1335fd5/app/dashcam/src/main_flow/ArduPilot/ublox.c

原文地址:https://www.cnblogs.com/dong1/p/12598141.html