A modern, type-safe Swift 6.0 library for generating GNSS ranging codes across multiple constellations.
This project is a high-performance port of the Oriental AI C library.
Add the package to your Package.swift dependencies:
dependencies: [
.package(url: "https://github.com/shuwang1/libgnss-codes-swift.git", from: "1.0.0")
]
import GNSSCodes
// Generate GPS L1 C/A chips for PRN 1
if let code = GNSSCodes.generate(prn: 1, type: .L1CA) {
print("Signal: GPS L1 C/A")
print("Length: \(code.length) chips")
print("Rate: \(code.chipRate / 1e6) MHz")
print("First 5 chips: \(code.chips.prefix(5))")
}
// Generate Galileo E1B chips for PRN 10
if let galileo = GNSSCodes.generate(prn: 10, type: .E1B) {
// Process Galileo chips...
}
swift test to execute the comprehensive test suite.swift package generate-documentation.main. Documentation is automatically deployed to GitHub Pages.[Int16]. Transitioning to bit-packed [UInt64] with SIMD-accelerated correlation is planned for a future release.2016 All Rights Reserved by Shu Wang shuwang1@outlook.com
This project is licensed under the same terms as the original libgnss-codes library. See the LICENSE file (if available) or contact Shu Wang shuwang1@outlook.com.
Original C implementation by Shu Wang. Swift port and optimization developed as part of Orientable AI internel C project.