Comments (4)
or better yet...
static inline time_t makeTime(tmElements_t &TimeElements) { return timegm(&TimeElements); }
from nmea0183.
a quick grep of the code shows localtime and mktime in other places. Might be a good to review the code for timezone issues.
from nmea0183.
I have to check - it is not that simple. In early days Arduino tim support was, what it was. It is important that any change does not cause incompamtibility to early versions so that it would suddently change behaviour in existing installations.
from nmea0183.
Arduino environment does not have timezone so that can not be used. I could bring timezone to library by with:
int32_t tNMEA0183Msg::GetTimeZone() {
tmElements_t tme;
SetYear(tme,1970);
SetMonth(tme,1);
SetDay(tme,2);
SetHour(tme,0);
SetMin(tme,0);
SetSec(tme,0);
return (int32_t )makeTime(tme)-SECS_PER_DAY;
}
If mktime implementation would have timezone in future also in Arduino, this should then work. Could you test that?
As addition there could be compiler definition
#if defined(linux)||defined(__linux)||defined(linux)
return timezone;
#else
...
from nmea0183.
Related Issues (20)
- MWV True wind != Theoretical wind HOT 2
- LatLonToDouble(const char *data, const char sign) return 0 instead NA when given "" HOT 1
- Added GSV parser HOT 3
- ParseDPT, DBS or DBK missing HOT 4
- Duplicate definitions of the NMEA2000 object HOT 2
- NMEA checksum should accept lowercase HOT 2
- Parsing NMEA messages should be robust against to much fields HOT 5
- Missing class name for breaktime in NMEA0183Messages.cpp and missing macro in NMEA0183Msgs.h HOT 1
- Unit problem in ROT (and others?) HOT 1
- RMC sentence missing field 12, Status - NMEA v2.3 and later HOT 2
- glonass HOT 1
- Use library to only parse sentence HOT 1
- Checksum use ? (Always ON?) HOT 6
- HDG,HDM,HDT conversion to 127250 (and reverse conversion in N2kDataToNMEA0183)
- Basic Issue HOT 25
- RMC sentence field GPS time missing leading zeros HOT 4
- Question: how to use NMEA0183ParseGSV_nc HOT 2
- Leading zeros missing in RMC HOT 4
- Any way to display the Library version number for reference? HOT 7
- Improvement to allow correct Parsing of VHW STW data for NASA Electromagnetic Log
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nmea0183.