41 return (
const char *)
"GPS Simulator";
56 static char ts[32] = {0};
57 struct tm *utc, *local;
62 utc = gmtime(&raw_time);
63 strftime(ts,
sizeof(ts),
"%Y-%m-%dT%H:%M:%S", utc);
66 local = localtime(&raw_time);
67 snprintf(ts,
sizeof(ts),
"%4.2f", (local->tm_gmtoff / 3600.0));
The GPSSimulator class provides a simple simulator that provide GPS Time and Location services.
IPState updateGPS()
updateGPS Retrieve Location & Time from GPS. Update LocationNP & TimeTP properties (value and state) ...
bool Connect()
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
const char * getDefaultName()
bool Disconnect()
Disconnect from device.
void setVersion(uint16_t vMajor, uint16_t vMinor)
Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.
void setDriverInterface(uint16_t value)
setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE....
INDI::PropertyNumber LocationNP
INDI::PropertyText TimeTP
void setState(IPState state)
std::unique_ptr< GPSSimulator > gpsSimulator(new GPSSimulator())