-
Notifications
You must be signed in to change notification settings - Fork 197
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
NMEAdistance won't compile #142
Comments
The Latitude and Longitude in NMEAdistance are specified as LONG i.e. ( -253448688L, 1310324914L ) |
try this: Or this: Honestly i dunno which one is right, but they both compile for me. |
HI, thanks for your time.
Fails with:
NMEAdistance:56:1: error: 'base' does not name a type
base._lat = -253448688L;
NMEAdistance:57:1: error: 'base' does not name a type
base._lon = 1310324914L; // Ayers Rock, AU
Best regards
Greg
|
You need to put those lines in a function, maybe setup() function. Cannot
put code outside of a function.
…On Sun, Aug 2, 2020, 1:04 AM mccgregory ***@***.***> wrote:
HI, thanks for your time.
Fails with:
NMEAdistance:56:1: error: 'base' does not name a type
base._lat = -253448688L;
NMEAdistance:57:1: error: 'base' does not name a type
base._lon = 1310324914L; // Ayers Rock, AU
Best regards
Greg
From: bzroom ***@***.***>
Sent: 02 August 2020 08:30
To: SlashDevin/NeoGPS ***@***.***>
Cc: mccgregory ***@***.***>; Author ***@***.***
>
Subject: Re: [SlashDevin/NeoGPS] NMEAdistance won't compile (#142)
try this:
//NeoGPS::Location_t base( -253448688L, 1310324914L ); // Ayers Rock, AU
NeoGPS::Location_t base;
base._lat = -253448688L;
base._lon =1310324914L; // Ayers Rock, AU
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <
#142 (comment)> ,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AKT2MCL7FB5PYKS4F3G62KDR6UIZBANCNFSM4PRVFQSQ>
. <
https://github.com/notifications/beacon/AKT2MCMIN53I27A5OJOEY63R6UIZBA5CNFSM4PRVFQS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE7FWCLQ.gif>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKVCN3TVIDWSPXAABPHXXDR6UMZLANCNFSM4PRVFQSQ>
.
|
Sorry, I’m a bit dim, and again thanks for your rapid feedback.
I don’t really understand…
You commented on the code, suggesting I try this:
showing the original line commented out, and three new lines.
I assumed I was just replacing that line with the three lines?
Are you suggesting I create another function to call the Location_t Function?
Apologies for my lack of understanding – I’m a bit old and thick!
Best regards
Greg
|
Post your whole code
…On Sun, Aug 2, 2020, 3:13 AM mccgregory ***@***.***> wrote:
Sorry, I’m a bit dim, and again thanks for your rapid feedback.
I don’t really understand…
You commented on the code, suggesting I try this:
showing the original line commented out, and three new lines.
I assumed I was just replacing that line with the three lines?
Are you suggesting I create another function to call the Location_t
Function?
Apologies for my lack of understanding – I’m a bit old and thick!
Best regards
Greg
From: bzroom ***@***.***>
Sent: 02 August 2020 11:06
To: SlashDevin/NeoGPS ***@***.***>
Cc: mccgregory ***@***.***>; Author ***@***.***
>
Subject: Re: [SlashDevin/NeoGPS] NMEAdistance won't compile (#142)
You need to put those lines in a function, maybe setup() function. Cannot
put code outside of a function.
On Sun, Aug 2, 2020, 1:04 AM mccgregory ***@***.*** <mailto:
***@***.***> > wrote:
> HI, thanks for your time.
>
>
>
> Fails with:
>
> NMEAdistance:56:1: error: 'base' does not name a type
>
>
>
> base._lat = -253448688L;
>
>
>
> NMEAdistance:57:1: error: 'base' does not name a type
>
>
>
> base._lon = 1310324914L; // Ayers Rock, AU
>
>
>
> Best regards
>
> Greg
>
>
>
> From: bzroom ***@***.*** ***@***.***>
>
> Sent: 02 August 2020 08:30
> To: SlashDevin/NeoGPS ***@***.*** <mailto:
***@***.***> >
> Cc: mccgregory ***@***.*** ***@***.***>
>; Author ***@***.*** ***@***.***%0b>
> >
> Subject: Re: [SlashDevin/NeoGPS] NMEAdistance won't compile (#142)
>
>
>
> try this:
> //NeoGPS::Location_t base( -253448688L, 1310324914L ); // Ayers Rock, AU
> NeoGPS::Location_t base;
> base._lat = -253448688L;
> base._lon =1310324914L; // Ayers Rock, AU
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub <
> #142 (comment)>
,
> or unsubscribe <
>
https://github.com/notifications/unsubscribe-auth/AKT2MCL7FB5PYKS4F3G62KDR6UIZBANCNFSM4PRVFQSQ
>
> . <
>
https://github.com/notifications/beacon/AKT2MCMIN53I27A5OJOEY63R6UIZBA5CNFSM4PRVFQS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE7FWCLQ.gif
>
>
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#142 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ABKVCN3TVIDWSPXAABPHXXDR6UMZLANCNFSM4PRVFQSQ
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <
#142 (comment)> ,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AKT2MCNRDUI2RZ7YZHO5M23R6U3ABANCNFSM4PRVFQSQ>
. <
https://github.com/notifications/beacon/AKT2MCJ54KNBQRPLMQAXMCDR6U3ABA5CNFSM4PRVFQS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE7FZP6A.gif>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKVCN5V7WIJ5WSJXZAGUHLR6U353ANCNFSM4PRVFQSQ>
.
|
😊
My whole code is the NMEAdistance code.
At this stage I’m trying NeoGPS out, learning what I can and can’t do.
It is a mini project in a bigger project – I just wanted something to display the accuracy of RTK GPS by displaying the distance between the BASE and the ROVER.
Regards
Greg
|
Can you figure out how not to copy the whole thread every time you reply? You need to put code inside a function. Ask a c++ programmer. You being dim is not an NeoGPS issue. Try some c++ forums or Discord. |
just use this one. FFS i gave you 2 examples: |
Thanks again.
just use this one. FFS i gave you 2 examples:
NeoGPS::Location_t base( (int32_t)-253448688L, (int32_t)1310324914L ); // Ayers Rock, AU
Sorry, the thread shows you gave me one example, which I commented on.
And then, now a new example – which appears to effective, it certainly compiles past that original error.
I now need to read some more of the NeoGPS documentation to fill out the other variables before I can fully compile it and then upload it and try it out.
Thanks for your time – hope you are not too dislocated by your efforts.
Oh, and the answers to your previous questions:
Can you figure out how not to copy the whole thread every time you reply?
Sorry - Yes – how is this?
You need to put code inside a function. Ask a c++ programmer.
I sort of expected “Example Code” to work as is – more or less?
As far as I can see the NMEAdistance code, which after all, is meant to be example code, is calling an overloaded function Location_t with two long parameters. Location_t doesn’t seem to cope with longs.
You being dim is not an NeoGPS issue. Try some c++ forums or Discord.
I feel that the issue is probably that this code has been tested on a DUE or something like that not an ESP32, so that the variable type (float, double, long needs resolving)
I can probably resolve this myself – it just takes longer – I was merely reaching out…
The reason I looked on this particular forum was perhaps to find out if other people had experienced this and I could then gently nudge me in the right direction.
Apologies if I upset you or wasted your time.
Best regards
Greg
|
Thank you very match, it help me. |
Trying to use NMEAdistance with an ESP32 but it fails to compile with the following error:
"NMEAdistance:54:51: error: call of overloaded 'Location_t(long int, long int)' is ambiguous"
It is referring to the line:
NeoGPS::Location_t base( -253448688L, 1310324914L ); // Ayers Rock, AU
If anybody could give me a pointer?
The text was updated successfully, but these errors were encountered: