I'm not sure I understand correctly but the actual fertile days and ovulation seams to be one day off compared to future estimation.
I think dayofcycle may be incremented to soon, or should be used instead of day in type calculation.
for (int day = dayofcycle; day < length; day++) {
datePrevious.add(GregorianCalendar.DATE, 1);
dayofcycle++;
int type;
if (day == ovulationday) {
// Day of ovulation
type = DayEntry.OVULATION_PREDICTED;
} else if (day >= this.cycleShortest - luteallength - 4
&& day <= this.cycleLongest - luteallength + 3) {
// Fertile days
type = DayEntry.FERTILITY_PREDICTED;
} else {
// Infertile days
type = DayEntry.INFERTILE_PREDICTED;
}
I'm not sure I understand correctly but the actual fertile days and ovulation seams to be one day off compared to future estimation. I think dayofcycle may be incremented to soon, or should be used instead of day in type calculation.