Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Is it possible to change the VTQ config and add a new field definition there, for example: for a certain property I want to ingest Value, Timestamp, Quality, and Unit (of measure)?
For example we are currently setting only the Lat, Long, Altitude and date time, and I want to add 2 new field to store GPS accuracy and GSM strength in the same value stream.
Is it doable? Any lead is greatly appreciated.
Solved! Go to Solution.
Hello,
The VTQ structure is fixed, i.e. you can't add unit of measure to value, timestamp and quality. You'd need to create Properties for those extra parameters, i.e. "gpsPosition" of type LOCATION, "gpsAccuracy" and "gsmStrength", both of type NUMBER.
You can set all three of them at the same time, like this:
var props = Resources["InfoTableFunctions"].CreateInfoTable();
props.AddField({ name: 'gpsLocation', baseType: 'LOCATION' });
props.AddField({ name: 'gpsAccuracy', baseType: 'NUMBER' });
props.AddField({ name: 'gsmStrength', baseType: 'NUMBER' });
props.AddRow({
gpsLocation: { latitude: 1, longitude: 1, elevation: 0, units: 'WGS84' },
gpsAccuracy: 10.0,
gsmStrength: 0.5
});
me.SetPropertyValues({ values: props });
In this case all three will get recorded in the ValueStream simultaneously, in the same DB row.
/ Constantine
Hello,
The VTQ structure is fixed, i.e. you can't add unit of measure to value, timestamp and quality. You'd need to create Properties for those extra parameters, i.e. "gpsPosition" of type LOCATION, "gpsAccuracy" and "gsmStrength", both of type NUMBER.
You can set all three of them at the same time, like this:
var props = Resources["InfoTableFunctions"].CreateInfoTable();
props.AddField({ name: 'gpsLocation', baseType: 'LOCATION' });
props.AddField({ name: 'gpsAccuracy', baseType: 'NUMBER' });
props.AddField({ name: 'gsmStrength', baseType: 'NUMBER' });
props.AddRow({
gpsLocation: { latitude: 1, longitude: 1, elevation: 0, units: 'WGS84' },
gpsAccuracy: 10.0,
gsmStrength: 0.5
});
me.SetPropertyValues({ values: props });
In this case all three will get recorded in the ValueStream simultaneously, in the same DB row.
/ Constantine