UNPKG

signalk-parquet

Version:

Vessel data Parquet file archive with automated value and geospatial triggers. History API compliant with cloud backups and queries.

60 lines 2.71 kB
/** * Geographic calculation utilities for position-based thresholds */ import { BoundingBox } from '../types'; /** * Calculate distance between two geographic points using Haversine formula * @param lat1 - Latitude of point 1 in degrees * @param lon1 - Longitude of point 1 in degrees * @param lat2 - Latitude of point 2 in degrees * @param lon2 - Longitude of point 2 in degrees * @returns Distance in meters */ export declare function calculateDistance(lat1: number, lon1: number, lat2: number, lon2: number): number; /** * Check if a point is within a bounding box * @param lat - Latitude of point in degrees * @param lon - Longitude of point in degrees * @param box - Bounding box definition * @returns True if point is inside the bounding box */ export declare function isPointInBoundingBox(lat: number, lon: number, box: BoundingBox): boolean; /** * Create a bounding box around a center point with a given radius * @param centerLat - Center latitude in degrees * @param centerLon - Center longitude in degrees * @param radiusMeters - Radius in meters * @returns Bounding box that encompasses the circle */ export declare function createBoundingBoxFromRadius(centerLat: number, centerLon: number, radiusMeters: number): BoundingBox; /** * Calculate the bearing from point 1 to point 2 * @param lat1 - Latitude of point 1 in degrees * @param lon1 - Longitude of point 1 in degrees * @param lat2 - Latitude of point 2 in degrees * @param lon2 - Longitude of point 2 in degrees * @returns Bearing in degrees (0-360, where 0 is north) */ export declare function calculateBearing(lat1: number, lon1: number, lat2: number, lon2: number): number; /** * Calculate destination point given start point, bearing, and distance * @param lat - Starting latitude in degrees * @param lon - Starting longitude in degrees * @param bearing - Bearing in degrees (0-360) * @param distanceMeters - Distance to travel in meters * @returns Destination point {latitude, longitude} */ export declare function calculateDestinationPoint(lat: number, lon: number, bearing: number, distanceMeters: number): { latitude: number; longitude: number; }; /** * Calculate bounding box from home port with anchor point * @param homePortLat - Home port latitude in degrees * @param homePortLon - Home port longitude in degrees * @param boxSizeMeters - Distance from home port to edges in meters * @param anchor - Anchor point position (nw, n, ne, w, center, e, sw, s, se) * @returns Bounding box */ export declare function calculateBoundingBoxFromHomePort(homePortLat: number, homePortLon: number, boxSizeMeters: number, anchor: string): BoundingBox; //# sourceMappingURL=geo-calculator.d.ts.map