@idm-plugin/geo 2.1.1 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -370,17 +370,39 @@ export declare class LaneHelper {
370
370
  static waypoints2RTZ10(name: string, waypoints: Coordinate[]): string;
371
371
  static toRTZWaypoints(waypoints: Coordinate[], precision?: number): string[];
372
372
  /**
373
- * 路径转CSV (JRC ECDIS ROUTE SHEET格式)
374
- * @param name 路径名称
373
+ * 路径转通用CSV (纯十进制度数、无厂商头、RFC 4180标准)
374
+ * 大部分海图设备/导航软件均可导入此格式
375
+ * @param name 兼容旧版本
375
376
  * @param waypoints 途径点
377
+ * @param options.precision 经纬度小数位数,默认6
376
378
  */
377
- static waypoints2CSV(name: string, waypoints: Coordinate[], format?: string): string;
379
+ static waypoints2CSV(name: string, waypoints: Coordinate[], options?: {
380
+ precision?: number;
381
+ }): string;
378
382
  /**
379
- * 路径转XLSX (Excel 2003 SpreadsheetML格式,可直接被Excel打开)
380
- * @param name 路径名称
383
+ * RFC 4180 CSV字段转义:含逗号、双引号、换行时用双引号包裹,内部双引号翻倍
384
+ */
385
+ static csvEscapeField(value: any): string;
386
+ /**
387
+ * 十进制度数转NMEA度分格式 (DDMM.MM / DDDMM.MM)
388
+ * @param value 十进制度数
389
+ * @param isLat true为纬度,false为经度
390
+ */
391
+ static decimalToNmeaDm(value: number, isLat: boolean): {
392
+ dm: string;
393
+ dir: string;
394
+ };
395
+ /**
396
+ * 计算NMEA 0183校验和 ($与*之间所有字符的异或,两字符十六进制大写)
397
+ * @param sentence $与*之间的字符串
398
+ */
399
+ static nmeaChecksum(sentence: string): string;
400
+ /**
401
+ * 路径转NMEA 0183 WPL航点语句
381
402
  * @param waypoints 途径点
403
+ * @returns 多条$GPWPL语句,以\r\n分隔
382
404
  */
383
- static waypoints2XLSX(name: string, waypoints: Coordinate[], format?: string): string;
405
+ static waypoints2NMEA(waypoints: Coordinate[]): string;
384
406
  /**
385
407
  * 路径摘要
386
408
  * @param coordinates 已排序的坐标
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/geo",
3
3
  "private": false,
4
- "version": "2.1.1",
4
+ "version": "2.1.3",
5
5
  "description": "idm plugin for geo in browser",
6
6
  "type": "module",
7
7
  "keywords": [