Hello,
A) Do you mean the overall geofencing zone location or the unit that is in the location?
If the answer is the overall location - the script needs to edit uci configuration to update geofencing zone on your desired options as in:
Let's say we have a zone with a name "zone_name". We get "gps" uci file "geofencing" section with name "zone_name" and by gathered info update options:
But this also needs to restart the process to update the geofence location values - so it is required to restart "gps" process (look EX. 1).
If it's to update units info for geofence the only option I could think of is to restart the "gps" process as in restart the process:
(EX. 1)
/etc/init.d/gpsd restart
However doing this wouldn't create zone check event trigger. This option is checked on unit's location change to the geofencing zone radius and as the process is rebooted it reinitialize the units location values thus to create event trigger unit's location has to be checked while the program is executing.
The reason is "gps" process gather's geofencing information only on the start of the process.
B) Do you mean the overall gps process or only the logging?
If it's overall gps process the initialization script has to be edited to also check if the ignition value has changed to start the process. Because of this the process has to be checked periodically to find out if ignition value has changed.
Initialization script is at "/etc/init.d/gpsd"
If you mean only the logging for the given example script - you only need to check the ignition state to know if it's worth to gather needed logged info from "gps" process.
C) This part is for asking via what I/O is the ignition connected that is DIGITAL1 or DIGITAL2 or ANALOG?
Regards,
Giedrius