Trying to read 2 Channel RC receiver Arduino Uno

I have a little project in wich i want to controll a tank using a FS-GT3C controller and a 3Ch receiver of wich i use 2 channels (channel 1 and 2)

for this im trying to read the PWM value from the signal pin wich goes between 1000 and 2000 pwm.

but when i read the PWM i get this as values

Ch1:1469|Ch2:1469|Ats:90|Bts:90|
Ch1:1448|Ch2:1455|Ats:90|Bts:90|
Ch1:1461|Ch2:1463|Ats:90|Bts:90|
Ch1:1464|Ch2:1448|Ats:90|Bts:90|
Ch1:1469|Ch2:1469|Ats:90|Bts:90|
Ch1:1468|Ch2:1468|Ats:90|Bts:90|
Ch1:1440|Ch2:1448|Ats:90|Bts:90|
Ch1:1461|Ch2:1463|Ats:90|Bts:90|
Ch1:1468|Ch2:1455|Ats:90|Bts:90|
Ch1:1468|Ch2:1469|Ats:90|Bts:90|
Ch1:1461|Ch2:1464|Ats:90|Bts:90|

in wich Ch1 is channel 1 PWM, Ch2 is Channel 2 PWM, Ats is what is send to the ESC (wich i dont have yet so i have micro servo’s connected now) and 90 is 0 speed 0 is full speed reverse and 180 is full speed forward.

I want to be able to make some code that does something like:
(Ch1 value -1000)/4 this should give a number from 0 to 200 wich i want to use to make 0 full reverse and 200 full forward and 100 stop.

but because my PWM value isnt read correctly i cannot make a code like this because it would go forward reverse stop forward reverse stop reverse all the time because the value is going up and down.

how can i fix this? i have this code now wich is good for testing with servo’s but i want to get more precise controlls later:

#include <Servo.h>

// Define Variables:
const int chA=5;  //Constant variables relating to pin locations
const int chB=6;

int ch1;  //Varibles to store and display the values of each channel
int ch2;

// Here i use Servo's library because an ESC works with the same signal as an Servo
Servo servoA;  //Servo 1
Servo servoB;  //Servo 2


void setup() {
  // put your setup code here, to run once:
  
// initialize serial communication at 9600 bits per second:
  Serial.begin(115200);
  // Set input pins
  pinMode(chA, INPUT);
  pinMode(chB,INPUT);
  
servoA.attach(2);      //Attach Servo to PWM Pin 2
servoB.attach(3);      //Attach Servo to PWM Pin 3

}

void loop() {
  // put your main code here, to run repeatedly: 
  // read the input channels
  int At;            //motor one throttle
  int As;            //motor one steering
  int Bt;            //motor two throttle
  int Bs;            //motor two steering
  
  int Ats;           //motor one throttle and steering
  int Bts;           //motor two throttle and steering
  
  ch1 = pulseIn (chA,HIGH);  //Read and store channel 1
  Serial.print ("Ch1:");  //Display text string on Serial Monitor to distinguish variables
  Serial.print (ch1);     //Print in the value of channel 1
  Serial.print ("|");
 
  ch2 = pulseIn (chB,HIGH);
  Serial.print ("Ch2:");
  Serial.print (ch2);
  Serial.print ("|");
//-----------------------------------------------------------------------------------------------
/*
if channel one value is between value one and value two
set AT and Bt to value X
values are same because this is just for forward and reverse with 3 times 90 so it stops when i release the throttle
*/
  if  (ch1 <= 1000)
  {
    At = 70;
    Bt = 70;
  }
  else if (ch1 > 1000 && ch1 <= 1100)
  {
    At=75;
    Bt=75;
  }
    else if (ch1 > 1100 && ch1 <= 1200)
  {
    At=80;
    Bt=80;
  }
    else if (ch1 > 1200 && ch1 <= 1300)
  {
    At=85;
    Bt=85;
  }
    else if (ch1 > 1300 && ch1 <= 1400)
  {
    At=90;
    Bt=90;
  }
    else if (ch1 > 1400 && ch1 <= 1500)
  {
    At=90;
    Bt=90;
  }
    else if (ch1 > 1500 && ch1 <= 1600)
  {
    At=90;
    Bt=90;
  }
  else if (ch1 > 1600 && ch1 <= 1700)
  {
    At=95;
    Bt=95;
  }
  else if (ch1 > 1700 && ch1 <= 1800)
  {
    At=100;
    Bt=100;
  }
  else if (ch1 > 1800 && ch1 <= 1900)
  {
    At=105;
    Bt=105;
  }
  else if (ch1 > 1900 )
  {
    At=110;
    Bt=110;
  }
//------------------------------------    Steering code
/*
steering works similar to the throttle but with - values so the tank can spin around
*/


  if  (ch2 <= 1050)
  {
    As = 20;
    Bs = -20;
  }
  else if (ch2 > 1050 && ch2 <= 1125)
  {
    As=15;
    Bs=-15;
  }
    else if (ch2 > 1125 && ch2 <= 1200)
  {
    As=10;
    Bs=-10;
  }
    else if (ch2 > 1200 && ch2 <= 1300)
  {
    As=5;
    Bs=-5;
  }
    else if (ch2 > 1300 && ch2 <= 1400)
  {
    As=0;
    Bs=0;
  }
    else if (ch2 > 1400 && ch2 <= 1500)
  {
    As=0;
    Bs=0;
  }
    else if (ch2 > 1500 && ch2 <= 1600)
  {
    As=0;
    Bs=0;
  }
  else if (ch2 > 1600 && ch2 <= 1700)
  {
    As=-5;
    Bs=5;
  }
  else if (ch2 > 1700 && ch2 <= 1775)
  {
    As=-10;
    Bs=10;
  }
  else if (ch2 > 1775 && ch2 <= 1850)
  {
    As=-15;
    Bs=15;
  }
  
  else if (ch2 > 1850 )
  {
    As=-20;
    Bs=20;
  }

  
//--------------------------------- adds steering and throttle signal together for easier calculation
  Ats = At + As;
  Bts = Bt + Bs;
 
  Serial.print ("Ats:");
  Serial.print (Ats);
  Serial.print ("|");
  
  Serial.print ("Bts:");
  Serial.print (Bts);
  Serial.println ("|");

//--------------------------------- checks if not bigger than 160 and not smaller than 5 so wont overspeed/overturn 
  if (Ats > 110)
  {
    Ats=110;
  }
  else if (Ats < 70)
  {
    Ats=70;
  }
//--------------------------------- checks if not bigger than 160 and not smaller than 5 so wont overspeed/overturn 
 
 if (Bts > 110)
  {
    Bts=110;
  }
  if (Bts < 70)
  {
    Bts=70;
  }
 
  //--------------------------------------------------------------- write value to ESC 
  servoA.write(Ats);
  servoB.write(Bts);
  //---------------------------------------------------------------
 

}

Usually the following two functions are useful when doing stuff like this

and

you can perform some kind of calibration and get a low (around a 1000) and a high( around 2000) then assign them through map

as for the stop problem, I think you could use a filter to smooth it out or use some kind of "dead zone" as

if its within between 54 - 46 set it to 50.

So what this code actually does (correct me if I'm wrong) is exactly what my code does but then in one simple bit of code?

But it does not solve the problem of the values floating from 1440 to 1469
so the stop value would be in
1435-1445 1445-1555 1555-1565 and 1565-1575 range

U got what I mean? Because the lowest number is 1440 it will be within the 1435-1445 section. While the higher number is in the 1565-1575 section.

And what i want to solve is that the arduino actually reads what is coming from the receiver signal pins without the jitter/floating.

I am sure that it is possible but I haven't found a way yet.