Configure device geolocation
If the device has not been correctly and precisely calibrated, the geographic coordinates feature, on supported modules will, not work as expected. Remember to restart the device after applying settings.
This guide shows how to set the geolocation of a device in order to enable the Geographical Coordinate feature for the modules
- Fusion Tracker (and in extension Track Summary)
- Radar Motion Tracker
The device's real world geographical ISO 6709 position, heading and installation height must all be configured for Geographical Coordinate feature to work.
This guide uses the device Geolocation API.
Prerequisites
- A device that supports the Geographical Coordinate feature. See specific modules for a reference on device support. If a device has no module supporting the Geographical Coordinate feature the geolocation of the device can still be configured and may be used by other features on the device.
- cURL installed
Overview
The guide contains the following steps:
- Check the device current settings (optional)
- Set device settings
- Apply device settings
- Restart the device
Step 1 Check device settings (optional)
To check the device's current geographical location we use the following GET
method.
Don't forget to replace <device-ip>
, <user>
and <password>
where applicable.
curl --anyauth --user <user>:<password> -X 'GET' http://<device-ip>/axis-cgi/geolocation/get.cgi
<PositionResponse SchemaVersion="1.0">
<Success>
<GetSuccess>
<Location>
<Lat>55.718455642</Lat>
<Lng>013.220431302</Lng>
<Heading>0.000000</Heading>
</Location>
<StandardDevPosition>0.000000</StandardDevPosition>
<StandardDevHeading>0.000000</StandardDevHeading>
<Text/>
<ValidPosition>true</ValidPosition>
<ValidHeading>true</ValidHeading>
<ValidStandardDevPosition>false</ValidStandardDevPosition>
<ValidStandardDevHeading>false</ValidStandardDevHeading>
</GetSuccess>
</Success>
</PositionResponse>
To check the device's current heading and installation height we use the following GET
method.
curl --anyauth --user <user>:<password> -X 'GET' \
http://<device-ip>/axis-cgi/geoorientation/geoorientation.cgi?action=get
<OrientationResponse SchemaVersion="1.0">
<Success>
<GetSuccess>
<Tilt>2.000000</Tilt>
<InstallationHeight>1.000000</InstallationHeight>
<Roll>-1.000000</Roll>
<Heading>0.000000</Heading>
<StandardDevTilt>0.000000</StandardDevTilt>
<StandardDevInstallationHeight>0.000000</StandardDevInstallationHeight>
<StandardDevRoll>0.000000</StandardDevRoll>
<StandardDevHeading>0.000000</StandardDevHeading>
<ValidTilt>true</ValidTilt>
<ValidInstallationHeight>true</ValidInstallationHeight>
<ValidRoll>true</ValidRoll>
<ValidHeading>true</ValidHeading>
<ValidStandardDevTilt>false</ValidStandardDevTilt>
<ValidStandardDevInstallationHeight>false</ValidStandardDevInstallationHeight>
<ValidStandardDevRoll>false</ValidStandardDevRoll>
<ValidStandardDevHeading>false</ValidStandardDevHeading>
</GetSuccess>
</Success>
</OrientationResponse>
Step 2: Set device settings
To set the device's geographical position we use the following GET
method.
Don't forget to replace <device-ip>
, <user>
, <password>
, <device-latitude>
, <device-longitude>
, <installation-height>
and <installation-heading>
where applicable.
curl --anyauth --user <user>:<password> -X 'GET' \
http://<device-ip>/axis-cgi/geolocation/set.cgi?lat=<device-latitude>&lng=<device-longitude>
<PositionResponse SchemaVersion="1.0">
<Success>
<GeneralSuccess/>
</Success>
</PositionResponse>
To set the device's installation heading and height we use the following GET
method.
curl --anyauth --user <user>:<password> -X 'GET' \
http://<device-ip>/axis-cgi/geoorientation/geoorientation.cgi?action=set&inst_height=<installation-height>&heading=<installation-heading>
<PositionResponse SchemaVersion="1.0">
<Success>
<GeneralSuccess/>
</Success>
</PositionResponse>
Apply device settings
For the device to use the configured settings we need to apply the settings using this GET
method.
Don't forget to replace <device-ip>
, <user>
and <password>
where applicable.
curl --anyauth --user <user>:<password> -X 'GET' \
http://<device-ip>/axis-cgi/geoorientation/geoorientation.cgi?action=set&auto_update_once=true
<PositionResponse SchemaVersion="1.0">
<Success>
<GeneralSuccess/>
</Success>
</PositionResponse>
Step 4: Restart the device
Finally we restart the device using the following GET
method.
Don't forget to replace <device-ip>
, <user>
and <password>
where applicable.
curl --anyauth --user <user>:<password> -X 'GET' http://<device-ip>/axis-cgi/restart.cgi
<html>
<head>
<meta http-equiv="refresh" content="0;URL=/admin/restartMessage.shtml?server=<device-ip>">
</head>
<body></body>
</html>