XGPS150 & XGPS160 Software Development Kit
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
XGPSSample.xcodeproj sdk update Aug 6, 2018
XGPSSample sdk update Aug 6, 2018
.gitignore initial commit Nov 3, 2017
README.md update a part of usage Aug 6, 2018

README.md

XGPS-SDK-iOS

Platform

This project provides the source code and example code that XGPS150/XGPS160 exchanges data with iPhone device via Bluetooth connection.

Usage

The name of core SDK is Puck. You can use the puck.m and puck.h file.

Please reference the sample code how to use the Puck.

Implement the XGPSManager

add the XGPSManager() into your appDelegate

var xGpsManager: XGPSManager = XGPSManager()

Get GPS Information

add the XGPSDelegate in your viewcontroller

public protocol XGPSDelegate: class {
    func didUpdate(connected: Bool) -> Void
    @objc optional func didUpdateGpsInfo(modelNumber:String, isCharging:Bool, betteryLevel:Float) -> Void
    @objc optional func didUpdateSettings() -> Void
    @objc optional func didUpdatePositionData(fixType: Int, latitude:Float, longitude: Float, altitude: Float,
                                              speedAndCourseIsValid:Bool, speed: Float, heading: Float,
                                              utcTime: String, waas: Bool,
                                              satellitesInView:Int, satellitesInUse: Int,
                                              glonassInView: Int, glonassInUse: Int) -> Void
}

Get Satelletes Information

add the observer for NotificationCenter name "SatelliteDataUpdated" for more detail option see the puck code.

Request Trip log list

let xGpsManager = AppDelegate.getDelegate().xGpsManager
if xGpsManager.isConnected() {
    xGpsManager.commandGetLogList(delegate: self)
}

add logListComplete() delegate function

Delete Trip log

func deleteFromXGPS(logData: LogData) {
    xGpsManager.commandLogDelete(logData: logData)
}

see the 'TripsViewController.swift

Set the Logging rate

xGpsManager.commandLoggingUpdateRate(UInt8(settingValue))

see the SettingsViewController.swift it allows only XGPS160

Product

http://gps.dualav.com/