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

tN2kGNSStype incorrectly defined #443

Open
lsoltero opened this issue Jan 4, 2025 · 4 comments
Open

tN2kGNSStype incorrectly defined #443

lsoltero opened this issue Jan 4, 2025 · 4 comments

Comments

@lsoltero
Copy link
Contributor

lsoltero commented Jan 4, 2025

N2kTypes defines

enum tN2kGNSStype {
N2kGNSSt_GPS=0, ///< only GPS satellite network
N2kGNSSt_GLONASS=1, ///< only the GLONASS satellite network
N2kGNSSt_GPSGLONASS=2, ///< GPS + GLONASS satellite network
N2kGNSSt_GPSSBASWAAS=3, ///< GPS + WAAS correction satellite network
N2kGNSSt_GPSSBASWAASGLONASS=4, ///< GPS + GLONASS + WAAS correction satellite network
N2kGNSSt_Chayka=5, ///< Russia's Chayka system is like the erstwhile LORAN-C radio navigation architecture
N2kGNSSt_integrated=6, ///< integrated mode
N2kGNSSt_surveyed=7, ///< surveyed mode
N2kGNSSt_Galileo=8 ///< European Galileo satellite network
};

but these are off by one.

0 is undefined not GPS.
1 is GPS.. etc
and
15 is missing which is used for manual position reports where the position is manual entered.

@ttlappalainen
Copy link
Owner

Do yu mix tN2kGNSStype and tN2kGNSSmethod?

@ttlappalainen
Copy link
Owner

Ah, someone added AIS messages has mixed tN2kGNSStype. That should have not been used in AIS messages and there should be on type.

@lsoltero
Copy link
Contributor Author

lsoltero commented Jan 6, 2025

ah.. I think the issue really is that

struct tN2kAISAtoNReportData {

defined in N2kMessages.h defines

...

/**********************************************************************//**

  • \brief Type of electronic position fixing device
  • See \ref tN2kGNSStype
    */
    tN2kGNSStype GNSSType;

where it really should be tN2kGNSSmethod.

@lsoltero
Copy link
Contributor Author

lsoltero commented Jan 6, 2025

hm.. actually tN2kGNSSmethod does not work for the AIS types... and looking I see we have an issue with 129041, 129794

so I think a new type needs to be defined for the AIS GNS types.

I propose
enum tN2kAISGNSStype {
N2kAISGNSSt_Undefined=0, /// < default
N2kAISGNSSt_GPS=1, ///< only GPS satellite network
N2kAISGNSSt_GLONASS=2, ///< only the GLONASS satellite network
N2kAISGNSSt_GPSGLONASS=3, ///< GPS + GLONASS satellite network
N2kAISGNSSt_LORANC=4, ///< Loran-C
N2kAISGNSSt_Chayka=5, ///< Russia's Chayka system is like the erstwhile LORAN-C radio navigation architecture
N2kAISGNSSt_integrated=6, ///< integrated mode
N2kAISGNSSt_surveyed=7, ///< surveyed mode
N2kAISGNSSt_Galileo=8 , ///< European Galileo satellite network
N2kAISGNSSt_Internal=15. ///< Internal GNSS
};

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