Syntax
int PCMSReduceTrip(PCMServerID serv, const char *filePath, int colTruckId, int colTruckIdLen, int colTime, int colTimeLen, int colDate, int colDateLen, int colLatLong, int colLatLongLen, int hourWindow, double maxMilesOffRoute, bool highwayOnly)
Parameters
PCMServerID serv – The PC*MILER server ID.
const char *filePath – The path/file name of the file containing the trip information to be input.
int colTruckID and int colTruckIdLen – The starting column (counting from 1) and the number of characters of the truck ID field in the input file.
int colTime and int colTimeLen – The starting column and number of characters in the time column of the input file. Used to calculate “layovers.”
int colDate and int colDateLen – The starting column and number of characters in the date column which contains the date stamp associated with the readings. This will be put on the report and is not used in calculations.
int colLatLong and int colLatLongLen – The starting column and number of characters in the latitude/longitude column which contains the latitude/longitude readings for the trip.
int hourWindow – This parameter is provided by the user to define the number of hours after the start of a trip that force a break and a new trip.
double maxMilesOffRoute – Defines the number of miles that latitude/longitude pings can deviate from the calculated route before the route is recalculated. Default is 2.0.
bool bHighwayOnly – True for highway routing or False for street-level routing. (Defaults to true.)
Description
Allows Connect to receive a large file containing latitude/longitude points and derive trip information from. This API is most frequently used by external programs that calculate distances between GPS pings. Please note the following:
- Any stop over the number of hours input for the same truck ID is considered a new trip.
- The output file name will be [input file].STA
- The output file will contain a header of truck ID, start date, and end date – that will be followed by the output of a traditional State/Country report (minus its header and footer), i.e. miles and states.
Return Values
Supported Since: PC*MILER Connect 20
Category: Trip Management