When John Glenn was waiting to be fired into orbit aboard Friendship 7 in 1962, there was one person he trusted with the complex trajectory calculations required to bring him down safely from his orbital spaceflight: Katherine Johnson, an African-American mathematician who worked in Nasa’s segregated west area computers division.

“Get the girl, check the numbers,” Glenn said before boarding the rocket. “If she says they’re good, I’m good to go.”

Johnson was one of three female African-American mathematicians known as the “computers in skirts” who worked on the Redstone, Mercury and Apollo space programmes for Nasa. Now, thanks to an award-tipped movie, Johnson, Mary Jackson and Dorothy Vaughan are about to become more widely celebrated.

The film, Hidden Figures, stars Taraji P Henson of TV series Empire, soul singer and actress Janelle Monáe, Octavia Spencer from The Help movie, and Academy Award winner Kevin Costner.

Facebook Twitter Pinterest Katherine Johnson at Nasa Langley Research Center in 1980. Photograph: Nasa

Glenn’s death at the age of 95 last week, coupled with the film industry’s desire to correct last year’s damaging #OscarSoWhite controversy and celebrate how the women broke through the racial and gender discrimination of an all-male flight research team, suggests the film will now have the momentum to launch itself forcefully into the film awards season.

Monáe, who plays Jackson, told the Observer that the three women broke through and changed the face of a white male profession. Jackson fought through the courts to join courses that would allow her to even be admitted to the Nasa programme. “These women were told that their dreams were not valid because of their gender and the colour of their skin,” said Monáe. “But these were two things they could not change – and would not want to – because [Jackson] was a proud black woman.”

A corresponding breakthrough, said Monáe, was Hollywood’s willingness to make a mainstream film about African-American women. “Most of the time we’re portrayed as the maid, the nanny or the secretary,” she said. “But to be portrayed as brilliant-minded, outspoken, to dress sharply and be the voice of a new generation of women – now audiences are going to see a different side of us.”

Facebook Twitter Pinterest Mary Jackson at NASA Langley Research Centre in 1980. Photograph: Bob Nye/NASA

The filmmakers hope the movie, based on the book Hidden Figures: the American Dream and the Untold Story of the Black Women Mathematicians who helped win the Space Race by Margot Lee Shetterly, will also help to lift the stigma that is often attached to women in the sciences. “If a girl, of whatever age or ethnicity, is inclined toward science, technology engineering and math, they should be encouraged and that passion should be fostered because if we only had the male perspective, women will continue to be marginalised and objectified,” said Spencer, who plays Vaughan.

Monáe hopes Hidden Figures will help to boost the Fem the Future gender-equality project that she launched over the summer with Kenyan-Mexican actress Lupita Nyong’o, who won an Oscar for 12 Years a Slave.

Facebook Twitter Pinterest Dorothy Vaughan in her twenties. Photograph: Courtesy the Family of Dorothy Johnson Vaughan

Their plans include putting on a women-focused pop and tech festival next year. “We’re out there but it’s going to take all of us coming together – just like going into space – to get it done or it does not get done,” Monáe said.

Pharrell Williams, one of the film’s executive producers who also wrote several songs for the film, added his voice to calls for women’s role in science to be more widely acknowledged. “Up until recently, a woman’s contribution to history has often been dismissed, discounted and often at times even erased from public acknowledgment,” he told the Directors Guild of America last month.

The story of Nasa’s black female mathematicians has always been celebrated within the agency, but not widely known about beyond. Following an executive order prohibiting racial discrimination in the defence industry, Nasa’s predecessor, the National Advisory Committee for Aeronautics (Naca) began recruiting African Americans with college degrees in the 1940s for the computer pool.

The agency considered women more patient and detail-oriented than men – and they could be paid less. They were assigned the work of reading, calculating and plotting test data. But the in the pre-civil rights era, African Americans occupied a segregated wing and used separate facilities.

In the late 1980s, a Nasa researcher noticed the black women in agency photographs from the period. The film’s director, Theodore Melfi, explained that parts of their story were known but that the segregated computer group existed only for a short time before IBM brought in the first computers in 1961.

John Glenn obituary Read more

“Nasa has never hidden these women and always held them up and celebrated them,” he said. “It’s always been a progressive place and it was always about the value of your brain. The agency was terrifically helpful with the making of the film.”

It is believed that Glenn, a former Democrat senator for Ohio, died before seeing Hidden Figures. Melfi said Glenn was supportive of the film and gave the production the use of his photographs for free. He was known to have disliked The Right Stuff, the film of Tom Wolfe’s account of the early days of the space programme that depicted him, he felt, as conservative in contrast to hell-raising colleagues.

Details of Glenn’s funeral are still being decided but he is to lie in state in Ohio’s capitol building in Columbus before a memorial service at Ohio State university. He is to be buried at Arlington National Cemetery in Washington DC.