If you’re working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux/Posix: timegm() Windows: _mkgmtime()
Author Archive for: kgodden
About Kevin Godden
This author has yet to write their bio.Meanwhile lets just say that we are proud Kevin Godden contributed a whooping 300 entries.
Entries by Kevin Godden
C++ code to estimate Solar Azimuth and Elevation given GPS position and time. For reasons that I won’t go into here I found it necessary to estimate Solar Azimuth and Elevation given GPS position and time. Now there is quite a bit of information on how to this on the old inter-web, none of it […]
Programming with time is difficult and error prone, for this reason I usually try to keep things in UTC so that I don’t have to worry about time zones and daylight saving offsets etc. When in C++ I mostly use the boost::ptime library but I was surprised recently about tricky it seemed to be to […]
Q: How can I speed up encoding & decoding of JPEG images on my embedded system?
How can I use libjpeg to encode directly to memory without using a file on my embedded system?
How can I get the Subversion (SVN) URL for a single file using Tortoise SVN?
So I had a problem, as part of an embedded software system I was working on I needed to periodically send some GPS information via UDP datagrams to other devices on the network – really simple stuff, transmit a string to an IP address on a given port, Fire And Forget, send a string from […]
Recently I was struggling to achieve very accurately synchronised camera and light triggers for a real-time computer vision project that I was working on, my original PIC embedded system for triggering everything using a PIC micro-controller had a fairly reliable accuracy of about 250us which was sufficient for a few years, but for various reasons […]
The Mod/Modulo (% in C) operator is incredibly useful in many situations, it calculates the remainder from an integer division, for example 10 Mod 3 = 1 (10 Div 3 = 3, 3 * 3 = 9, 10 – 9 = 1). Although you can happily call the % operator from your embedded C program […]
Python simulator of Monty Hall Probability Experiment
Address: 43 Churchgate, Wicklow, Co. Wicklow, Ireland.
Telephone: +353 87 2236429
- mktime() always uses local time zone and converts from UTC
- Estimate Solar Azimuth and Elevation given GPS position and time.
- Creating time_t value from a UTC date and time in C
- Speed up Encoding of JPEG images on Embedded System
- libjpeg example – encode JPEG to memory buffer instead of file
- Get the Subversion (SVN) URL for a file using Tortoise SVN?
- Fire-And-Forget wrapper for sending simple UDP data using boost::asio libraries
- Use PIC Timer2 not Timer0 for accurate Interval Timing on an Embedded system