trackFlag = 1;
if ((trackFlag & 1) == 1) {
// new track
trackPoints = new ArrayList<NavigationPosition>();
Wgs84Route track = createRoute(Track, null, trackPoints);
result.add(track);
trackPointNo = 1;
// trackname = time of first point
NavigationPosition newPoint = createWaypoint(time, latitude, longitude, altitude, 0, true);
track.setName(createDateFormat(TRACK_NAME_DATE_FORMAT).format(newPoint.getTime().getTime()));
}
if ((trackFlag & 2) == 2) {
// track pushpoint
if (pushPoints == null) {
pushPoints = new ArrayList<NavigationPosition>();
Wgs84Route points = createRoute(Waypoints, "Pushpoints", pushPoints);
result.add(points);
}
pushPoints.add(createWaypoint(time, latitude, longitude, altitude, pushPointNo++, false));
}