41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { WebPlugin } from '@capacitor/core';
|
|
import type { DumonGeolocationPlugin, PositioningData } from './definitions';
|
|
|
|
export class DumonGeolocationWeb extends WebPlugin implements DumonGeolocationPlugin {
|
|
|
|
async startPositioning(): Promise<void> {
|
|
console.log('DumonGeolocationWeb: startPositioning() called (no-op)');
|
|
}
|
|
|
|
async stopPositioning(): Promise<void> {
|
|
console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');
|
|
}
|
|
|
|
async getLatestPosition(): Promise<PositioningData> {
|
|
console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)');
|
|
return {
|
|
source: 'GNSS',
|
|
timestamp: Date.now(),
|
|
gpsData: {
|
|
latitude: 0,
|
|
longitude: 0,
|
|
accuracy: 999,
|
|
satellitesInView: 0,
|
|
usedInFix: 0,
|
|
constellationCounts: {},
|
|
},
|
|
wifiData: {
|
|
apCount: 0,
|
|
aps: [],
|
|
},
|
|
imuData: {
|
|
accelX: 0,
|
|
accelY: 0,
|
|
accelZ: 0,
|
|
gyroX: 0,
|
|
gyroY: 0,
|
|
gyroZ: 0,
|
|
}
|
|
};
|
|
}
|
|
} |