Using the internal GNSS/IMU
Below we cover the basics of the internal GNSS/IMU for CANedge variants that support this.
Install the device
The CANedge incl. GNSS/IMU relies on an active GPS antenna in order to provide valid GPS-based signals. The GPS antenna should be installed with clear visibility to the sky.
To make use of IMU data (e.g. acceleration rates), you must also ensure that the CANedge itself is installed and oriented correctly. See the Docs (Configuration/GNSS).[1]
DBC decode the data
The internal GNSS/IMU data is recorded in ‘CAN Channel 9’, an internal pseudo channel. To decode the raw GNSS/IMU CAN frames, use the DBC file from the Docs (Internal signals section). The DBC file is also included below.
Note that most software tools (asammdf GUI, Python API, …) support loading multiple DBC files, so that you can in parallel load DBC files relating to CAN Channel 1 and/or 2.
Reduce file size
By default, all GNSS/IMU messages are broadcast at the maximum frequency. This can quickly increase your log file size and we recommend that you filter/prescale the data to only record what you need at the frequency required. You can do so via the CAN INTERNAL section of the Configuration File. For details on filters/prescalers, see our section on reducing file size.
Enable sensor fusion
If your CANedge is installed in an automotive you can enable sensor fusion. This will greatly enhance accuracy, reduce signal noise and even let you retain a fix in GNSS hostile areas such as parking lots, mines, tunnels etc.
To enable sensor fusion in your Configuration File, selected the advanced view and set the ‘Dynamic platform model’ to Automotive and ‘Sensor fusion’ to Enabled. For most use cases, you can leave the IMU-mount alignment angles at their default values (with ‘Method’ set to Manual)[2].
In addition, you should align the device correctly as described in the CANedge1 Docs GNSS alignment section. In simple terms, this can be achieved in a car by installing it in your trunk with the DB9 connectors pointing towards the left wheel.
Use GPS speed to start/stop logging/transmission
A common way to start/stop your CANedge logging and transmission is by using a speed signal from the CANedge internal GPS/IMU. This is useful to e.g. avoid battery drainage when a transmitting device remains powered on while the vehicle ignition is off - or simply to only record data when a vehicle is actively driving.
Below we provide a ‘partial’ Configuration File, which starts logging/transmission on CAN1/CAN2/CAN9 when the Speed signal is above 0.2 m/s - and stops when below 0.19 m/s. You can load this into your own Configuration File with the partial config loader tool.[4]
Use GPS time to sync CANedge RTC
The CANedge real-time clock (RTC) can be synchronized via a CAN message. This minimizes drift and can be useful e.g. in ensuring that the RTCs of multiple CANedge units stay in sync.
The CANedge Docs contain a detailed example on how to configure this. For a ‘quick start’ you can use below partial config file, which you can load via the partial config loader tool. This syncs the CANedge RTC based on the internal GPS Epoch signal when TimeConfirmed is true[3].
Output internal data onto CAN1/CAN2 (e.g. GPS/IMU)
With FW 01.09.01+ you can route data from CAN1/2/9 and LIN1/2 onto CAN1/2. This e.g. allows you to use the CANedge as a GPS-to-CAN module by outputting the internal GPS/IMU messages to your CAN bus. You can also use this to route the internal ‘CAN heartbeat’ onto e.g. CAN1.
Below is a step-by-step guide:
Ensure that the source channel reception state is set to ‘Enable’
Ensure that the source message is recorded by your CAN ID filters
Ensure that the output channel transmission state is set to ‘Enable’
Ensure that the output channel ‘Mode’ is set to ‘Normal’
Ensure that the output channel bit-rate is fixed (i.e. not auto-detection)
In the ‘Routing’ tab click the ‘+’ to add a new rule
Add a name (e.g. ‘GnssPosition’) and source (e.g. ‘CAN-internal’)
Ensure ‘State’ is enabled and ‘Log’ is disabled (except if debugging)
Set the source ID format and ID to match the source message (e.g. ‘11-bit’ and ‘67’)
Specify the output channel ID format and ID as per your preference (e.g. ‘11-bit’ and ‘507’)