When Asger Christensen started farming there were 40,000 dairy farmers in Denmark.
Now there are only 3000.
This is a family farm, where they grow maize and wheat, as well as raising cattle. The Christensens bought it in 1982 from Mrs Christensen's parents, and it has been in the family since 1760.
They are survivors in an industry that has been squeezed hard. Dairy farming has come under intense pressure around the world in recent years.
Retail giants have demanded the wholesale price of milk fall in many countries, making it more difficult for smaller producers to make a living. Falling sales in the United States in particular has also had an impact.
All of which means that anything that can help maximise profits while maintaining a happy, productive herd of cows could mean the difference between healthy profits and the loss of a livelihood.
Till the cows come home
For the past eight months, Mr Christensen has been involved in trialling GEA CowView, technology that lets him track the movement of every animal in his herd.
"You can see how long the cows are lying down, you can see how many hours the cow sleeps, how long the cow is walking round, and it tells me a little bit how the cow is feeling, its welfare," he says.
"If a cow is lying down too long, maybe it's sick. And on my iPhone I can see where the cow is in the stable."
Each cow wears a special collar, fitted with a wireless RTLS (real time locating system) tag. The tags are read several times a second by sensors fitted in a grid in the roof of their barn.
The data is sent from the sensors to a hub, where the cow's every movement is collated and analysed using complex behavioural algorithms.
From this, the system can tell the farmer via real time alerts delivered to his smartphone whether the cow is ill, or is in heat and ready to be inseminated.
"You can see in the system when a cow is beginning to be not so happy. The system can tell me two whole days before I can see with my own eyes if the cow is sick," says Mr Christensen.
"If you can help the cows two days before, it's money, because the cow, not being so sick is easier to treat."
The system also lets him find that cow quickly.
"If I touch cow number 5022 on my iPhone, about two seconds later I can see where the cow is," he says.
GEA Farm Technologies' Keld Florczak is the man behind the project.
"A cow is a herd animal, so she will try and hide her weaknesses as much as possible, but she can't hide her changes in behaviour," he says.
"But a farmer might not see change in behaviour because there is no physical sickness."
When a tag is fitted it takes 6-10 days to build up a database of the animal's behaviour, and the sensors have a range of up to 600 metres.
Cows are creatures of habit, according to Mr Florczak.
"If she can, she will choose to lie down for the same amount of time, eat the same amount and walk the same distance," he says.
"If a cow is coming into heat she will start to walk more, she will start to socialise more with the other cows, and she will be out of her cubicle,"
"She needs the same amount of food, but she will be too active to stay there and eat, she will walk to the feeding table and then walk out to play with her female colleagues."
And equally a lack of activity can indicate illness or lameness.
"Lameness is a huge cost to farmers. And if he identifies a sick cow he will have saved the cow, because the moment she has a physical sickness or a fever it's already too late."
The system is being used in Denmark, Germany and the Netherlands - and is launching in the UK and US this month. Mr Florczak estimates it should pay for itself in one to two years.
CowView uses a type of RFID (radio frequency identification) called UWB (ultra-wideband) technology.
"One of the challenges we had in the beginning was finding a technology that was able to give us the triangulation or accuracy that was good enough," he says.
"Until then we have been within several metres. And that is not enough to identify her changes in behaviour."
The system is now accurate to within 30-50cm. UWB also uses relatively little power, giving the tags a shelf life of seven years.
RFID technology is nothing new in farming, but it has traditionally been used to track animals as they move from farm to farm and into the food chain, and to prevent theft.
What makes these tags different is that they are active rather than passive - they transmit signals rather than waiting to be read.
The UWB tags are supplied by RFID and location specialists Zebra Technologies.
"The unique part about our solution as it works with GEA is ... UWB which is ultra-wideband. And all UWB means is it blinks really quick. That's all. It just blinks really fast," says Zebra's Jill Stelfox.
"And if you are talking about a moving cow, even though in theory they move kind of slow, you want the rate of collecting information to happen very quickly."
While a cow will happily wear a collar, pigs have a very different world view.
"We developed an ear tag, because for sows you can't use anything else, on the neck or leg because they destroy them," says MKW Electronics founder Wolfgang Auer.
"We are the first company to do this with breeding sows."
The Smartbow system also uses RTLS technology to track animal behaviour, and is designed for use with grazing animals including cows. The Austrian company has taken a slightly different approach to GEA.
The sensors operate at a frequency of 2.4ghz, tracking the animals every second. It has a range indoors of 30-100 metres and outside 500 metres. It will tell you where an animal is to within 1.2 metres.
This technology is generally cheaper than UWB - but is less accurate, has a shorter range and is more power-hungry.
The focus for MKW is analytics - and cost. Mr Auer estimates the system should pay for itself in under a year.
"I think accuracy of one metre is enough, what we are doing is in pattern recognition," he says.
"I'm a farmer myself, I have cows at home, and I worked many years at a company that made feeding systems, so I know that the price has to be very low."
The system is accessed through work management software that is accessible from a smartphone, tablet or on a PC.
"It doesn't need an internet connection, the system is running at the farm and not in the cloud. The farmer can also connect from outside via the internet to his server," says Mr Auer.
"I think the technology is very strong," says Raghu Das of market research firm IDTechEx, an agricultural RFID specialist.
"And there is a range of options available. Some do ultra-wideband which gives you high precision in terms of location, but usually, not always, that comes at a higher price point than others which are less accurate.
"So there are a few different technology options."
A reluctance in some parts of the farming industry to adopt new technology will have to be overcome, says Mr Das.
"It is still fairly embryonic with RTLS. I think the main differentiation is performance versus cost generally," according to Mr Das.
"I think it will depend on a case by case basis, because where you have a very dense environment with a lot of cattle, then you may want UWB, or if it is an open field and not very much cattle, then the cheaper system may do."
It's probably just as well few cows have deep concerns about privacy.