Skip to content
helpers_externals.cc 1.46 KiB
Newer Older
#include "LibHelpers_Functions.hh"
#include <math.h>

#include "base_time.hh"
#include "loggers.hh"

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define earthRadius 6378137.0L
#define rbis = ((double)(earthRadius * M_PI / 180))

namespace LibHelpers__Functions {

  /**
   * @desc    This external function gets the current time since 01/01/1970 in UTC format
   * @return  The current time since 01/01/1970 in UTC format in milliseconds
   * @see     fx_getCurrentTimeUtc() return UInt64
   */
  INTEGER fx__getCurrentTimeUtc() {
    INTEGER i;
    i.set_long_long_val(base_time::get_instance().get_current_time_ms());
    loggers::get_instance().log_msg("<<< fx__getCurrentTimeUtc: ", i);
    return i;
  }
  /**
   * @desc    Gets the Minute of current UTC year
   * @return  MinuteOfTheYear - tenths of a second in the current or next hour in units of 1/10th second from UTC time
   * @see     function f_getMinuteOfTheYear() return MinuteOfTheYear
   */
  INTEGER fx__getMinuteOfTheYear() {
    //	TODO: this is just a sceleton. fill in the function
    return 0;
  }

  /**
   * @desc    Gets the milliseconds point in the current UTC minute
   * @return  DSecond - The milliseconds point in the current UTC minute (0..60000)
   * @see     function f_getDSecond() return DSecond
   */
  INTEGER fx__getDSecond() {
    //	TODO: this is just a sceleton. fill in the function
    return 0;
  }

} // namespace LibHelpers__Functions