Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Conversation

@PaulZC
Copy link
Collaborator

@PaulZC PaulZC commented Apr 18, 2020

I'm proposing we replace ZED-F9P\Example9 with a new example showing how to use the HPPOSLLH functions using double. But this will only run on platforms like the Artemis which provide full support for 64-bit double. What say you?

@PaulZC PaulZC requested a review from nseidle April 18, 2020 08:27
@nseidle
Copy link
Member

nseidle commented Apr 19, 2020

This compiles for both Uno and Artemis. I think you should add a

if (sizeof(double) < 8) { Serial.println("This is a bad idea!"); } 

or something similar in there because the output looks just ok enough to use. But the Uno (that down converts doubles to 4 bytes) outputs some very invalid GPS coordinates.

I like this example a lot. There will be lots of folks who have a capable platform and just want the max float precision output.

Copy link
Member

@nseidle nseidle left a comment

Choose a reason for hiding this comment

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

Add check for doubles that are less than 8 bytes.

@PaulZC
Copy link
Collaborator Author

PaulZC commented Apr 19, 2020

Great suggestion - thanks!
Added. Tested on ATmega328P and Artemis. Merging shortly.

@PaulZC PaulZC merged commit e71059e into master Apr 19, 2020
@PaulZC PaulZC deleted the Example9_HPPOSLLH_Using_Double branch April 19, 2020 07:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants