Android系统Gps分析Word文件下载.docx
- 文档编号:16642380
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:57
- 大小:71.53KB
Android系统Gps分析Word文件下载.docx
《Android系统Gps分析Word文件下载.docx》由会员分享,可在线阅读,更多相关《Android系统Gps分析Word文件下载.docx(57页珍藏版)》请在冰豆网上搜索。
the
following
must
match
constants
GpsLocationProvider.java.
GpsLocation
has
latitude
and
longitude.
#define
GPS_LOCATION_HAS_LAT_LONG
0x0001
altitude.
GPS_LOCATION_HAS_ALTITUDE
0x0002
speed.
GPS_LOCATION_HAS_SPEED
0x0004
bearing.
GPS_LOCATION_HAS_BEARING
0x0008
accuracy.
GPS_LOCATION_HAS_ACCURACY
0x0010
Represents
location.
struct
{
set
sizeof(GpsLocation)
size_t
size;
Contains
GpsLocationFlags
bits.
flags;
degrees.
double
latitude;
longitude
longitude;
altitude
meters
above
WGS
84
reference
*
ellipsoid.
altitude;
speed
per
second.
float
speed;
heading
bearing;
expected
accuracy
meters.
accuracy;
Timestamp
for
location
fix.
GpsUtcTime
timestamp;
}
GpsLocation;
/**FlagstoindicatewhichvaluesarevalidinaGpsLocation.*/
typedefuint16_tGpsLocationFlags;
//IMPORTANT:
Notethatthefollowingvaluesmustmatch
//constantsinGpsLocationProvider.java.
/**GpsLocationhasvalidlatitudeandlongitude.*/
#defineGPS_LOCATION_HAS_LAT_LONG0x0001
/**GpsLocationhasvalidaltitude.*/
#defineGPS_LOCATION_HAS_ALTITUDE0x0002
/**GpsLocationhasvalidspeed.*/
#defineGPS_LOCATION_HAS_SPEED0x0004
/**GpsLocationhasvalidbearing.*/
#defineGPS_LOCATION_HAS_BEARING0x0008
/**GpsLocationhasvalidaccuracy.*/
#defineGPS_LOCATION_HAS_ACCURACY0x0010
/**Representsalocation.*/
typedefstruct{
/**settosizeof(GpsLocation)*/
size_tsize;
/**ContainsGpsLocationFlagsbits.*/
uint16_tflags;
/**Representslatitudeindegrees.*/
doublelatitude;
/**Representslongitudeindegrees.*/
doublelongitude;
/**RepresentsaltitudeinmetersabovetheWGS84reference
*ellipsoid.*/
doublealtitude;
/**Representsspeedinmeterspersecond.*/
floatspeed;
/**Representsheadingindegrees.*/
floatbearing;
/**Representsexpectedaccuracyinmeters.*/
floataccuracy;
/**Timestampforthelocationfix.*/
GpsUtcTimetimestamp;
}GpsLocation;
∙GpsStatus
GPS状态包括5种状态,分别为未知,正在定位,停止定位,启动未定义,未启动。
GPS
status
event
values.
GpsStatusValue;
unknown.
GPS_STATUS_NONE
0
begun
navigating.
GPS_STATUS_SESSION_BEGIN
1
stopped
GPS_STATUS_SESSION_END
2
powered
on
but
is
not
GPS_STATUS_ENGINE_ON
3
off.
*/AgpsCallbacks
AgpsInterface
GPS_STATUS_ENGINE_OFF
4
status.
sizeof(GpsStatus)
GpsStatusValue
status;
GpsStatus;
/**GPSstatuseventvalues.*/
typedefuint16_tGpsStatusValue;
/**GPSstatusunknown.*/
#defineGPS_STATUS_NONE0
/**GPShasbegunnavigating.*/
#defineGPS_STATUS_SESSION_BEGIN1
/**GPShasstoppednavigating.*/
#defineGPS_STATUS_SESSION_END2
/**GPShaspoweredonbutisnotnavigating.*/
#defineGPS_STATUS_ENGINE_ON3
/**GPSispoweredoff.*/AgpsCallbacks
AgpsInterface
#defineGPS_STATUS_ENGINE_OFF4
/**Representsthestatus.*/
/**settosizeof(GpsStatus)*/
GpsStatusValuestatus;
}GpsStatus;
∙GpsSvInfo
GPS卫星信息,包含卫星编号,信号强度,卫星仰望角,方位角等。
SV
information.
sizeof(GpsSvInfo)
Pseudo-random
number
SV.
int
prn;
Signal
noise
ratio.
snr;
Elevation
of
elevation;
Azimuth
azimuth;
GpsSvInfo;
/**RepresentsSVinformation.*/
/**settosizeof(GpsSvInfo)*/
/**Pseudo-randomnumberfortheSV.*/
intprn;
/**Signaltonoiseratio.*/
floatsnr;
/**ElevationofSVindegrees.*/
floatelevation;
/**AzimuthofSVindegrees.*/
floatazimuth;
}GpsSvInfo;
∙GpsSvStatus
GPS卫星状态,包含可见卫星数和信息,星历时间,年历时间等。
sizeof(GpsSvStatus)
Number
SVs
currently
visible.
num_svs;
an
array
GpsSvInfo
sv_list[GPS_MAX_SVS];
bit
mask
indicating
have
ephemeris
data.
uint32_t
ephemeris_mask;
almanac
almanac_mask;
were
used
computing
most
recent
position
used_in_fix_mask;
GpsSvStatus;
/**RepresentsSVstatus.*/
/**settosizeof(GpsSvStatus)*/
/**NumberofSVscurrentlyvisible.*/
intnum_svs;
/**ContainsanarrayofSVinformation.*/
GpsSvInfosv_list[GPS_MAX_SVS];
/**RepresentsabitmaskindicatingwhichSVs
*haveephemerisdata.
*/
uint32_tephemeris_mask;
*havealmanacdata.
uint32_talmanac_mask;
/**
*RepresentsabitmaskindicatingwhichSVs
*wereusedforcomputingthemostrecentpositionfix.
uint32_tused_in_fix_mask;
}GpsSvStatus;
∙GpsCallbacks
回调函数定义
Callback
with
向上层传递GPS位置信息
Can
only
be
called
from
thread
created
by
create_thread_cb.
void
(*
gps_location_callback)(GpsLocation*
location);
向上层传递GPS状态信息
gps_status_callback)(GpsStatus*
status);
向上层传递GPS卫星信息
gps_sv_status_callback)(GpsSvStatus*
sv_info);
reporting
NMEA
sentences.
向上层传递MEMA数据
gps_nmea_callback)(GpsUtcTime
timestamp,
const
char*
nmea,
length);
inform
framework
engine'
s
capabilities.告知GPS模块可以实现的功能
Capability
parameter
field
GPS_CAPABILITY_*
flags.
gps_set_capabilities)(uint32_t
capabilities);
utility
acquiring
wakelock.上锁,防止处理GPS事件时中止。
This
can
prevent
CPU
suspending
while
handling
events.
gps_acquire_wakelock)();
releasing
wakelock.
*/释放锁
gps_release_wakelock)();
creating
call
into
Java
code.等待上层请求
create
any
threads
report
events
up
framework.
pthread_t
gps_create_thread)(const
name,
(*start)(void
*),
void*
arg);
callback
structure.
sizeof(GpsCallbacks)
gps_location_callback
location_cb;
gps_status_callback
status_cb;
gps_sv_status_callback
sv_status_cb;
gps_nmea_callback
nmea_cb;
gps_set_capabilities
set_capabilities_cb;
gps_acquire_wakelock
acquire_wakelock_cb;
gps_release_wakelock
release_wakelock_cb;
gps_create_thread
create_thread_cb;
GpsCallbacks;
/**Callbackwithlocationinformation.向上层传递GPS位置信息
*Canonlybecalledfromathreadcreatedbycreate_thread_cb.
typedefvoid(*gps_location_callback)(GpsLocation*location);
/**Callbackwithstatusinformation.向上层传递GPS状态信息
typedefvoid(*gps_status_callback)(GpsStatus*status);
/**CallbackwithSVstatusinformation.向上层传递GPS卫星信息
typedefvoid(*gps_sv_status_callback)(GpsSvStatus*sv_info);
/**CallbackforreportingNMEAsentences.向上层传递MEMA数据
typedefvoid(*gps_nmea_callback)(GpsUtcTimetimestamp,constchar*nmea,intlength);
/**CallbacktoinformframeworkoftheGPSengine'
scapabilities.告知GPS模块可以实现的功能
*CapabilityparameterisabitfieldofGPS_CAPABILITY_*flags.
typedefvoid(*gps_set_capabilities)(uint32_tcapabilities);
/**CallbackutilityforacquiringtheGPSwakelock.上锁,防止处理GPS事件时中止。
*ThiscanbeusedtopreventtheCPUfromsuspendingw
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Android 系统 Gps 分析