Skip to content

Conversation

@makrsmark
Copy link
Collaborator

@makrsmark makrsmark commented Jan 10, 2024

  • Adding checksum
  • Adding altitude
  • Removing timestamp, adding it to the waypoint
  • Removing regexes. now the the only special code is for variant 2
  • added test for message that was not parsing
  • added test for POS/ looking messages

- stripping off checksum for parsing
- Adding altitude
- Removing timestamp, no other messages use it. If we want it back, we should use the waypoint valid at field as it is in every variant (though missing year/month/day)
- Removing regexes. now the the only special code is for variant 2
- added test for message that was not parsing
@kevinelliott kevinelliott added the enhancement New feature or request label Jan 10, 2024
@kevinelliott
Copy link
Contributor

  • stripping off checksum for parsing

Perhaps there is value for retaining to an attribute for later. I could see validating the message once we figure out the checksum formula.

  • Removing timestamp, no other messages use it. If we want it back, we should use the waypoint valid at field as it is in every variant (though missing year/month/day)

What explicitly does the timestamp correlate to?

@makrsmark
Copy link
Collaborator Author

@kevinelliott - definitely on board for adding the checksum to the result, I just didn't because i didn't see a checksum pulled out anywhere else, so i didn't know the best way to add it to the formatted result

As for the timestamp, i took it out because i'm pretty sure it's a "data valid" flag for the adjacent field. The end of variant1is 185/TS215754,0921227A40 We're not sure what 185 is but /TS215754 I believe means "that data is valid at 21:57:54, and it lines up with the ,215754, that comes after the first waypoint. I believe THAT timestamp means either "i was at this position at 21:57:54' or "i reached the waypoint at 21:57:54". Variant 1 is special, because it also includes the DDMMYY as the last field. The other variants do not (i'm considering 1 and 3 the same). I'll do whatever, but i don't think the timestamp is a "message generated" timestamp. In the same message there's also AARON,220816,MOXEE in which I believe translates to "traveling to AARON with ETA 22:08:16 and then continuing to MOXEE"

@kevinelliott
Copy link
Contributor

@kevinelliott - definitely on board for adding the checksum to the result, I just didn't because i didn't see a checksum pulled out anywhere else, so i didn't know the best way to add it to the formatted result

I would think at minimum just putting the checksum into the raw data structure as a field that can be later pulled (note that while some users of this decoder, such as UIs, may never use it, backend Airframes may use it for historical storage and other things).

For formatted outputs, yeah, that can be skipped for sure.

As for the timestamp, i took it out because i'm pretty sure it's a "data valid" flag for the adjacent field. The end of variant1is 185/TS215754,0921227A40 We're not sure what 185 is but /TS215754 I believe means "that data is valid at 21:57:54, and it lines up with the ,215754, that comes after the first waypoint. I believe THAT timestamp means either "i was at this position at 21:57:54' or "i reached the waypoint at 21:57:54". Variant 1 is special, because it also includes the DDMMYY as the last field. The other variants do not (i'm considering 1 and 3 the same). I'll do whatever, but i don't think the timestamp is a "message generated" timestamp. In the same message there's also AARON,220816,MOXEE in which I believe translates to "traveling to AARON with ETA 22:08:16 and then continuing to MOXEE"

Interesting!

If we believe that the timestamp is correlated to confirmation of when a waypoint was either reached (or is forecasted/estimated to be reached), we should definitely capture and correlate with the waypoint. This helps to reconstruct the route according to what the airframe thought it did (versus what external systems measuring it thought it did).

@makrsmark
Copy link
Collaborator Author

I'll add checksum to the raw result. I'd like your opinion on how to represent this route timing information in the decodeResult before i move forward on that part, though, Maybe we can take it to discord or something.

@kevinelliott
Copy link
Contributor

kevinelliott commented Jan 11, 2024

I'll add checksum to the raw result. I'd like your opinion on how to represent this route timing information in the decodeResult before i move forward on that part, though, Maybe we can take it to discord or something.

Great!

Yeah we can chat on Discord any time.

Previously we have basically composed the raw structure as consistently as possible across decoder imps, but there has been no hard standard yet, mostly because there were only a few of us working on it before, and also because... discovery. But I think we could probably start forming stronger opinions around the raw/formatted/etc structures and the overall decoded result structure itself.

In the short term (for the sake of keeping things moving forward for this PR for example), I'd say an array of positions representing the route (named, apropos, route_points or similar), with each item being a position object, where this position describes one of the following:

  • a lat/lon pair + alt -- thus position.type = 'coord', position.latitude, position.longitude, position.altitude
  • a waypoint (aka fix) -- thus position.type = 'waypoint', position.waypoint
  • or some other positional format not yet described here
    with each of these including the timestamp if one exists.

I can already think of all sorts of issues with this, and I'm already second guessing (for example, thinking the type unnecessary, and to instead embed a sub object named by the type itself -- such as position.coord.latitude and position.waypoint.name. But I'd say, let's get something implemented (use your best judgement here) to get this merged.

Then we'll have to get together on Discord (with me and @andermatt64 and maybe even Fred) and hash out some standards. I think we could have a pretty lively (productive) convo.

- waypoint has a name, optional position, and optional time
- moved `decodeStringCoordinates` and `coordinateString` into utils class
There could be others that start with `POS/` but i haven't found any.
being explicit instead offailing

Also adding checksum to the result
});

decodeResult.decoded = true;
// Once we know what RF stands for, I feel comfortable marking this full
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ChatGPT thinks it might be "Route Fix" - i haven't found other messages that start with POS/ to know for sure

Copy link
Contributor

Choose a reason for hiding this comment

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

That seems likely!

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.

Nice work. Looks good to me.

});

decodeResult.decoded = true;
// Once we know what RF stands for, I feel comfortable marking this full
Copy link
Contributor

Choose a reason for hiding this comment

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

That seems likely!

@kevinelliott kevinelliott merged commit a0f1de3 into airframesio:master Feb 5, 2024
@makrsmark makrsmark deleted the h1-post-update branch February 26, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants