How will NASA's software for autonomous navigation in cis-lunar space work?

NASA news item NASA Funds CubeSat Pathfinder Mission to Unique Lunar Orbit says:

The pathfinder mission represents a rapid lunar flight demonstration and could launch as early as December 2020. CAPSTONE will demonstrate how to enter into and operate in this orbit as well as test a new navigation capability. This information will help reduce logistical uncertainty for Gateway, as NASA and international partners work to ensure astronauts have safe access to the Moon’s surface. It will also provide a platform for science and technology demonstrations.

“This is an exciting opportunity for NASA to aggressively push forward towards the Moon in partnership with several American small businesses as a vanguard to Artemis and sustained human presence beyond low-Earth orbit,” said Jim Reuter, associate administrator for NASA’s Space Technology Mission Directorate. “This mission is highly ambitious in both cost and schedule – and taking that deliberate risk is part of the objective of this mission – alongside the rapid technological advancement in cislunar navigation and the opportunity to verify orbital trajectory assumptions and retire unknowns for future missions.”

The 12-unit CubeSat is about the size of a small microwave oven. Onboard is a communications system capable of determining how far CAPSTONE is from NASA’s Lunar Reconnaissance Orbiter and how fast the distance between the two spacecraft is changing. The inter-spacecraft information will be used to demonstrate software for autonomous navigation, allowing future missions to determine their location without having to rely exclusively on tracking from Earth.

"software for autonomous navigation, allowing future missions to determine their location without having to rely exclusively on tracking from Earth" is interesting to me. According to the answers to Can the James Webb Space Telescope basically manage its own orbit if necessary? the JWST won't know where it is or be able to self-station-keep without regular two-week astrometry and commands from Earth.

Of course by the time JWST is actually launched... :-)

Question: How will this demonstration of NASA's software for autonomous navigation in cis-lunar space work? What exactly will it use as inputs? What will it provide as outputs? (i.e. where it is vs where another spacecraft is).

• I've included the deep-space tag since we generally use it for cis-lunar and beyond, anything that isn't LEO, MEO, GEO or HEO. Technically an Earth-Moon halo orbit is a high orbit around the Earth that's in 1:1 resonance with the moon, but I digress... – uhoh Mar 9 at 3:08
• By using a lot of mathematics – JCRM Mar 9 at 7:55