void model::update_model( double time, double dt )
{
    cg::geo_base_3 cur_pos = pos();

    if (phys_ && phys_flock_) // callback to phys pos
    {
        const cg::geo_base_3& base = phys_->get_base(*phys_zone_);
        decart_position phys_pos = phys_flock_->get_position();
        geo_position glb_phys_pos(phys_pos, base);
        auto const& settings = _spawner->settings();

        double dist = cg::distance(glb_phys_pos.pos, desired_position_/*cur_pos*/);

        //Soar Timeout - Limits how long a bird can soar
        if(_soar && settings._soarMaxTime > 0){ 		
            if(_soarTimer >settings._soarMaxTime){
                flap();
                _soarTimer = 0;
            }else {
                _soarTimer+=dt;
            }
        }

        if(!_landingSpotted && dist < settings._waypointDistance +_stuckCounter){
            wander(0);	//create a new waypoint
            _stuckCounter=0;
        }else{
            _stuckCounter += dt;
        }
    }


}
void model::update_model( double time, double dt )
{
    cg::geo_base_3 cur_pos = pos();

    if (phys_ && phys_model_) // callback to phys pos
    {
        const cg::geo_base_3& base = phys_->get_base(*phys_zone_);

        decart_position phys_pos = phys_model_->get_position();
        geo_position glb_phys_pos(phys_pos, base);

        double dist = cg::distance(glb_phys_pos.pos, desired_position_/*cur_pos*/);


    }

}