From LEO, a cubesat with several reasonable cell phone-like cameras (or better) can image the Earth and it seems straightforward for some standard pattern recognition algorithms to find the sunlit areas, remove white-ish clouds, look for edges between blue ocean and land, match patterns, and over time estimate its own orbit and generate its own ephemeris without a star camera or "help" from data from the ground.
Including the Sun's relative position to these images, and maybe the Moon, further refinement and an absolute time can be determined, all to some reasonable amount of accuracy. The cubesat needs a good map of the Earth, an epehemeris for Earth, Moon and Sun, and an elapsed time clock with a reasonably stable rate.
I've included the Sun, but with sufficiently good pattern data from the Earth, perhaps it would only be needed if absolute time needed to be determined for say downlink scheduling. I don't think the Earth's terminator is sufficiently sharp to infer the Sun's angle very accurately.
Patterns of city lights at night might be even better for this than daytime images, if the cameras had sufficient light collection and/or frame buffering to fight smearing.
Question: Has this been successfully demonstrated already in a cubesat? A non-GPS, non-starcam, non-uplink based self-position determination and self-ephemeris generation?
I'm Primarily interested in successful efforts by teams smaller than entire space agencies or governments, but those would be okay as well.
See this answer for some further/related background.