Skip to content

Feature/punchingtest#1174

Open
lukaskett wants to merge 4 commits into
Quick-Box:mainfrom
lukaskett:feature/punching-test
Open

Feature/punchingtest#1174
lukaskett wants to merge 4 commits into
Quick-Box:mainfrom
lukaskett:feature/punching-test

Conversation

@lukaskett

Copy link
Copy Markdown
Collaborator

Added new service called Punching Test that generates random read out data without read-out unit connected. Useful for testing, QE training, ...

Inspired by MeOS.

image image image

@fvacek fvacek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is use-case for this feature?

{
using Super = ServiceSettings;

QF_VARIANTMAP_FIELD2(int, p, setP, unchInterval, 10) // seconds between ticks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please tell your AI not to add unnecessary spaces to code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on Claude configuration of QE project based on your code reviews, thanks.

}
int si_check_sec = toSiSec(abs_start_ms - check_offset_sec * 1000);

// Straight-line distance in metres between two WGS-84 points (Haversine)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have already

namespace {
int latlng_distance(double lat1, double lng1, double lat2, double lng2)
{
	/// http://www.movable-type.co.uk/scripts/latlong.html
	if(qFuzzyIsNull(lng2 - lng1) && qFuzzyIsNull(lat2 - lat1))
		return 0;
	auto deg2rad = [](double deg) {
		static constexpr double PI = std::numbers::pi;
		return deg * PI / 180;
	};
	lat1 = deg2rad(lat1);
	lat2 = deg2rad(lat2);
	lng1 = deg2rad(lng1);
	lng2 = deg2rad(lng2);
	double x = (lng2 - lng1) * std::cos((lat1 + lat2) / 2);
	double y = (lat2 - lat1);
	static constexpr double R = 6371000;
	double d = std::sqrt(x*x + y*y) * R;
	return static_cast<int>(std::ceil(d));
}
}

please unify both functions

@lukaskett

Copy link
Copy Markdown
Collaborator Author

what is use-case for this feature?

As mentioned above, for testing/developing and also QuickEvent trainings - it simulates read out process with unknown cards as well.

Get the startlist data is simple - you e.g. import an event from Oris, create basic courses and draw the startlist.

But to get the results it's more complicated - you need the readout unit. This service should help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants