Remove kalman and prediction
This commit is contained in:
parent
980bc13506
commit
0889130a3d
@ -68,7 +68,7 @@ class DumonGeolocation : Plugin() {
|
|||||||
private val directionChangeThreshold = 0.17f // ~10 deg
|
private val directionChangeThreshold = 0.17f // ~10 deg
|
||||||
|
|
||||||
// private val emitIntervalMs: Long = 500L
|
// private val emitIntervalMs: Long = 500L
|
||||||
private val emitIntervalMs: Long = 1000L // hard debounce
|
private var emitIntervalMs: Long = 1000L // hard debounce
|
||||||
// private val emitIntervalMs: Long = 500L
|
// private val emitIntervalMs: Long = 500L
|
||||||
|
|
||||||
private var motionState: String = "idle" // 'idle', 'driving', 'mocked'
|
private var motionState: String = "idle" // 'idle', 'driving', 'mocked'
|
||||||
@ -220,6 +220,14 @@ class DumonGeolocation : Plugin() {
|
|||||||
call.resolve()
|
call.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PluginMethod
|
||||||
|
fun setEmitInterval(call: PluginCall) {
|
||||||
|
val intervalMs = call.getInt("intervalMs") ?: 1000
|
||||||
|
emitIntervalMs = intervalMs.toLong().coerceIn(250L, 30000L) // batas antara 0.25s – 30s
|
||||||
|
Log.d("DUMON_GEOLOCATION", "Emit interval set to $emitIntervalMs ms")
|
||||||
|
call.resolve()
|
||||||
|
}
|
||||||
|
|
||||||
@PermissionCallback
|
@PermissionCallback
|
||||||
private fun onPermissionResult(call: PluginCall) {
|
private fun onPermissionResult(call: PluginCall) {
|
||||||
val locationStatus = PermissionUtils.getPermissionStatus(
|
val locationStatus = PermissionUtils.getPermissionStatus(
|
||||||
|
|||||||
@ -74,6 +74,7 @@ export interface DumonGeolocationPlugin {
|
|||||||
stopPositioning(): Promise<void>;
|
stopPositioning(): Promise<void>;
|
||||||
getLatestPosition(): Promise<PositioningData>;
|
getLatestPosition(): Promise<PositioningData>;
|
||||||
checkAndRequestPermissions(): Promise<PermissionStatus>;
|
checkAndRequestPermissions(): Promise<PermissionStatus>;
|
||||||
|
setEmitInterval(options: { intervalMs: number }): Promise<void>;
|
||||||
|
|
||||||
configureEdgeToEdge(options: {
|
configureEdgeToEdge(options: {
|
||||||
bgColor: string;
|
bgColor: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user