Remove kalman and prediction
This commit is contained in:
parent
980bc13506
commit
0889130a3d
@ -68,8 +68,8 @@ class DumonGeolocation : Plugin() {
|
||||
private val directionChangeThreshold = 0.17f // ~10 deg
|
||||
|
||||
// private val emitIntervalMs: Long = 500L
|
||||
private val emitIntervalMs: Long = 1000L // hard debounce
|
||||
// private val emitIntervalMs: Long = 500L
|
||||
private var emitIntervalMs: Long = 1000L // hard debounce
|
||||
// private val emitIntervalMs: Long = 500L
|
||||
|
||||
private var motionState: String = "idle" // 'idle', 'driving', 'mocked'
|
||||
|
||||
@ -220,6 +220,14 @@ class DumonGeolocation : Plugin() {
|
||||
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
|
||||
private fun onPermissionResult(call: PluginCall) {
|
||||
val locationStatus = PermissionUtils.getPermissionStatus(
|
||||
|
||||
@ -74,6 +74,7 @@ export interface DumonGeolocationPlugin {
|
||||
stopPositioning(): Promise<void>;
|
||||
getLatestPosition(): Promise<PositioningData>;
|
||||
checkAndRequestPermissions(): Promise<PermissionStatus>;
|
||||
setEmitInterval(options: { intervalMs: number }): Promise<void>;
|
||||
|
||||
configureEdgeToEdge(options: {
|
||||
bgColor: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user