pub fn contains_in_triangle(filename: &str, lat: f64, lon: f64) -> bool {
    // let start = get_current_time();
    let u = get_json_info(filename);
    let cor: Vec<Coordinates> = u.shape_coordinate;
    let point: Coordinates = Coordinates::new(lat, lon);
    let mut retval = false;
    display_bold(
        "Searching the vehicle in Polygon Fence, which is built with coordinates",
        Colour::Blue,
    );
    display(&format!("{:?}", cor), Colour::Blue);
    let mut str = "is out of the fence";
    if contains(&cor, &point) {
        str = "is inside the fence";
        retval = true;
    }
    display(
        &format!(
            "The {} positioned at latitude {}, longitude {}, {} ",
            u.vehicle, lat, lon, &str
        ),
        Colour::Black,
    );
    //  println!("The time taken for the execute method to perform this operation is {:?}", calculate_run_time(&start));
    retval
}
/// The function does the below
/// Reads the input file
/// Creates triangular fence based on the coordinates given in the input file
/// checks if the given coordinates in the function paramater is within the circular fence.
/// Prints if the coordinates are within or outside the fence
///The function the below parameters
/// filename -> contains the json file which contains the coordinates which is necessary to create the fence
/// lat and lon -> search coordinates
The function does the below
Reads the input file
Creates triangular fence based on the coordinates given in the input file
checks if the given coordinates in the function paramater is within the circular fence.
Prints if the coordinates are within or outside the fence
The function the below parameters
filename -> contains the json file which contains the coordinates which is necessary to create the fence
lat and lon -> search coordinates
The function does the below Reads the input file Creates triangular fence based on the coordinates given in the input file checks if the given coordinates in the function paramater is within the circular fence . Prints if the coordinates are within or outside the fence The function the below parameters filename - > contains the json file which contains the coordinates which is necessary to create the fence lat and lon - > search coordinates
pub fn contains_in_triangle(filename: &str, lat: f64, lon: f64) -> bool {
    // let start = get_current_time();
    let u = get_json_info(filename);
    let cor: Vec<Coordinates> = u.shape_coordinate;
    let point: Coordinates = Coordinates::new(lat, lon);
    let mut retval = false;
    display_bold(
        "Searching the vehicle in Polygon Fence, which is built with coordinates",
        Colour::Blue,
    );
    display(&format!("{:?}", cor), Colour::Blue);
    let mut str = "is out of the fence";
    if contains(&cor, &point) {
        str = "is inside the fence";
        retval = true;
    }
    display(
        &format!(
            "The {} positioned at latitude {}, longitude {}, {} ",
            u.vehicle, lat, lon, &str
        ),
        Colour::Black,
    );
    //  println!("The time taken for the execute method to perform this operation is {:?}", calculate_run_time(&start));
    retval
}
pub fn contains_in_triangle ( filename : & str , lat : f64 , lon : f64 ) -> bool { // let start = get_current_time(); let u = get_json_info ( filename ) ; let cor : Vec < Coordinates > = u . shape_coordinate ; let point : Coordinates = Coordinates :: new ( lat , lon ) ; let mut retval = false ; display_bold ( " " , Colour :: Blue , ) ; display ( & format ! ( " " cor ) , Colour :: Blue ) ; let mut str = " " ; if contains ( & cor , & point ) { str = " " ; retval = true ; } display ( & format ! ( " " u vehicle lat lon str ) , Colour :: Black , ) ; //  println!("The time taken for the execute method to perform this operation is {:?}", calculate_run_time(&start)); retval }
The function does the below
Reads the input file
Creates triangular fence based on the coordinates given in the input file
checks if the given coordinates in the function paramater is within the circular fence.
The function does the below Reads the input file Creates triangular fence based on the coordinates given in the input file checks if the given coordinates in the function paramater is within the circular fence .
filename
&str
lat
f64
lon
f64
filename
&str
lat
f64
lon
f64