doppler.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'package:fis_measure/interfaces/date_types/matrix.dart';
  2. import 'package:fis_measure/interfaces/date_types/point.dart';
  3. import 'package:fis_measure/interfaces/process/physical_coordinates/physical_coordinate.dart';
  4. import 'package:vid/us/vid_us_physical_coordinate.dart';
  5. class DopplerPhysicalCoordinate implements ITimeMotionPhysicalCoordiante {
  6. late final double _max;
  7. late final double _min;
  8. late final double _sweepSpeed;
  9. late final double _baseLine;
  10. DopplerPhysicalCoordinate(
  11. VidUsDopplerPhysicalCoordinate vidData,
  12. ) {
  13. _max = vidData.max;
  14. _min = vidData.min;
  15. _sweepSpeed = vidData.sweepSpeed;
  16. _baseLine = vidData.baseLine;
  17. }
  18. double get baseLine => _baseLine;
  19. @override
  20. double get max => _max;
  21. @override
  22. double get min => _min;
  23. @override
  24. double get sweepSpeed => _sweepSpeed;
  25. @override
  26. DPoint convert(DPoint point) {
  27. final point2 = _transform(point);
  28. return point2;
  29. }
  30. DPoint _transform(DPoint point) {
  31. var matrix = DMatrix();
  32. DPoint point2 = point;
  33. matrix.multiplyPoint(point2);
  34. return point2;
  35. }
  36. @override
  37. DPoint convertBack(DPoint point) {
  38. return point;
  39. }
  40. }