Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinates in DMS format with postfix hemisphere doesn't work #40

Open
CachingFoX opened this issue Dec 31, 2024 · 0 comments
Open

Coordinates in DMS format with postfix hemisphere doesn't work #40

CachingFoX opened this issue Dec 31, 2024 · 0 comments

Comments

@CachingFoX
Copy link

Create a waypoint with coordinates in DMS format with postfix hemisphere doesn't work.

Example: 50 11 30.0N 8 30 30.0E => bad values

DMS semi-postfix hemisphere 50N 11 30.0 8E 30 30.0 => okay
DMS prefix hemisphere N 50 11 30.0 E8 30 30.0 => okay
DMM prefix hemisphere N 50 11.500 E 008 30.500 => okay
DMM postfix hemisphere 50 11.500N 08 30.500E => okay

coordinates.ts

// DMS / D M S H
{
    regexp: /^\s*(\d+)\s+(\d+)\s+(\d+\.?\d*)\s*([NEWS])\s*(\d+)\s+(\d+)\s+(\d+\.?\d*)\s*([NEWS])\s*$/,
    fields: [4, 1, 2, 3, 6, 5, 6, 7],
},

fix: change 5th field from 6to 8:

// DMS / D M S H
{
    regexp: /^\s*(\d+)\s+(\d+)\s+(\d+\.?\d*)\s*([NEWS])\s*(\d+)\s+(\d+)\s+(\d+\.?\d*)\s*([NEWS])\s*$/,
    fields: [4, 1, 2, 3, 8, 5, 6, 7],
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant