// Next calls to loadMore() will retrieve measuresConsole.WriteLine("loading details");int progress;do {Console.Write(".");progress = dataset.loadMore();} while(progress < 100);// All measures have now been loadedList details = dataset.get_measures();foreach (YMeasure m in details) {Console.WriteLine(String.Format(logFmt,m.get_startTimeUTC_asDateTime().ToString(timeFmt),m.get_endTimeUTC_asDateTime().ToString(timeFmt),m.get_averageValue(), sensor.get_unit()));}You will find a complete example demonstrating how to retrieve data from the logger for eachprogramming language directly in the Yoctopuce library. The example can be found in directoryExamples/Prog-DataLogger.TimestampAs the Yocto-GPS does not have a battery, it cannot guess alone the current time when powered on.Nevertheless, the Yocto-GPS will automatically try to adjust its real-time reference using the host towhich it is connected, in order to properly attach a timestamp to each measure in the datalogger:• When the Yocto-GPS is connected to a computer running either the VirtualHub or anyapplication using the Yoctopuce library, it will automatically receive the time from thiscomputer.• When the Yocto-GPS is connected to a YoctoHub-Ethernet, it will get the time that theYoctoHub has obtained from the network (using a server from pool.ntp.org)• When the Yocto-GPS is connected to a YoctoHub-Wireless, it will get the time provided by theYoctoHub based on its internal battery-powered real-time clock, which was itself configuredeither from the network or from a computer• When the Yocto-GPS is connected to an Android mobile device, it will get the time from themobile device as long as an app using the Yoctopuce library is launched.When none of these conditions applies (for instance if the module is simply connected to an USBcharger), the Yocto-GPS will do its best effort to attach a reasonable timestamp to the measures,using the timestamp found on the latest recorded measures. It is therefore possible to "preset to thereal time" an autonomous Yocto-GPS by connecting it to an Android mobile phone, starting the datalogger, then connecting the device alone on an USB charger. Nevertheless, be aware that withoutexternal time source, the internal clock of the Yocto-GPS might be be subject to a clock skew(theoretically up to 0.3%).17.3. Sensor calibrationYour Yocto-GPS module is equipped with a digital sensor calibrated at the factory. The values itreturns are supposed to be reasonably correct in most cases. There are, however, situations whereexternal conditions can impact the measures.The Yoctopuce API provides the mean to re-caliber the values measured by your Yocto-GPS. Youare not going to modify the hardware settings of the module, but rather to transform afterwards themeasures taken by the sensor. This transformation is controlled by parameters stored in the flashmemory of the module, making it specific for each module. This re-calibration is therefore a fullysoftware matter and remains perfectly reversible.Before deciding to re-calibrate your Yocto-GPS module, make sure you have well understood thephenomena which impact the measures of your module, and that the differences between truevalues and measured values do not result from a incorrect use or an inadequate location of themodule.17. Advanced programming122 www.yoctopuce.com