2D Kalman Filter Multiple Object Tracking

Some times we have following cases

  1. Where the variable of interest can only be measured indirectly.
  2. Measurements are available from various sensors but might be subject to noise.

We can use Kalman Filter for those cases, but remember, general Kalman Filter works well for objects/measurements changing at constant velocity or constant acceleration.

Linux Caddy Postgresql PHP - LCPP

Linux Caddy Postgresql PHP

Installation

Linux

Debian 11

Caddy
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
PHP
sudo apt update && sudo apt full-upgrade -y
sudo apt install php php-fpm php-cli php-gd -y
Postgresql
sudo apt install postgresql php-pgsql -y

Configuration

Caddy
sudo nano /etc/caddy/Caddyfile
php.acytoo.com {
	root * /var/www/php.acytoo.com
	log {
		output file /var/log/caddy/php.acytoo.com.log
	}
	encode gzip
	php_fastcgi unix//run/php/php7.4-fpm.sock
}

file_server vs php

C++ 进制

记录一下 C++ 中不同进制的表示方法。C++ 默认是 10 进制,需要注意的是,直到 C++ 14 时,二进制的 0b 表示法才被确定为标准,在 C++ 14 前,GCC 支持0b 的用法。

C/C++ 打印的精度

C++:

// setprecision example
#include <iostream>     // std::cout, std::fixed
#include <iomanip>      // std::setprecision
#include <iostream>

using namespace std;

void test_precision(double d) {
  const streamsize ss = cout.precision();  // get default precision
  cout << "default precision is " << ss << endl;
  cout << d << endl;
  cout << setprecision(5)  << d << endl;
  cout << fixed;
  cout << d << endl;
  cout << setprecision(6) << d << endl;
  cout << setprecision(7) << d << endl;
  cout << setprecision(8) << d << endl;
  cout.precision(1);  // Different way to set precision
  cout << d << endl;
  cout << defaultfloat << setprecision(ss);  // restore default precision
  printf("c way: %.2f\t%.15f\n", d, d);
}

int main() {
  double d = 12.123456789;
  test_precision(d);
  cout << endl;  // print new line
  d = 1.123456789;
  test_precision(d);
  cout << endl;  // print new line
  d = 0.5;
  test_precision(d);
  return 0;
}

上面代码的输出