cross Function

public pure function cross(r, v) result(rxv)

Cross product of two 3x1 vectors

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(3) :: r
real(kind=wp), intent(in), dimension(3) :: v

Return Value real(kind=wp), dimension(3)


Called by

proc~~cross~~CalledByGraph proc~cross vector_module::cross proc~angle_between_vectors vector_module::angle_between_vectors proc~angle_between_vectors->proc~cross proc~axis_angle_rotation vector_module::axis_angle_rotation proc~axis_angle_rotation->proc~cross proc~box_product vector_module::box_product proc~box_product->proc~cross proc~bplane bplane_module::bplane proc~bplane->proc~cross proc~ucross vector_module::ucross proc~bplane->proc~ucross proc~calculate_bplane_data bplane_module::calculate_bplane_data proc~calculate_bplane_data->proc~cross proc~cartesian_to_equinoctial modified_equinoctial_module::cartesian_to_equinoctial proc~cartesian_to_equinoctial->proc~cross proc~compute_vinf_vectors bplane_module::compute_vinf_vectors proc~compute_vinf_vectors->proc~cross proc~distance_from_point_to_line geometry_module::distance_from_point_to_line proc~distance_from_point_to_line->proc~cross proc~from_ijk_to_lvlh_mat relative_motion_module::from_ijk_to_lvlh_mat proc~from_ijk_to_lvlh_mat->proc~cross proc~from_ijk_to_rsw_mat relative_motion_module::from_ijk_to_rsw_mat proc~from_ijk_to_rsw_mat->proc~cross proc~get_c_cdot_two_body_rotating transformation_module::two_body_rotating_frame%get_c_cdot_two_body_rotating proc~get_c_cdot_two_body_rotating->proc~cross proc~rv_to_orbital_elements orbital_mechanics_module::rv_to_orbital_elements proc~rv_to_orbital_elements->proc~cross proc~solve_lambert_gooding lambert_module::solve_lambert_gooding proc~solve_lambert_gooding->proc~cross proc~ucross->proc~cross interface~from_ijk_to_lvlh relative_motion_module::from_ijk_to_lvlh interface~from_ijk_to_lvlh->proc~from_ijk_to_lvlh_mat proc~from_ijk_to_lvlh_rv relative_motion_module::from_ijk_to_lvlh_rv interface~from_ijk_to_lvlh->proc~from_ijk_to_lvlh_rv interface~from_ijk_to_rsw relative_motion_module::from_ijk_to_rsw interface~from_ijk_to_rsw->proc~from_ijk_to_rsw_mat proc~from_ijk_to_rsw_rv relative_motion_module::from_ijk_to_rsw_rv interface~from_ijk_to_rsw->proc~from_ijk_to_rsw_rv proc~bplane_test bplane_module::bplane_test proc~bplane_test->proc~bplane proc~bplane_test->proc~calculate_bplane_data proc~bplane_test->proc~compute_vinf_vectors proc~get_c_cdot_two_body_rotating_pulsating transformation_module::two_body_rotating_pulsating_frame%get_c_cdot_two_body_rotating_pulsating proc~get_c_cdot_two_body_rotating_pulsating->proc~get_c_cdot_two_body_rotating proc~lambert_test lambert_module::lambert_test proc~lambert_test->proc~solve_lambert_gooding proc~solve_lambert_izzo lambert_module::solve_lambert_izzo proc~lambert_test->proc~solve_lambert_izzo proc~modified_equinoctial_test modified_equinoctial_module::modified_equinoctial_test proc~modified_equinoctial_test->proc~cartesian_to_equinoctial proc~solve_lambert_izzo->proc~ucross proc~sphere_of_influence_earth_moon orbital_mechanics_module::sphere_of_influence_earth_moon proc~sphere_of_influence_earth_moon->proc~angle_between_vectors proc~vector_test vector_module::vector_test proc~vector_test->proc~axis_angle_rotation proc~from_ijk_to_lvlh_rv->interface~from_ijk_to_lvlh proc~from_ijk_to_rsw_rv->interface~from_ijk_to_rsw proc~from_lvlh_to_ijk_mat relative_motion_module::from_lvlh_to_ijk_mat proc~from_lvlh_to_ijk_mat->interface~from_ijk_to_lvlh proc~from_rsw_to_ijk_mat relative_motion_module::from_rsw_to_ijk_mat proc~from_rsw_to_ijk_mat->interface~from_ijk_to_rsw proc~relative_motion_test relative_motion_module::relative_motion_test proc~relative_motion_test->interface~from_ijk_to_lvlh proc~relative_motion_test->interface~from_ijk_to_rsw interface~from_lvlh_to_ijk relative_motion_module::from_lvlh_to_ijk interface~from_lvlh_to_ijk->proc~from_lvlh_to_ijk_mat proc~from_lvlh_to_ijk_rv relative_motion_module::from_lvlh_to_ijk_rv interface~from_lvlh_to_ijk->proc~from_lvlh_to_ijk_rv interface~from_rsw_to_ijk relative_motion_module::from_rsw_to_ijk interface~from_rsw_to_ijk->proc~from_rsw_to_ijk_mat proc~from_rsw_to_ijk_rv relative_motion_module::from_rsw_to_ijk_rv interface~from_rsw_to_ijk->proc~from_rsw_to_ijk_rv proc~from_lvlh_to_ijk_rv->interface~from_lvlh_to_ijk proc~from_rsw_to_ijk_rv->interface~from_rsw_to_ijk

Source Code

    pure function cross(r,v) result(rxv)

    implicit none

    real(wp),dimension(3),intent(in) :: r
    real(wp),dimension(3),intent(in) :: v
    real(wp),dimension(3)            :: rxv

    rxv = [r(2)*v(3) - v(2)*r(3), &
           r(3)*v(1) - v(3)*r(1), &
           r(1)*v(2) - v(1)*r(2) ]

    end function cross