Rev 92 | Rev 95 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 92 | Rev 93 | ||
---|---|---|---|
Line 602... | Line 602... | ||
602 | /* Calculate position deviation from ranged target */ |
602 | /* Calculate position deviation from ranged target */ |
Line 603... | Line 603... | ||
603 | 603 | ||
604 | // calculate deviation of current position to ranged target position in cm |
604 | // calculate deviation of current position to ranged target position in cm |
605 | if(GPS_CalculateDeviation(&(GPSData.Position), &RangedTargetPosition, &CurrentTargetDeviation)) |
605 | if(GPS_CalculateDeviation(&(GPSData.Position), &RangedTargetPosition, &CurrentTargetDeviation)) |
606 | { // set target reached flag of we once reached the target point |
606 | { // set target reached flag of we once reached the target point |
607 | if(!(NCFlags |= NC_FLAG_TARGET_REACHED) && (CurrentTargetDeviation.Distance < GPS_TargetRadius)) |
607 | if(!(NCFlags & NC_FLAG_TARGET_REACHED) && (CurrentTargetDeviation.Distance < GPS_TargetRadius)) |
608 | { |
608 | { |
609 | NCFlags |= NC_FLAG_TARGET_REACHED; // set target reached flag |
609 | NCFlags |= NC_FLAG_TARGET_REACHED; // set target reached flag |
610 | } |
610 | } |
611 | // implement your control code here based |
611 | // implement your control code here based |