PX4 Sitl Gps

hello , im looking for a way to change the GPS of px4 sitl and send GPS information to px4 sitl to see the attitude of the vehicle , first i try mavlink commands but i cant , after i try to change SimulatorMavlink.cpp which declare GPS_hil but when i give one point it works but when i want to send points like GPS with update rate the simulator doesnt run and doesn connect to QGC.