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

#![no_std] compatibility #9

Closed
squidpickles opened this issue Aug 25, 2022 · 3 comments
Closed

#![no_std] compatibility #9

squidpickles opened this issue Aug 25, 2022 · 3 comments
Assignees

Comments

@squidpickles
Copy link
Owner

Some thought will need to go into optimal buffer sizes given multi-part messages, and I would want to look at a better way of building up character data, but this seems doable given demand.

@elpiel
Copy link

elpiel commented Sep 10, 2022

Hello @squidpickles ,
In order to allow for no_std, I suppose you should:

  • remove the thiserror dependency (or replace the impl for the no_std environment)
  • disable default features for nom
  • remove any allocations (you can check the heapless crate) the only issue I see currently, is that in nmea we have a hard limit on message size of 102 characters. So we should see how to handle this for AIS messages.

@squidpickles
Copy link
Owner Author

Hi @elpiel,

Yes, I have started some work on this.

The message size limits do help, but AIS messages can be multipart; people have observed up to 10 parts combined into a single message. I've been thinking about the best way to do this, mainly because there are tradeoffs between covering most use cases efficiently and still having room for the extremes. heapless is a possibility, but still has the problem of needing to allocate larger blocks of memory than needed for the 95% case.

Likely, I'll do an alloc version that retains the Vec, and then see about what to do for no_std.

@elpiel
Copy link

elpiel commented Sep 10, 2022

people have observed up to 10 parts combined into a single message

Yes, we do have some combinations for GNSS message types in nmea too. Maybe we can incorporate the AIS message combination there too?!

I don't really know what messages we should combine though and what information can be collected from multiple messages.

I'm also open to suggestions for features in nmea to allow e.g. usage of ais messages only or gnss messages only.

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

2 participants