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

Add Label 24 / Parsing #166

Merged

Conversation

makrsmark
Copy link
Collaborator

@makrsmark makrsmark commented Oct 21, 2024

Normalize eta and airports

  • eta can be seconds in day (tod) or seconds since epoch
  • airports can be icao or iata

- eta can be seconds in day (tod) or seconds since epoch
- airports can be icao or iata
@makrsmark makrsmark changed the title Normalize eta and airports Add Label 24 / Parsing Oct 21, 2024
@makrsmark
Copy link
Collaborator Author

I might split this up - I did the eta/airport normalization for label 5Z but didn't realize i had Label 24 work in here

Copy link
Contributor

@kevinelliott kevinelliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking, but I think that icao leaves a little to be desired and perhaps being more descriptive would be good.

expect(decodeResult.formatted.items[1].code).toBe('ORG');
expect(decodeResult.formatted.items[1].label).toBe('Origin');
expect(decodeResult.formatted.items[1].value).toBe('KJFK');
expect(decodeResult.formatted.items[2].type).toBe('destination');
expect(decodeResult.formatted.items[2].type).toBe('icao');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not instead do destination_icao?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i'm trying to make the item as follows
type - kind of thing it is - time of day, time since epoch, icao code, etc
code - unique identifier for what it is
label - display of what it is
value - display of the actual value

so in this case it's
type: icao (4-character airport code)
code: DST
label: Destination Airport
value: KUZA

Open to suggestions. will keep this open to discuss

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right here. Maybe we need an additional element called name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmm - i see the label as the "human name" and code as the "computer name" and the type as a "units". IDK, it's gotten messy and i tried to commandeer type because 3 variations of "destination" or any other value seemed excessive

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wrote this and then there's also the raw value. sigh

@makrsmark makrsmark merged commit 811f55a into airframesio:master Oct 22, 2024
3 checks passed
@makrsmark makrsmark deleted the feature/normalize-eta-airports branch October 22, 2024 11:55
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

Successfully merging this pull request may close these issues.

2 participants