diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f4ff52e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,121 @@
+
+# Created by https://www.gitignore.io/api/swift
+
+### Swift ###
+# Xcode
+#
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+## Build generated
+build/
+DerivedData/
+
+## Various settings
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata/
+
+## Other
+*.moved-aside
+*.xccheckout
+*.xcscmblueprint
+
+## Obj-C/Swift specific
+*.hmap
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+# Swift Package Manager
+#
+# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
+# Packages/
+# Package.pins
+.build/
+
+# CocoaPods - Refactored to standalone file
+
+# Carthage - Refactored to standalone file
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/#source-control
+
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots
+fastlane/test_output
+
+
+# End of https://www.gitignore.io/api/swift
+
+# Created by https://www.gitignore.io/api/cocoapods
+
+### CocoaPods ###
+## CocoaPods GitIgnore Template
+
+# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
+# - Also handy if you have a large number of dependant pods
+# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
+Pods/
+
+
+# End of https://www.gitignore.io/api/cocoapods
+
+# Created by https://www.gitignore.io/api/carthage
+
+### Carthage ###
+# Carthage
+#
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+Carthage/Checkouts
+Carthage/Build
+Cartfile.resolved
+
+
+# End of https://www.gitignore.io/api/carthage
+
+# Created by https://www.gitignore.io/api/osx
+
+### OSX ###
+*.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+
+# End of https://www.gitignore.io/api/osx
diff --git a/Cartfile b/Cartfile
new file mode 100644
index 0000000..161510b
--- /dev/null
+++ b/Cartfile
@@ -0,0 +1 @@
+github "mattt/Surge" ~> 2.0.0
diff --git a/HCKalmanFilter Sample/HCKalmanFilter Sample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/HCKalmanFilter Sample/HCKalmanFilter Sample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/HCKalmanFilter Sample/HCKalmanFilter Sample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/HCKalmanFilter.xcodeproj/Configs/Universal.xcconfig b/HCKalmanFilter.xcodeproj/Configs/Universal.xcconfig
new file mode 100644
index 0000000..2dc2b30
--- /dev/null
+++ b/HCKalmanFilter.xcodeproj/Configs/Universal.xcconfig
@@ -0,0 +1,22 @@
+PRODUCT_NAME = $(TARGET_NAME)
+DYLIB_INSTALL_NAME_BASE = @rpath
+OTHER_SWIFT_FLAGS = -DXcode
+APPLICATION_EXTENSION_API_ONLY = YES
+
+VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
+IPHONEOS_DEPLOYMENT_TARGET = 8.0
+LD_RUNPATH_SEARCH_PATHS[sdk=iphone*] = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
+
+TVOS_DEPLOYMENT_TARGET = 10.0
+LD_RUNPATH_SEARCH_PATHS[sdk=appletv*] = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
+
+WATCHOS_DEPLOYMENT_TARGET = 3.0
+LD_RUNPATH_SEARCH_PATHS[sdk=watch*] = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
+VALID_ARCHS[sdk=watchos*] = armv7k
+
+VALID_ARCHS[sdk=macosx*] = x86_64
+MACOSX_DEPLOYMENT_TARGET = 10.7
+LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
+
+TARGETED_DEVICE_FAMILY = 1,2,3,4
+SUPPORTED_PLATFORMS = watchsimulator watchos macosx iphoneos iphonesimulator appletvos appletvossimulator
diff --git a/HCKalmanFilter.xcodeproj/project.pbxproj b/HCKalmanFilter.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..ed7f9ea
--- /dev/null
+++ b/HCKalmanFilter.xcodeproj/project.pbxproj
@@ -0,0 +1,362 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 48;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ BF4E8EC920690D3500B1255B /* Surge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF4E8EC820690D3500B1255B /* Surge.framework */; };
+ BFC5F66220690BE300D75B10 /* HCKalmanFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BFC5F66020690BE300D75B10 /* HCKalmanFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ BFC5F66A20690C0300D75B10 /* HCKalmanAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFC5F66820690C0300D75B10 /* HCKalmanAlgorithm.swift */; };
+ BFC5F66B20690C0300D75B10 /* HCMatrixObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFC5F66920690C0300D75B10 /* HCMatrixObject.swift */; };
+ BFF76C0F2085F8990050D0E8 /* Universal.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = BFF76C0E2085F8990050D0E8 /* Universal.xcconfig */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ BF4E8EC820690D3500B1255B /* Surge.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Surge.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ BFC5F65D20690BE300D75B10 /* HCKalmanFilter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HCKalmanFilter.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ BFC5F66020690BE300D75B10 /* HCKalmanFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HCKalmanFilter.h; sourceTree = ""; };
+ BFC5F66120690BE300D75B10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ BFC5F66820690C0300D75B10 /* HCKalmanAlgorithm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HCKalmanAlgorithm.swift; sourceTree = ""; };
+ BFC5F66920690C0300D75B10 /* HCMatrixObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HCMatrixObject.swift; sourceTree = ""; };
+ BFF76C0E2085F8990050D0E8 /* Universal.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Universal.xcconfig; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ BFC5F65920690BE300D75B10 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BF4E8EC920690D3500B1255B /* Surge.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ BF4E8EC720690D3500B1255B /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BF4E8EC820690D3500B1255B /* Surge.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ BFC5F65320690BE300D75B10 = {
+ isa = PBXGroup;
+ children = (
+ BFF76C0D2085F8990050D0E8 /* Configs */,
+ BFC5F65F20690BE300D75B10 /* HCKalmanFilter */,
+ BFC5F65E20690BE300D75B10 /* Products */,
+ BF4E8EC720690D3500B1255B /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ BFC5F65E20690BE300D75B10 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ BFC5F65D20690BE300D75B10 /* HCKalmanFilter.framework */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ BFC5F65F20690BE300D75B10 /* HCKalmanFilter */ = {
+ isa = PBXGroup;
+ children = (
+ BFC5F66820690C0300D75B10 /* HCKalmanAlgorithm.swift */,
+ BFC5F66920690C0300D75B10 /* HCMatrixObject.swift */,
+ BFC5F66020690BE300D75B10 /* HCKalmanFilter.h */,
+ BFC5F66120690BE300D75B10 /* Info.plist */,
+ );
+ path = HCKalmanFilter;
+ sourceTree = "";
+ };
+ BFF76C0D2085F8990050D0E8 /* Configs */ = {
+ isa = PBXGroup;
+ children = (
+ BFF76C0E2085F8990050D0E8 /* Universal.xcconfig */,
+ );
+ name = Configs;
+ path = HCKalmanFilter.xcodeproj/Configs;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ BFC5F65A20690BE300D75B10 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BFC5F66220690BE300D75B10 /* HCKalmanFilter.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ BFC5F65C20690BE300D75B10 /* HCKalmanFilter */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BFC5F66520690BE300D75B10 /* Build configuration list for PBXNativeTarget "HCKalmanFilter" */;
+ buildPhases = (
+ BFC5F65820690BE300D75B10 /* Sources */,
+ BFC5F65920690BE300D75B10 /* Frameworks */,
+ BFC5F65A20690BE300D75B10 /* Headers */,
+ BFC5F65B20690BE300D75B10 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = HCKalmanFilter;
+ productName = HCKalmanFilter;
+ productReference = BFC5F65D20690BE300D75B10 /* HCKalmanFilter.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ BFC5F65420690BE300D75B10 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 0930;
+ LastUpgradeCheck = 0920;
+ ORGANIZATIONNAME = Hypercube;
+ TargetAttributes = {
+ BFC5F65C20690BE300D75B10 = {
+ CreatedOnToolsVersion = 9.2;
+ LastSwiftMigration = 0920;
+ ProvisioningStyle = Manual;
+ };
+ };
+ };
+ buildConfigurationList = BFC5F65720690BE300D75B10 /* Build configuration list for PBXProject "HCKalmanFilter" */;
+ compatibilityVersion = "Xcode 8.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = BFC5F65320690BE300D75B10;
+ productRefGroup = BFC5F65E20690BE300D75B10 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ BFC5F65C20690BE300D75B10 /* HCKalmanFilter */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ BFC5F65B20690BE300D75B10 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BFF76C0F2085F8990050D0E8 /* Universal.xcconfig in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ BFC5F65820690BE300D75B10 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BFC5F66B20690C0300D75B10 /* HCMatrixObject.swift in Sources */,
+ BFC5F66A20690C0300D75B10 /* HCKalmanAlgorithm.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ BFC5F66320690BE300D75B10 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Debug;
+ };
+ BFC5F66420690BE300D75B10 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ VALIDATE_PRODUCT = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Release;
+ };
+ BFC5F66620690BE300D75B10 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BFF76C0E2085F8990050D0E8 /* Universal.xcconfig */;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_STYLE = Manual;
+ DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = "";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ INFOPLIST_FILE = HCKalmanFilter/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.hypercubesoft.HCKalmanFilter;
+ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SKIP_INSTALL = YES;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ BFC5F66720690BE300D75B10 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BFF76C0E2085F8990050D0E8 /* Universal.xcconfig */;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_STYLE = Manual;
+ DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = "";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ INFOPLIST_FILE = HCKalmanFilter/Info.plist;
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.hypercubesoft.HCKalmanFilter;
+ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SKIP_INSTALL = YES;
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ BFC5F65720690BE300D75B10 /* Build configuration list for PBXProject "HCKalmanFilter" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BFC5F66320690BE300D75B10 /* Debug */,
+ BFC5F66420690BE300D75B10 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BFC5F66520690BE300D75B10 /* Build configuration list for PBXNativeTarget "HCKalmanFilter" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BFC5F66620690BE300D75B10 /* Debug */,
+ BFC5F66720690BE300D75B10 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = BFC5F65420690BE300D75B10 /* Project object */;
+}
diff --git a/HCKalmanFilter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HCKalmanFilter.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..a4948fb
--- /dev/null
+++ b/HCKalmanFilter.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/HCKalmanFilter.xcodeproj/xcshareddata/xcschemes/HCKalmanFilter.xcscheme b/HCKalmanFilter.xcodeproj/xcshareddata/xcschemes/HCKalmanFilter.xcscheme
new file mode 100644
index 0000000..2007f9d
--- /dev/null
+++ b/HCKalmanFilter.xcodeproj/xcshareddata/xcschemes/HCKalmanFilter.xcscheme
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HCKalmanFilter.xcworkspace/contents.xcworkspacedata b/HCKalmanFilter.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..a4e4e0e
--- /dev/null
+++ b/HCKalmanFilter.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/HCKalmanFilter.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/HCKalmanFilter.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/HCKalmanFilter.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/HCKalmanFilter/HCKalmanFilter.h b/HCKalmanFilter/HCKalmanFilter.h
new file mode 100644
index 0000000..f66e449
--- /dev/null
+++ b/HCKalmanFilter/HCKalmanFilter.h
@@ -0,0 +1,19 @@
+//
+// HCKalmanFilter.h
+// HCKalmanFilter
+//
+// Created by Vincent Esche on 3/26/18.
+// Copyright © 2018 Hypercube. All rights reserved.
+//
+
+#import
+
+//! Project version number for HCKalmanFilter.
+FOUNDATION_EXPORT double HCKalmanFilterVersionNumber;
+
+//! Project version string for HCKalmanFilter.
+FOUNDATION_EXPORT const unsigned char HCKalmanFilterVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+
diff --git a/HCKalmanFilter/Info.plist b/HCKalmanFilter/Info.plist
new file mode 100644
index 0000000..3eef9a8
--- /dev/null
+++ b/HCKalmanFilter/Info.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.2.2
+ CFBundleVersion
+ $(CURRENT_PROJECT_VERSION)
+ NSPrincipalClass
+
+
+
diff --git a/README.md b/README.md
index 31e86c6..b9fa505 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
[](http://cocoapods.org/pods/HCKalmanFilter)
+[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/HCKalmanFilter)
[](http://cocoapods.org/pods/HCKalmanFilter)

@@ -49,29 +50,57 @@ print(kalmanLocation.altitude)
[CocoaPods](https://cocoapods.org/) is a dependency manager for Objective-C and Swift, which automates and simplifies the process of using 3rd-party libraries like HCKalmanFilter in your projects.
-### Podfile
+### Via CocoaPods
-To integrate **HCKalmanFilter** into your Xcode project using CocoaPods, specify it in your Podfile:
+To integrate **HCKalmanFilter** into your Xcode project using **CocoaPods**:
-```
-target 'TargetName' do
- use_frameworks!
- pod 'HCKalmanFilter'
-end
-```
+1. Specify it in your Podfile:
-Then, run the following command:
+ ```
+ target 'TargetName' do
+ use_frameworks!
+ pod 'HCKalmanFilter'
+ end
+ ```
-```
-$ pod install
-```
+2. Follow the [integration guide](https://guides.cocoapods.org/using/using-cocoapods.html)
+
+### Via Carthage
+
+To integrate **HCKalmanFilter** into your Xcode project using **Carthage**:
+
+1. Specify it in your Cartfile:
+
+ ```
+ github "Hypercubesoft/HCKalmanFilter" ~> 1.2.2
+ ```
-### With source code
+2. Follow the [integration guide](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)
-Download repository, then add HCKalmanAlgorithm directory to your project.
+### Via XCWorkspace
+To integrate **HCKalmanFilter** into your Xcode project using **XCWorkspace**:
+
+1. Download repository
+2. Add `HCKalmanFilter.xcodeproj` file to your project workspace
+3. Add `HCKalmanFilter` to "Embedded Binaries" under `General` project settings
+4. Add `Surge` to "Embedded Binaries" under `General` project settings
+
+### Via Source Files
+
+To integrate **HCKalmanFilter** into your Xcode project using **source files**:
+
+1. Download repository
+2. Add …
+
+ - `HCKalmanAlgorithm.swift`
+ - `HCMatrixObject.swift`
+
+ … to your project
+3. Link against [*Surge*](https://github.com/mattt/Surge) manually
## Usage
+
**1.** First import HCKalmanFilter module
```swift
@@ -98,7 +127,7 @@ hcKalmanFilter.rValue = 35.0
let kalmanLocation = hcKalmanFilter.processState(currentLocation: myCurrentLocation)
```
* **currentLocation** is CLLocation object which represents the actual coordinates received from the GPS receiver.
-* **kalmanLocation** is CLLocation object which represents coordinates obtained by processing **currentLocation** with HCKalmanFilter algorithm. You can now use the corrected coordinates for further purposes (for example, to plot the path of the object you are tracking...)
+* **kalmanLocation** is CLLocation object which represents coordinates obtained by processing **currentLocation** with HCKalmanFilter algorithm. You can now use the corrected coordinates for further purposes (for example, to plot the path of the object you are tracking...)
**5.** In case you need to stop tracking and then restart it, it is necessary to call **resetKalman** function with new start location, before continuing with the processing of the measured coordinates.
@@ -122,7 +151,7 @@ var hcKalmanFilter: HCKalmanAlgorithm?
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
{
var myLocation: CLLocation = locations.first!
-
+
if hcKalmanFilter == nil {
self.hcKalmanFilter = HCKalmanAlgorithm(initialLocation: myLocation)
}